Skip to content

Commit 94ac86d

Browse files
fix: NodePathMap should permit undefined/optional children
1 parent d70a467 commit 94ac86d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@godot-js/editor": patch
3+
---
4+
5+
**Types:** `NodePathMap` now permits `undefined`/optional children.

scripts/typings/godot.mix.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ declare module "godot" {
178178
Map[keyof Map] extends undefined | Permitted ? Exclude<Map[keyof Map], undefined> : Default
179179
>;
180180

181-
type NodePathMap = PathMap<Node>;
181+
type NodePathMap = PathMap<undefined | Node>;
182182
type StaticNodePath<Map extends NodePathMap, Permitted = Node> = StaticPath<Map, Permitted, never, typeof __PathMappableDummyKeys.Node>;
183183
type ResolveNodePath<Map extends NodePathMap, Path extends string, Default = never, Permitted = Node> =
184184
ResolvePath<Map, Path, Default, Permitted, never, typeof __PathMappableDummyKeys.Node>;

0 commit comments

Comments
 (0)