diff --git a/src/idl_gen_ts.cpp b/src/idl_gen_ts.cpp index d37a40790..ce3404bde 100644 --- a/src/idl_gen_ts.cpp +++ b/src/idl_gen_ts.cpp @@ -1898,7 +1898,10 @@ class TsGenerator : public BaseGenerator { if (parser_.opts.generate_name_strings) { GenDocComment(code_ptr); code += "static getFullyQualifiedName():string {\n"; - code += " return '" + WrapInNameSpace(struct_def) + "';\n"; + code += + " return '" + + struct_def.defined_namespace->GetFullyQualifiedName(struct_def.name) + + "';\n"; code += "}\n\n"; } diff --git a/tests/ts/arrays_test_complex/arrays_test_complex_generated.js b/tests/ts/arrays_test_complex/arrays_test_complex_generated.js index 7530e8463..f2811a134 100644 --- a/tests/ts/arrays_test_complex/arrays_test_complex_generated.js +++ b/tests/ts/arrays_test_complex/arrays_test_complex_generated.js @@ -29,7 +29,7 @@ export class InnerStruct { return this.bb.readInt64(this.bb_pos + 24); } static getFullyQualifiedName() { - return 'MyGame_Example_InnerStruct'; + return 'MyGame.Example.InnerStruct'; } static sizeOf() { return 32; @@ -96,7 +96,7 @@ export class OuterStruct { return this.bb.readFloat64(this.bb_pos + 176 + index * 8); } static getFullyQualifiedName() { - return 'MyGame_Example_OuterStruct'; + return 'MyGame.Example.OuterStruct'; } static sizeOf() { return 208; @@ -188,7 +188,7 @@ export class NestedStruct { return this.bb.readInt64(this.bb_pos + 1056 + index * 8); } static getFullyQualifiedName() { - return 'MyGame_Example_NestedStruct'; + return 'MyGame.Example.NestedStruct'; } static sizeOf() { return 1072; @@ -272,7 +272,7 @@ export class ArrayStruct { return this.bb.readInt64(this.bb_pos + 2640 + index * 8); } static getFullyQualifiedName() { - return 'MyGame_Example_ArrayStruct'; + return 'MyGame.Example.ArrayStruct'; } static sizeOf() { return 2656; @@ -365,7 +365,7 @@ export class ArrayTable { return offset ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb) : null; } static getFullyQualifiedName() { - return 'MyGame_Example_ArrayTable'; + return 'MyGame.Example.ArrayTable'; } static startArrayTable(builder) { builder.startObject(2); diff --git a/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts b/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts index eea0ed996..4686a5628 100644 --- a/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts +++ b/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts @@ -35,7 +35,7 @@ dUnderscore():bigint { } static getFullyQualifiedName():string { - return 'MyGame_Example_InnerStruct'; + return 'MyGame.Example.InnerStruct'; } static sizeOf():number { @@ -129,7 +129,7 @@ f(index: number):number|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_OuterStruct'; + return 'MyGame.Example.OuterStruct'; } static sizeOf():number { @@ -271,7 +271,7 @@ e(index: number):bigint|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_NestedStruct'; + return 'MyGame.Example.NestedStruct'; } static sizeOf():number { @@ -407,7 +407,7 @@ g(index: number):bigint|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_ArrayStruct'; + return 'MyGame.Example.ArrayStruct'; } static sizeOf():number { @@ -563,7 +563,7 @@ cUnderscore(obj?:ArrayStruct):ArrayStruct|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_ArrayTable'; + return 'MyGame.Example.ArrayTable'; } static startArrayTable(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/ability.js b/tests/ts/my-game/example/ability.js index 4d7d3db72..9fea3d6b4 100644 --- a/tests/ts/my-game/example/ability.js +++ b/tests/ts/my-game/example/ability.js @@ -24,7 +24,7 @@ export class Ability { return true; } static getFullyQualifiedName() { - return 'MyGame_Example_Ability'; + return 'MyGame.Example.Ability'; } static sizeOf() { return 8; diff --git a/tests/ts/my-game/example/ability.ts b/tests/ts/my-game/example/ability.ts index b0bea8fe8..86604ad11 100644 --- a/tests/ts/my-game/example/ability.ts +++ b/tests/ts/my-game/example/ability.ts @@ -32,7 +32,7 @@ mutate_distance(value:number):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_Ability'; + return 'MyGame.Example.Ability'; } static sizeOf():number { diff --git a/tests/ts/my-game/example/monster.js b/tests/ts/my-game/example/monster.js index 97c93991c..6d71945df 100644 --- a/tests/ts/my-game/example/monster.js +++ b/tests/ts/my-game/example/monster.js @@ -610,11 +610,23 @@ export class Monster { this.bb.writeFloat32(this.bb_pos + offset, value); return true; } + doubleInfDefault() { + const offset = this.bb.__offset(this.bb_pos, 126); + return offset ? this.bb.readFloat64(this.bb_pos + offset) : Infinity; + } + mutate_double_inf_default(value) { + const offset = this.bb.__offset(this.bb_pos, 126); + if (offset === 0) { + return false; + } + this.bb.writeFloat64(this.bb_pos + offset, value); + return true; + } static getFullyQualifiedName() { - return 'MyGame_Example_Monster'; + return 'MyGame.Example.Monster'; } static startMonster(builder) { - builder.startObject(61); + builder.startObject(62); } static addPos(builder, posOffset) { builder.addFieldStruct(0, posOffset, 0); @@ -975,6 +987,9 @@ export class Monster { static addNegativeInfinityDefault(builder, negativeInfinityDefault) { builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity); } + static addDoubleInfDefault(builder, doubleInfDefault) { + builder.addFieldFloat64(61, doubleInfDefault, Infinity); + } static endMonster(builder) { const offset = builder.endObject(); builder.requiredField(offset, 10); // name @@ -1011,7 +1026,7 @@ export class Monster { return null; } return temp.unpack(); - })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault(), this.nanDefault(), this.infDefault(), this.positiveInfDefault(), this.infinityDefault(), this.positiveInfinityDefault(), this.negativeInfDefault(), this.negativeInfinityDefault()); + })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault(), this.nanDefault(), this.infDefault(), this.positiveInfDefault(), this.infinityDefault(), this.positiveInfinityDefault(), this.negativeInfDefault(), this.negativeInfinityDefault(), this.doubleInfDefault()); } unpackTo(_o) { _o.pos = (this.pos() !== null ? this.pos().unpack() : null); @@ -1092,10 +1107,11 @@ export class Monster { _o.positiveInfinityDefault = this.positiveInfinityDefault(); _o.negativeInfDefault = this.negativeInfDefault(); _o.negativeInfinityDefault = this.negativeInfinityDefault(); + _o.doubleInfDefault = this.doubleInfDefault(); } } export class MonsterT { - constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2'), nanDefault = NaN, infDefault = Infinity, positiveInfDefault = Infinity, infinityDefault = Infinity, positiveInfinityDefault = Infinity, negativeInfDefault = -Infinity, negativeInfinityDefault = -Infinity) { + constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2'), nanDefault = NaN, infDefault = Infinity, positiveInfDefault = Infinity, infinityDefault = Infinity, positiveInfinityDefault = Infinity, negativeInfDefault = -Infinity, negativeInfinityDefault = -Infinity, doubleInfDefault = Infinity) { this.pos = pos; this.mana = mana; this.hp = hp; @@ -1156,6 +1172,7 @@ export class MonsterT { this.positiveInfinityDefault = positiveInfinityDefault; this.negativeInfDefault = negativeInfDefault; this.negativeInfinityDefault = negativeInfinityDefault; + this.doubleInfDefault = doubleInfDefault; } pack(builder) { const name = (this.name !== null ? builder.createString(this.name) : 0); @@ -1246,6 +1263,7 @@ export class MonsterT { Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault); Monster.addNegativeInfDefault(builder, this.negativeInfDefault); Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault); + Monster.addDoubleInfDefault(builder, this.doubleInfDefault); return Monster.endMonster(builder); } } diff --git a/tests/ts/my-game/example/monster.ts b/tests/ts/my-game/example/monster.ts index 7e205ee19..78590c668 100644 --- a/tests/ts/my-game/example/monster.ts +++ b/tests/ts/my-game/example/monster.ts @@ -812,7 +812,7 @@ mutate_double_inf_default(value:number):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_Monster'; + return 'MyGame.Example.Monster'; } static startMonster(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/referrable.js b/tests/ts/my-game/example/referrable.js index 367034b06..0370768dd 100644 --- a/tests/ts/my-game/example/referrable.js +++ b/tests/ts/my-game/example/referrable.js @@ -30,7 +30,7 @@ export class Referrable { return true; } static getFullyQualifiedName() { - return 'MyGame_Example_Referrable'; + return 'MyGame.Example.Referrable'; } static startReferrable(builder) { builder.startObject(1); diff --git a/tests/ts/my-game/example/referrable.ts b/tests/ts/my-game/example/referrable.ts index 52603629a..8e199bb62 100644 --- a/tests/ts/my-game/example/referrable.ts +++ b/tests/ts/my-game/example/referrable.ts @@ -39,7 +39,7 @@ mutate_id(value:bigint):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_Referrable'; + return 'MyGame.Example.Referrable'; } static startReferrable(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/stat.js b/tests/ts/my-game/example/stat.js index 43b569f4e..46eec4344 100644 --- a/tests/ts/my-game/example/stat.js +++ b/tests/ts/my-game/example/stat.js @@ -46,7 +46,7 @@ export class Stat { return true; } static getFullyQualifiedName() { - return 'MyGame_Example_Stat'; + return 'MyGame.Example.Stat'; } static startStat(builder) { builder.startObject(3); diff --git a/tests/ts/my-game/example/stat.ts b/tests/ts/my-game/example/stat.ts index c1597b2a9..b5d87ff3e 100644 --- a/tests/ts/my-game/example/stat.ts +++ b/tests/ts/my-game/example/stat.ts @@ -62,7 +62,7 @@ mutate_count(value:number):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_Stat'; + return 'MyGame.Example.Stat'; } static startStat(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/struct-of-structs-of-structs.js b/tests/ts/my-game/example/struct-of-structs-of-structs.js index a5fbc66dc..97f65877d 100644 --- a/tests/ts/my-game/example/struct-of-structs-of-structs.js +++ b/tests/ts/my-game/example/struct-of-structs-of-structs.js @@ -14,7 +14,7 @@ export class StructOfStructsOfStructs { return (obj || new StructOfStructs()).__init(this.bb_pos, this.bb); } static getFullyQualifiedName() { - return 'MyGame_Example_StructOfStructsOfStructs'; + return 'MyGame.Example.StructOfStructsOfStructs'; } static sizeOf() { return 20; diff --git a/tests/ts/my-game/example/struct-of-structs-of-structs.ts b/tests/ts/my-game/example/struct-of-structs-of-structs.ts index fa17939b8..2464e56f9 100644 --- a/tests/ts/my-game/example/struct-of-structs-of-structs.ts +++ b/tests/ts/my-game/example/struct-of-structs-of-structs.ts @@ -19,7 +19,7 @@ a(obj?:StructOfStructs):StructOfStructs|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_StructOfStructsOfStructs'; + return 'MyGame.Example.StructOfStructsOfStructs'; } static sizeOf():number { diff --git a/tests/ts/my-game/example/struct-of-structs.js b/tests/ts/my-game/example/struct-of-structs.js index 66aadc8e5..3d79d3947 100644 --- a/tests/ts/my-game/example/struct-of-structs.js +++ b/tests/ts/my-game/example/struct-of-structs.js @@ -21,7 +21,7 @@ export class StructOfStructs { return (obj || new Ability()).__init(this.bb_pos + 12, this.bb); } static getFullyQualifiedName() { - return 'MyGame_Example_StructOfStructs'; + return 'MyGame.Example.StructOfStructs'; } static sizeOf() { return 20; diff --git a/tests/ts/my-game/example/struct-of-structs.ts b/tests/ts/my-game/example/struct-of-structs.ts index 10d3607f1..f1e3146fb 100644 --- a/tests/ts/my-game/example/struct-of-structs.ts +++ b/tests/ts/my-game/example/struct-of-structs.ts @@ -28,7 +28,7 @@ c(obj?:Ability):Ability|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_StructOfStructs'; + return 'MyGame.Example.StructOfStructs'; } static sizeOf():number { diff --git a/tests/ts/my-game/example/test-simple-table-with-enum.js b/tests/ts/my-game/example/test-simple-table-with-enum.js index 3690feeb7..821cca992 100644 --- a/tests/ts/my-game/example/test-simple-table-with-enum.js +++ b/tests/ts/my-game/example/test-simple-table-with-enum.js @@ -31,7 +31,7 @@ export class TestSimpleTableWithEnum { return true; } static getFullyQualifiedName() { - return 'MyGame_Example_TestSimpleTableWithEnum'; + return 'MyGame.Example.TestSimpleTableWithEnum'; } static startTestSimpleTableWithEnum(builder) { builder.startObject(1); diff --git a/tests/ts/my-game/example/test-simple-table-with-enum.ts b/tests/ts/my-game/example/test-simple-table-with-enum.ts index 903ab99cb..e28c80f01 100644 --- a/tests/ts/my-game/example/test-simple-table-with-enum.ts +++ b/tests/ts/my-game/example/test-simple-table-with-enum.ts @@ -40,7 +40,7 @@ mutate_color(value:Color):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_TestSimpleTableWithEnum'; + return 'MyGame.Example.TestSimpleTableWithEnum'; } static startTestSimpleTableWithEnum(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/test.js b/tests/ts/my-game/example/test.js index 9c43619e2..ba6ebfb7a 100644 --- a/tests/ts/my-game/example/test.js +++ b/tests/ts/my-game/example/test.js @@ -24,7 +24,7 @@ export class Test { return true; } static getFullyQualifiedName() { - return 'MyGame_Example_Test'; + return 'MyGame.Example.Test'; } static sizeOf() { return 4; diff --git a/tests/ts/my-game/example/test.ts b/tests/ts/my-game/example/test.ts index 7484f2c15..0bad68292 100644 --- a/tests/ts/my-game/example/test.ts +++ b/tests/ts/my-game/example/test.ts @@ -32,7 +32,7 @@ mutate_b(value:number):boolean { } static getFullyQualifiedName():string { - return 'MyGame_Example_Test'; + return 'MyGame.Example.Test'; } static sizeOf():number { diff --git a/tests/ts/my-game/example/type-aliases.js b/tests/ts/my-game/example/type-aliases.js index a4b5f89e3..f26f226c8 100644 --- a/tests/ts/my-game/example/type-aliases.js +++ b/tests/ts/my-game/example/type-aliases.js @@ -162,7 +162,7 @@ export class TypeAliases { return offset ? new Float64Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; } static getFullyQualifiedName() { - return 'MyGame_Example_TypeAliases'; + return 'MyGame.Example.TypeAliases'; } static startTypeAliases(builder) { builder.startObject(12); diff --git a/tests/ts/my-game/example/type-aliases.ts b/tests/ts/my-game/example/type-aliases.ts index 93262d702..3c727356c 100644 --- a/tests/ts/my-game/example/type-aliases.ts +++ b/tests/ts/my-game/example/type-aliases.ts @@ -213,7 +213,7 @@ vf64Array():Float64Array|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_TypeAliases'; + return 'MyGame.Example.TypeAliases'; } static startTypeAliases(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/example/vec3.js b/tests/ts/my-game/example/vec3.js index cae64eb55..f880f118e 100644 --- a/tests/ts/my-game/example/vec3.js +++ b/tests/ts/my-game/example/vec3.js @@ -49,7 +49,7 @@ export class Vec3 { return (obj || new Test()).__init(this.bb_pos + 26, this.bb); } static getFullyQualifiedName() { - return 'MyGame_Example_Vec3'; + return 'MyGame.Example.Vec3'; } static sizeOf() { return 32; diff --git a/tests/ts/my-game/example/vec3.ts b/tests/ts/my-game/example/vec3.ts index 84516e09c..ad6cafaa7 100644 --- a/tests/ts/my-game/example/vec3.ts +++ b/tests/ts/my-game/example/vec3.ts @@ -65,7 +65,7 @@ test3(obj?:Test):Test|null { } static getFullyQualifiedName():string { - return 'MyGame_Example_Vec3'; + return 'MyGame.Example.Vec3'; } static sizeOf():number { diff --git a/tests/ts/my-game/example2/monster.js b/tests/ts/my-game/example2/monster.js index f50a2c85a..17f02b11e 100644 --- a/tests/ts/my-game/example2/monster.js +++ b/tests/ts/my-game/example2/monster.js @@ -18,7 +18,7 @@ export class Monster { return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getFullyQualifiedName() { - return 'MyGame_Example2_Monster'; + return 'MyGame.Example2.Monster'; } static startMonster(builder) { builder.startObject(0); diff --git a/tests/ts/my-game/example2/monster.ts b/tests/ts/my-game/example2/monster.ts index 071448699..66c555dde 100644 --- a/tests/ts/my-game/example2/monster.ts +++ b/tests/ts/my-game/example2/monster.ts @@ -23,7 +23,7 @@ static getSizePrefixedRootAsMonster(bb:flatbuffers.ByteBuffer, obj?:Monster):Mon } static getFullyQualifiedName():string { - return 'MyGame_Example2_Monster'; + return 'MyGame.Example2.Monster'; } static startMonster(builder:flatbuffers.Builder) { diff --git a/tests/ts/my-game/in-parent-namespace.js b/tests/ts/my-game/in-parent-namespace.js index 24b0ed787..48817411b 100644 --- a/tests/ts/my-game/in-parent-namespace.js +++ b/tests/ts/my-game/in-parent-namespace.js @@ -18,7 +18,7 @@ export class InParentNamespace { return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getFullyQualifiedName() { - return 'MyGame_InParentNamespace'; + return 'MyGame.InParentNamespace'; } static startInParentNamespace(builder) { builder.startObject(0); diff --git a/tests/ts/my-game/in-parent-namespace.ts b/tests/ts/my-game/in-parent-namespace.ts index 0e2f41287..4c0e4163d 100644 --- a/tests/ts/my-game/in-parent-namespace.ts +++ b/tests/ts/my-game/in-parent-namespace.ts @@ -23,7 +23,7 @@ static getSizePrefixedRootAsInParentNamespace(bb:flatbuffers.ByteBuffer, obj?:In } static getFullyQualifiedName():string { - return 'MyGame_InParentNamespace'; + return 'MyGame.InParentNamespace'; } static startInParentNamespace(builder:flatbuffers.Builder) { diff --git a/tests/ts/optional-scalars/scalar-stuff.ts b/tests/ts/optional-scalars/scalar-stuff.ts index 2adf31b33..fe74b2cb4 100644 --- a/tests/ts/optional-scalars/scalar-stuff.ts +++ b/tests/ts/optional-scalars/scalar-stuff.ts @@ -208,7 +208,7 @@ defaultEnum():OptionalByte { } static getFullyQualifiedName():string { - return 'optional_scalars_ScalarStuff'; + return 'optional_scalars.ScalarStuff'; } static startScalarStuff(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/enum-val.js b/tests/ts/reflection/enum-val.js index 93926a61a..b4d0769d5 100644 --- a/tests/ts/reflection/enum-val.js +++ b/tests/ts/reflection/enum-val.js @@ -56,7 +56,7 @@ export class EnumVal { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_EnumVal'; + return 'reflection.EnumVal'; } static startEnumVal(builder) { builder.startObject(6); diff --git a/tests/ts/reflection/enum-val.ts b/tests/ts/reflection/enum-val.ts index 3119a2063..2576e7026 100644 --- a/tests/ts/reflection/enum-val.ts +++ b/tests/ts/reflection/enum-val.ts @@ -75,7 +75,7 @@ attributesLength():number { } static getFullyQualifiedName():string { - return 'reflection_EnumVal'; + return 'reflection.EnumVal'; } static startEnumVal(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/enum.js b/tests/ts/reflection/enum.js index 49393072b..a08a8cbfa 100644 --- a/tests/ts/reflection/enum.js +++ b/tests/ts/reflection/enum.js @@ -69,7 +69,7 @@ export class Enum { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Enum'; + return 'reflection.Enum'; } static startEnum(builder) { builder.startObject(7); diff --git a/tests/ts/reflection/enum.ts b/tests/ts/reflection/enum.ts index 34d137757..edf29f65b 100644 --- a/tests/ts/reflection/enum.ts +++ b/tests/ts/reflection/enum.ts @@ -96,7 +96,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Enum'; + return 'reflection.Enum'; } static startEnum(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/field.js b/tests/ts/reflection/field.js index 107b77bf0..5d7e2f88c 100644 --- a/tests/ts/reflection/field.js +++ b/tests/ts/reflection/field.js @@ -155,7 +155,7 @@ export class Field { return true; } static getFullyQualifiedName() { - return 'reflection_Field'; + return 'reflection.Field'; } static startField(builder) { builder.startObject(13); diff --git a/tests/ts/reflection/field.ts b/tests/ts/reflection/field.ts index 9734fbab5..653611710 100644 --- a/tests/ts/reflection/field.ts +++ b/tests/ts/reflection/field.ts @@ -206,7 +206,7 @@ mutate_padding(value:number):boolean { } static getFullyQualifiedName():string { - return 'reflection_Field'; + return 'reflection.Field'; } static startField(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/key-value.js b/tests/ts/reflection/key-value.js index 622b4f2a8..f8c6b856f 100644 --- a/tests/ts/reflection/key-value.js +++ b/tests/ts/reflection/key-value.js @@ -26,7 +26,7 @@ export class KeyValue { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_KeyValue'; + return 'reflection.KeyValue'; } static startKeyValue(builder) { builder.startObject(2); diff --git a/tests/ts/reflection/key-value.ts b/tests/ts/reflection/key-value.ts index 93262f42f..8a1e4a09b 100644 --- a/tests/ts/reflection/key-value.ts +++ b/tests/ts/reflection/key-value.ts @@ -37,7 +37,7 @@ value(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_KeyValue'; + return 'reflection.KeyValue'; } static startKeyValue(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/object.js b/tests/ts/reflection/object.js index d2885455a..e3d15ecde 100644 --- a/tests/ts/reflection/object.js +++ b/tests/ts/reflection/object.js @@ -88,7 +88,7 @@ export class Object_ { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Object'; + return 'reflection.Object'; } static startObject(builder) { builder.startObject(8); diff --git a/tests/ts/reflection/object.ts b/tests/ts/reflection/object.ts index fbe700615..3a05effce 100644 --- a/tests/ts/reflection/object.ts +++ b/tests/ts/reflection/object.ts @@ -122,7 +122,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Object'; + return 'reflection.Object'; } static startObject(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/rpccall.js b/tests/ts/reflection/rpccall.js index 96e92eb3f..9dd1541a0 100644 --- a/tests/ts/reflection/rpccall.js +++ b/tests/ts/reflection/rpccall.js @@ -48,7 +48,7 @@ export class RPCCall { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_RPCCall'; + return 'reflection.RPCCall'; } static startRPCCall(builder) { builder.startObject(5); diff --git a/tests/ts/reflection/rpccall.ts b/tests/ts/reflection/rpccall.ts index 320de5169..61a862fc9 100644 --- a/tests/ts/reflection/rpccall.ts +++ b/tests/ts/reflection/rpccall.ts @@ -64,7 +64,7 @@ documentationLength():number { } static getFullyQualifiedName():string { - return 'reflection_RPCCall'; + return 'reflection.RPCCall'; } static startRPCCall(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/schema-file.js b/tests/ts/reflection/schema-file.js index 31c6145dd..1aeeac848 100644 --- a/tests/ts/reflection/schema-file.js +++ b/tests/ts/reflection/schema-file.js @@ -35,7 +35,7 @@ export class SchemaFile { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_SchemaFile'; + return 'reflection.SchemaFile'; } static startSchemaFile(builder) { builder.startObject(2); diff --git a/tests/ts/reflection/schema-file.ts b/tests/ts/reflection/schema-file.ts index eda23dede..6060b800d 100644 --- a/tests/ts/reflection/schema-file.ts +++ b/tests/ts/reflection/schema-file.ts @@ -53,7 +53,7 @@ includedFilenamesLength():number { } static getFullyQualifiedName():string { - return 'reflection_SchemaFile'; + return 'reflection.SchemaFile'; } static startSchemaFile(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/schema.js b/tests/ts/reflection/schema.js index d50229715..8cdb0c68a 100644 --- a/tests/ts/reflection/schema.js +++ b/tests/ts/reflection/schema.js @@ -85,7 +85,7 @@ export class Schema { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_Schema'; + return 'reflection.Schema'; } static startSchema(builder) { builder.startObject(8); diff --git a/tests/ts/reflection/schema.ts b/tests/ts/reflection/schema.ts index c99652226..21e0e2cee 100644 --- a/tests/ts/reflection/schema.ts +++ b/tests/ts/reflection/schema.ts @@ -110,7 +110,7 @@ fbsFilesLength():number { } static getFullyQualifiedName():string { - return 'reflection_Schema'; + return 'reflection.Schema'; } static startSchema(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/service.js b/tests/ts/reflection/service.js index 8c66ef774..3ce83f44f 100644 --- a/tests/ts/reflection/service.js +++ b/tests/ts/reflection/service.js @@ -52,7 +52,7 @@ export class Service { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Service'; + return 'reflection.Service'; } static startService(builder) { builder.startObject(5); diff --git a/tests/ts/reflection/service.ts b/tests/ts/reflection/service.ts index c0ad8adbe..7fd396f0e 100644 --- a/tests/ts/reflection/service.ts +++ b/tests/ts/reflection/service.ts @@ -74,7 +74,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Service'; + return 'reflection.Service'; } static startService(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection/type.js b/tests/ts/reflection/type.js index f3ccbdfe6..8deec2f8b 100644 --- a/tests/ts/reflection/type.js +++ b/tests/ts/reflection/type.js @@ -97,7 +97,7 @@ export class Type { return true; } static getFullyQualifiedName() { - return 'reflection_Type'; + return 'reflection.Type'; } static startType(builder) { builder.startObject(6); diff --git a/tests/ts/reflection/type.ts b/tests/ts/reflection/type.ts index 37316959d..118aee848 100644 --- a/tests/ts/reflection/type.ts +++ b/tests/ts/reflection/type.ts @@ -126,7 +126,7 @@ mutate_element_size(value:number):boolean { } static getFullyQualifiedName():string { - return 'reflection_Type'; + return 'reflection.Type'; } static startType(builder:flatbuffers.Builder) { diff --git a/tests/ts/reflection_generated.js b/tests/ts/reflection_generated.js index e0ed0076a..7e27373bb 100644 --- a/tests/ts/reflection_generated.js +++ b/tests/ts/reflection_generated.js @@ -128,7 +128,7 @@ export class Type { return true; } static getFullyQualifiedName() { - return 'reflection_Type'; + return 'reflection.Type'; } static startType(builder) { builder.startObject(6); @@ -216,7 +216,7 @@ export class KeyValue { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_KeyValue'; + return 'reflection.KeyValue'; } static startKeyValue(builder) { builder.startObject(2); @@ -311,7 +311,7 @@ export class EnumVal { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_EnumVal'; + return 'reflection.EnumVal'; } static startEnumVal(builder) { builder.startObject(6); @@ -455,7 +455,7 @@ export class Enum { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Enum'; + return 'reflection.Enum'; } static startEnum(builder) { builder.startObject(7); @@ -712,7 +712,7 @@ export class Field { return true; } static getFullyQualifiedName() { - return 'reflection_Field'; + return 'reflection.Field'; } static startField(builder) { builder.startObject(13); @@ -925,7 +925,7 @@ export class Object_ { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Object'; + return 'reflection.Object'; } static startObject(builder) { builder.startObject(8); @@ -1082,7 +1082,7 @@ export class RPCCall { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_RPCCall'; + return 'reflection.RPCCall'; } static startRPCCall(builder) { builder.startObject(5); @@ -1213,7 +1213,7 @@ export class Service { return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static getFullyQualifiedName() { - return 'reflection_Service'; + return 'reflection.Service'; } static startService(builder) { builder.startObject(5); @@ -1340,7 +1340,7 @@ export class SchemaFile { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_SchemaFile'; + return 'reflection.SchemaFile'; } static startSchemaFile(builder) { builder.startObject(2); @@ -1472,7 +1472,7 @@ export class Schema { return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } static getFullyQualifiedName() { - return 'reflection_Schema'; + return 'reflection.Schema'; } static startSchema(builder) { builder.startObject(8); diff --git a/tests/ts/reflection_generated.ts b/tests/ts/reflection_generated.ts index 6b553b1a0..63d622879 100644 --- a/tests/ts/reflection_generated.ts +++ b/tests/ts/reflection_generated.ts @@ -156,7 +156,7 @@ mutate_element_size(value:number):boolean { } static getFullyQualifiedName():string { - return 'reflection_Type'; + return 'reflection.Type'; } static startType(builder:flatbuffers.Builder) { @@ -281,7 +281,7 @@ value(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_KeyValue'; + return 'reflection.KeyValue'; } static startKeyValue(builder:flatbuffers.Builder) { @@ -410,7 +410,7 @@ attributesLength():number { } static getFullyQualifiedName():string { - return 'reflection_EnumVal'; + return 'reflection.EnumVal'; } static startEnumVal(builder:flatbuffers.Builder) { @@ -604,7 +604,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Enum'; + return 'reflection.Enum'; } static startEnum(builder:flatbuffers.Builder) { @@ -941,7 +941,7 @@ mutate_padding(value:number):boolean { } static getFullyQualifiedName():string { - return 'reflection_Field'; + return 'reflection.Field'; } static startField(builder:flatbuffers.Builder) { @@ -1227,7 +1227,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Object'; + return 'reflection.Object'; } static startObject(builder:flatbuffers.Builder) { @@ -1439,7 +1439,7 @@ documentationLength():number { } static getFullyQualifiedName():string { - return 'reflection_RPCCall'; + return 'reflection.RPCCall'; } static startRPCCall(builder:flatbuffers.Builder) { @@ -1615,7 +1615,7 @@ declarationFile(optionalEncoding?:any):string|Uint8Array|null { } static getFullyQualifiedName():string { - return 'reflection_Service'; + return 'reflection.Service'; } static startService(builder:flatbuffers.Builder) { @@ -1790,7 +1790,7 @@ includedFilenamesLength():number { } static getFullyQualifiedName():string { - return 'reflection_SchemaFile'; + return 'reflection.SchemaFile'; } static startSchemaFile(builder:flatbuffers.Builder) { @@ -1964,7 +1964,7 @@ fbsFilesLength():number { } static getFullyQualifiedName():string { - return 'reflection_Schema'; + return 'reflection.Schema'; } static startSchema(builder:flatbuffers.Builder) { diff --git a/tests/ts/typescript/object.js b/tests/ts/typescript/object.js index 05ffb1a56..bde535ca2 100644 --- a/tests/ts/typescript/object.js +++ b/tests/ts/typescript/object.js @@ -98,7 +98,7 @@ export class Object_ { return offset ? (obj || new Schema()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; } static getFullyQualifiedName() { - return 'typescript_Object'; + return 'typescript.Object'; } static startObject(builder) { builder.startObject(7); diff --git a/tests/ts/typescript/object.ts b/tests/ts/typescript/object.ts index 5baf6ed3b..f9cbc4881 100644 --- a/tests/ts/typescript/object.ts +++ b/tests/ts/typescript/object.ts @@ -128,7 +128,7 @@ reflect(obj?:Schema):Schema|null { } static getFullyQualifiedName():string { - return 'typescript_Object'; + return 'typescript.Object'; } static startObject(builder:flatbuffers.Builder) { diff --git a/tests/ts/typescript_keywords_generated.js b/tests/ts/typescript_keywords_generated.js index 4525da7de..3ada0d612 100644 --- a/tests/ts/typescript_keywords_generated.js +++ b/tests/ts/typescript_keywords_generated.js @@ -102,7 +102,7 @@ export class Object_ { return offset ? (obj || new Schema()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; } static getFullyQualifiedName() { - return 'typescript_Object'; + return 'typescript.Object'; } static startObject(builder) { builder.startObject(7); diff --git a/tests/ts/typescript_keywords_generated.ts b/tests/ts/typescript_keywords_generated.ts index bcc61102d..8ea31944a 100644 --- a/tests/ts/typescript_keywords_generated.ts +++ b/tests/ts/typescript_keywords_generated.ts @@ -131,7 +131,7 @@ reflect(obj?:Schema):Schema|null { } static getFullyQualifiedName():string { - return 'typescript_Object'; + return 'typescript.Object'; } static startObject(builder:flatbuffers.Builder) {