File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @godot-js/editor " : patch
3
+ ---
4
+
5
+ ** Types** : Ensure the GAny union type includes null
Original file line number Diff line number Diff line change @@ -2586,13 +2586,12 @@ export class TSDCodeGen {
2586
2586
}
2587
2587
2588
2588
if ( GodotAnyType != "any" ) {
2589
- let gd_variant_alias = `type ${ GodotAnyType } = ` ;
2589
+ let gd_variant_alias = `type ${ GodotAnyType } = undefined | null ` ;
2590
2590
for ( let i = godot . Variant . Type . TYPE_NIL + 1 ; i < godot . Variant . Type . TYPE_MAX ; ++ i ) {
2591
2591
const type_name = get_primitive_type_name ( i ) ;
2592
2592
if ( type_name == GodotAnyType || type_name == "any" ) continue ;
2593
- gd_variant_alias += type_name + " | " ;
2593
+ gd_variant_alias += " | " + type_name ;
2594
2594
}
2595
- gd_variant_alias += "undefined" ;
2596
2595
cg . line ( gd_variant_alias ) ;
2597
2596
}
2598
2597
You can’t perform that action at this time.
0 commit comments