Ensure optional arrays, arrays with defaults, and strings with defaults are supported (#8896)

Fixing issues with generated ts/js
This commit is contained in:
Abhay Agarwal
2026-02-22 23:55:37 -08:00
committed by GitHub
parent fa709636b4
commit 94d6b8086b
5 changed files with 129 additions and 31 deletions

View File

@@ -0,0 +1,23 @@
enum ABC: int { A, B, C }
struct EvenMoreStruct {
g:[int64:2];
}
table EvenMoreDefaults {
str: EvenMoreStruct;
ints: [int] = [];
floats: [float] = [ ];
float_optional: [float];
bytes_optional: [ubyte];
floats_required: [float] (required);
empty_string: string = "";
some_string: string = "some";
zero_string: string = "0";
a_string:string (key);
required_string: string (required);
abcs: [ABC] = [];
bools: [bool] = [];
one_bool: bool = true;
}