Squashed 'third_party/flatbuffers/' changes from bc44fad35..8aa8b9139

8aa8b9139 Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)
001adf782 Add support for parsing proto map fields (#7613)
dbc58ab77 Fix help output for --gen-includes (#7611)
2facfeec7 Fix missing spaces in flatc help text (#7612)
4de2814c7 Fix: arduino platform build (#7625)
37b1acdaf Fix current official name of macOS (#7627)
a22434e2a Add missing #include <algorithm> for std::min/std::max uses, and #include <limits> for std::numeric_limits<> (#7624)
214cc9468 Bump Rust version to 22.10.26 before publication (#7622)
a4ff275d9 Added option to not requires an EoF token when parsing JSON (#7620)
15f32c690 python: object generation prefix and suffix (#7565)
051afd882 Add CreateSharedString to python builder (#7608)
728c033ad Add check for presence of realpath to CMakeLists.txt to support more platforms (#7603)
4c514483d Update DartTest.sh golden files (#7606)
c2d9c2080 [TS] Add support for fixed length arrays on Typescript (#5864) (#7021) (#7581)
e34ae4c6b `build.yml`: Fix missing 'v' in version
e54536127 `build.yml` Update to Kotlin Wrapper 1.0.5
49d9f941c `release.yml` Use env var for passphrase
cefc21c1f `release.yml` Add GPG key for Maven
3e64fa724 `release.yml`: Add Maven Steps
b15f3c57e `release_yml` Use new dotnet version
ff802c680 `release.yml` Use NuGet Key directly
b401957d5 `release.yml` Changed Push to follow examples
8c8151f8f `release.yml` Fix nuget push command
ebb7c203d `release.yml` Add Nuget support
203241ed3 FlatBuffers Version 22.10.26 (#7607)
ac485609c `setup.py`: Define version directly
de5b85aa6 `release.yml`: Switch to `python` directory
de3df2d88 `release.yml`: Add publishing to PyPi
043a24f2e [Python] Fixed the issue with nested unions relying on InitFromBuf. (#7576)
5a48b0d7d release.yml: Typo
ce307556f release.yml: Remove `npm ci`
cb616e27c Create release.yml (#7605)
a54ca1e75 FlatBuffers Version 22.10.25 (#7604)
5b3fadcc1 [vector] Allow to iterate with mutables (#7586)
872a49746 [Nim] Bfbs Nim Generator (#7534)
e30170296 Make type conversions explicit. (#7595)
f7b734438 Fix LongEnum definitions (#7596)
5792623df Rust fix compilation for no_std targets #2 (#7553)
0edb27528 Update Rust version (#7574)
acc6a20d3 tests/test.cpp contains a couple of tests that are only executed (#7571)
04cd037ba Fix #7580 by documenting union schema evolution rules (#7585)
e1c5db988 Turn on clippy for Rust and fix lints for non-generated code (#7575)
b80142b90 Update documentation to mention enum value attributes (#7570)
54418f371 Add support for metadata attributes for enum values (#7567) (#7568)
c92e78a9f FlatBuffers Version 22.9.29 (#7557)
d243b904c [TS] Make strict compliant and improve typings (#7549)
374f8fb5f Rust soundness fixes (#7518)
dadbff571 Moves swift package to root of repository so it can be used directly … (#7548)
76ddae006 FlatBuffers Version 22.9.24 (#7547)
cfe157ec5 Emit internal enums when swift_implementation_only (#7545)
413115858 [Python] Python fixed size array (#7529)
88046190e Upgrade grpc to 1.49.0 and make sure it builds (#7538)
72aa85a75 [C++] Rare bad buffer content alignment if sizeof(T) != alignof(T) (#7520)
bfceebb7f Fix conform (#7532)

git-subtree-dir: third_party/flatbuffers
git-subtree-split: 8aa8b9139eb330f27816a5b8b5bbef402fbe3632
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Change-Id: I943faba499baf58e9f561b1e4734922188ba8626
diff --git a/tests/ts/my-game/example/ability.ts b/tests/ts/my-game/example/ability.ts
index 36b0eb8..b0bea8f 100644
--- a/tests/ts/my-game/example/ability.ts
+++ b/tests/ts/my-game/example/ability.ts
@@ -4,7 +4,7 @@
 
 
 
-export class Ability {
+export class Ability implements flatbuffers.IUnpackableObject<AbilityT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Ability {
@@ -61,7 +61,7 @@
 }
 }
 
-export class AbilityT {
+export class AbilityT implements flatbuffers.IGeneratedObject {
 constructor(
   public id: number = 0,
   public distance: number = 0
diff --git a/tests/ts/my-game/example/monster.js b/tests/ts/my-game/example/monster.js
index e4ef970..97c9399 100644
--- a/tests/ts/my-game/example/monster.js
+++ b/tests/ts/my-game/example/monster.js
@@ -526,11 +526,95 @@
         this.bb.writeUint64(this.bb_pos + offset, value);
         return true;
     }
+    nanDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 112);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : NaN;
+    }
+    mutate_nan_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 112);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    infDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 114);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 114);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    positiveInfDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 116);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_positive_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 116);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    infinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 118);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 118);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    positiveInfinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 120);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_positive_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 120);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    negativeInfDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 122);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity;
+    }
+    mutate_negative_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 122);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    negativeInfinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 124);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity;
+    }
+    mutate_negative_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 124);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
     static getFullyQualifiedName() {
         return 'MyGame_Example_Monster';
     }
     static startMonster(builder) {
-        builder.startObject(54);
+        builder.startObject(61);
     }
     static addPos(builder, posOffset) {
         builder.addFieldStruct(0, posOffset, 0);
@@ -870,6 +954,27 @@
     static addLongEnumNormalDefault(builder, longEnumNormalDefault) {
         builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2'));
     }
+    static addNanDefault(builder, nanDefault) {
+        builder.addFieldFloat32(54, nanDefault, NaN);
+    }
+    static addInfDefault(builder, infDefault) {
+        builder.addFieldFloat32(55, infDefault, Infinity);
+    }
+    static addPositiveInfDefault(builder, positiveInfDefault) {
+        builder.addFieldFloat32(56, positiveInfDefault, Infinity);
+    }
+    static addInfinityDefault(builder, infinityDefault) {
+        builder.addFieldFloat32(57, infinityDefault, Infinity);
+    }
+    static addPositiveInfinityDefault(builder, positiveInfinityDefault) {
+        builder.addFieldFloat32(58, positiveInfinityDefault, Infinity);
+    }
+    static addNegativeInfDefault(builder, negativeInfDefault) {
+        builder.addFieldFloat32(59, negativeInfDefault, -Infinity);
+    }
+    static addNegativeInfinityDefault(builder, negativeInfinityDefault) {
+        builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity);
+    }
     static endMonster(builder) {
         const offset = builder.endObject();
         builder.requiredField(offset, 10); // name
@@ -889,24 +994,24 @@
     }
     unpack() {
         return new MonsterT((this.pos() !== null ? this.pos().unpack() : null), this.mana(), this.hp(), this.name(), this.bb.createScalarList(this.inventory.bind(this), this.inventoryLength()), this.color(), this.testType(), (() => {
-            let temp = unionToAny(this.testType(), this.test.bind(this));
+            const temp = unionToAny(this.testType(), this.test.bind(this));
             if (temp === null) {
                 return null;
             }
             return temp.unpack();
         })(), this.bb.createObjList(this.test4.bind(this), this.test4Length()), this.bb.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()), this.bb.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()), (this.enemy() !== null ? this.enemy().unpack() : null), this.bb.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()), (this.testempty() !== null ? this.testempty().unpack() : null), this.testbool(), this.testhashs32Fnv1(), this.testhashu32Fnv1(), this.testhashs64Fnv1(), this.testhashu64Fnv1(), this.testhashs32Fnv1a(), this.testhashu32Fnv1a(), this.testhashs64Fnv1a(), this.testhashu64Fnv1a(), this.bb.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()), this.testf(), this.testf2(), this.testf3(), this.bb.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()), this.bb.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()), this.bb.createScalarList(this.flex.bind(this), this.flexLength()), this.bb.createObjList(this.test5.bind(this), this.test5Length()), this.bb.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()), this.bb.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()), (this.parentNamespaceTest() !== null ? this.parentNamespaceTest().unpack() : null), this.bb.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()), this.singleWeakReference(), this.bb.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()), this.bb.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()), this.coOwningReference(), this.bb.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()), this.nonOwningReference(), this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()), this.anyUniqueType(), (() => {
-            let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
             if (temp === null) {
                 return null;
             }
             return temp.unpack();
         })(), this.anyAmbiguousType(), (() => {
-            let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+            const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
             if (temp === null) {
                 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.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());
     }
     unpackTo(_o) {
         _o.pos = (this.pos() !== null ? this.pos().unpack() : null);
@@ -917,7 +1022,7 @@
         _o.color = this.color();
         _o.testType = this.testType();
         _o.test = (() => {
-            let temp = unionToAny(this.testType(), this.test.bind(this));
+            const temp = unionToAny(this.testType(), this.test.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -959,7 +1064,7 @@
         _o.vectorOfNonOwningReferences = this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
         _o.anyUniqueType = this.anyUniqueType();
         _o.anyUnique = (() => {
-            let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -967,7 +1072,7 @@
         })();
         _o.anyAmbiguousType = this.anyAmbiguousType();
         _o.anyAmbiguous = (() => {
-            let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+            const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -980,10 +1085,17 @@
         _o.nativeInline = (this.nativeInline() !== null ? this.nativeInline().unpack() : null);
         _o.longEnumNonEnumDefault = this.longEnumNonEnumDefault();
         _o.longEnumNormalDefault = this.longEnumNormalDefault();
+        _o.nanDefault = this.nanDefault();
+        _o.infDefault = this.infDefault();
+        _o.positiveInfDefault = this.positiveInfDefault();
+        _o.infinityDefault = this.infinityDefault();
+        _o.positiveInfinityDefault = this.positiveInfinityDefault();
+        _o.negativeInfDefault = this.negativeInfDefault();
+        _o.negativeInfinityDefault = this.negativeInfinityDefault();
     }
 }
 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')) {
+    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) {
         this.pos = pos;
         this.mana = mana;
         this.hp = hp;
@@ -1037,6 +1149,13 @@
         this.nativeInline = nativeInline;
         this.longEnumNonEnumDefault = longEnumNonEnumDefault;
         this.longEnumNormalDefault = longEnumNormalDefault;
+        this.nanDefault = nanDefault;
+        this.infDefault = infDefault;
+        this.positiveInfDefault = positiveInfDefault;
+        this.infinityDefault = infinityDefault;
+        this.positiveInfinityDefault = positiveInfinityDefault;
+        this.negativeInfDefault = negativeInfDefault;
+        this.negativeInfinityDefault = negativeInfinityDefault;
     }
     pack(builder) {
         const name = (this.name !== null ? builder.createString(this.name) : 0);
@@ -1120,6 +1239,13 @@
         Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline.pack(builder) : 0));
         Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault);
         Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault);
+        Monster.addNanDefault(builder, this.nanDefault);
+        Monster.addInfDefault(builder, this.infDefault);
+        Monster.addPositiveInfDefault(builder, this.positiveInfDefault);
+        Monster.addInfinityDefault(builder, this.infinityDefault);
+        Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault);
+        Monster.addNegativeInfDefault(builder, this.negativeInfDefault);
+        Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault);
         return Monster.endMonster(builder);
     }
 }
diff --git a/tests/ts/my-game/example/monster.ts b/tests/ts/my-game/example/monster.ts
index 63e5768..7e205ee 100644
--- a/tests/ts/my-game/example/monster.ts
+++ b/tests/ts/my-game/example/monster.ts
@@ -20,7 +20,7 @@
 /**
  * an example documentation comment: "monster object"
  */
-export class Monster {
+export class Monster implements flatbuffers.IUnpackableObject<MonsterT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Monster {
@@ -683,12 +683,140 @@
   return true;
 }
 
+nanDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 112);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : NaN;
+}
+
+mutate_nan_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 112);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+infDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 114);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_inf_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 114);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+positiveInfDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 116);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_positive_inf_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 116);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+infinityDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 118);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_infinity_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 118);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+positiveInfinityDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 120);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_positive_infinity_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 120);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+negativeInfDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 122);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity;
+}
+
+mutate_negative_inf_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 122);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+negativeInfinityDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 124);
+  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity;
+}
+
+mutate_negative_infinity_default(value:number):boolean {
+  const offset = this.bb!.__offset(this.bb_pos, 124);
+
+  if (offset === 0) {
+    return false;
+  }
+
+  this.bb!.writeFloat32(this.bb_pos + offset, value);
+  return true;
+}
+
+doubleInfDefault():number {
+  const offset = this.bb!.__offset(this.bb_pos, 126);
+  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : Infinity;
+}
+
+mutate_double_inf_default(value:number):boolean {
+  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():string {
   return 'MyGame_Example_Monster';
 }
 
 static startMonster(builder:flatbuffers.Builder) {
-  builder.startObject(54);
+  builder.startObject(62);
 }
 
 static addPos(builder:flatbuffers.Builder, posOffset:flatbuffers.Offset) {
@@ -1124,6 +1252,38 @@
   builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2'));
 }
 
+static addNanDefault(builder:flatbuffers.Builder, nanDefault:number) {
+  builder.addFieldFloat32(54, nanDefault, NaN);
+}
+
+static addInfDefault(builder:flatbuffers.Builder, infDefault:number) {
+  builder.addFieldFloat32(55, infDefault, Infinity);
+}
+
+static addPositiveInfDefault(builder:flatbuffers.Builder, positiveInfDefault:number) {
+  builder.addFieldFloat32(56, positiveInfDefault, Infinity);
+}
+
+static addInfinityDefault(builder:flatbuffers.Builder, infinityDefault:number) {
+  builder.addFieldFloat32(57, infinityDefault, Infinity);
+}
+
+static addPositiveInfinityDefault(builder:flatbuffers.Builder, positiveInfinityDefault:number) {
+  builder.addFieldFloat32(58, positiveInfinityDefault, Infinity);
+}
+
+static addNegativeInfDefault(builder:flatbuffers.Builder, negativeInfDefault:number) {
+  builder.addFieldFloat32(59, negativeInfDefault, -Infinity);
+}
+
+static addNegativeInfinityDefault(builder:flatbuffers.Builder, negativeInfinityDefault:number) {
+  builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity);
+}
+
+static addDoubleInfDefault(builder:flatbuffers.Builder, doubleInfDefault:number) {
+  builder.addFieldFloat64(61, doubleInfDefault, Infinity);
+}
+
 static endMonster(builder:flatbuffers.Builder):flatbuffers.Offset {
   const offset = builder.endObject();
   builder.requiredField(offset, 10) // name
@@ -1153,19 +1313,19 @@
     this.mana(),
     this.hp(),
     this.name(),
-    this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()),
+    this.bb!.createScalarList<number>(this.inventory.bind(this), this.inventoryLength()),
     this.color(),
     this.testType(),
     (() => {
-      let temp = unionToAny(this.testType(), this.test.bind(this));
+      const temp = unionToAny(this.testType(), this.test.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })(),
-    this.bb!.createObjList(this.test4.bind(this), this.test4Length()),
-    this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()),
-    this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()),
+    this.bb!.createObjList<Test, TestT>(this.test4.bind(this), this.test4Length()),
+    this.bb!.createScalarList<string>(this.testarrayofstring.bind(this), this.testarrayofstringLength()),
+    this.bb!.createObjList<Monster, MonsterT>(this.testarrayoftables.bind(this), this.testarrayoftablesLength()),
     (this.enemy() !== null ? this.enemy()!.unpack() : null),
-    this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()),
+    this.bb!.createScalarList<number>(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()),
     (this.testempty() !== null ? this.testempty()!.unpack() : null),
     this.testbool(),
     this.testhashs32Fnv1(),
@@ -1176,44 +1336,52 @@
     this.testhashu32Fnv1a(),
     this.testhashs64Fnv1a(),
     this.testhashu64Fnv1a(),
-    this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()),
+    this.bb!.createScalarList<boolean>(this.testarrayofbools.bind(this), this.testarrayofboolsLength()),
     this.testf(),
     this.testf2(),
     this.testf3(),
-    this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()),
-    this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()),
-    this.bb!.createScalarList(this.flex.bind(this), this.flexLength()),
-    this.bb!.createObjList(this.test5.bind(this), this.test5Length()),
-    this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()),
-    this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()),
+    this.bb!.createScalarList<string>(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()),
+    this.bb!.createObjList<Ability, AbilityT>(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()),
+    this.bb!.createScalarList<number>(this.flex.bind(this), this.flexLength()),
+    this.bb!.createObjList<Test, TestT>(this.test5.bind(this), this.test5Length()),
+    this.bb!.createScalarList<bigint>(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()),
+    this.bb!.createScalarList<number>(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()),
     (this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null),
-    this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()),
+    this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()),
     this.singleWeakReference(),
-    this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()),
-    this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()),
+    this.bb!.createScalarList<bigint>(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()),
+    this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()),
     this.coOwningReference(),
-    this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()),
+    this.bb!.createScalarList<bigint>(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()),
     this.nonOwningReference(),
-    this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()),
+    this.bb!.createScalarList<bigint>(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()),
     this.anyUniqueType(),
     (() => {
-      let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+      const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })(),
     this.anyAmbiguousType(),
     (() => {
-      let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+      const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })(),
-    this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()),
+    this.bb!.createScalarList<Color>(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.bb!.createScalarList<number>(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()),
+    this.bb!.createObjList<Stat, StatT>(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()),
     (this.nativeInline() !== null ? this.nativeInline()!.unpack() : null),
     this.longEnumNonEnumDefault(),
-    this.longEnumNormalDefault()
+    this.longEnumNormalDefault(),
+    this.nanDefault(),
+    this.infDefault(),
+    this.positiveInfDefault(),
+    this.infinityDefault(),
+    this.positiveInfinityDefault(),
+    this.negativeInfDefault(),
+    this.negativeInfinityDefault(),
+    this.doubleInfDefault()
   );
 }
 
@@ -1223,19 +1391,19 @@
   _o.mana = this.mana();
   _o.hp = this.hp();
   _o.name = this.name();
-  _o.inventory = this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength());
+  _o.inventory = this.bb!.createScalarList<number>(this.inventory.bind(this), this.inventoryLength());
   _o.color = this.color();
   _o.testType = this.testType();
   _o.test = (() => {
-      let temp = unionToAny(this.testType(), this.test.bind(this));
+      const temp = unionToAny(this.testType(), this.test.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })();
-  _o.test4 = this.bb!.createObjList(this.test4.bind(this), this.test4Length());
-  _o.testarrayofstring = this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength());
-  _o.testarrayoftables = this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength());
+  _o.test4 = this.bb!.createObjList<Test, TestT>(this.test4.bind(this), this.test4Length());
+  _o.testarrayofstring = this.bb!.createScalarList<string>(this.testarrayofstring.bind(this), this.testarrayofstringLength());
+  _o.testarrayoftables = this.bb!.createObjList<Monster, MonsterT>(this.testarrayoftables.bind(this), this.testarrayoftablesLength());
   _o.enemy = (this.enemy() !== null ? this.enemy()!.unpack() : null);
-  _o.testnestedflatbuffer = this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength());
+  _o.testnestedflatbuffer = this.bb!.createScalarList<number>(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength());
   _o.testempty = (this.testempty() !== null ? this.testempty()!.unpack() : null);
   _o.testbool = this.testbool();
   _o.testhashs32Fnv1 = this.testhashs32Fnv1();
@@ -1246,48 +1414,56 @@
   _o.testhashu32Fnv1a = this.testhashu32Fnv1a();
   _o.testhashs64Fnv1a = this.testhashs64Fnv1a();
   _o.testhashu64Fnv1a = this.testhashu64Fnv1a();
-  _o.testarrayofbools = this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength());
+  _o.testarrayofbools = this.bb!.createScalarList<boolean>(this.testarrayofbools.bind(this), this.testarrayofboolsLength());
   _o.testf = this.testf();
   _o.testf2 = this.testf2();
   _o.testf3 = this.testf3();
-  _o.testarrayofstring2 = this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length());
-  _o.testarrayofsortedstruct = this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength());
-  _o.flex = this.bb!.createScalarList(this.flex.bind(this), this.flexLength());
-  _o.test5 = this.bb!.createObjList(this.test5.bind(this), this.test5Length());
-  _o.vectorOfLongs = this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength());
-  _o.vectorOfDoubles = this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength());
+  _o.testarrayofstring2 = this.bb!.createScalarList<string>(this.testarrayofstring2.bind(this), this.testarrayofstring2Length());
+  _o.testarrayofsortedstruct = this.bb!.createObjList<Ability, AbilityT>(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength());
+  _o.flex = this.bb!.createScalarList<number>(this.flex.bind(this), this.flexLength());
+  _o.test5 = this.bb!.createObjList<Test, TestT>(this.test5.bind(this), this.test5Length());
+  _o.vectorOfLongs = this.bb!.createScalarList<bigint>(this.vectorOfLongs.bind(this), this.vectorOfLongsLength());
+  _o.vectorOfDoubles = this.bb!.createScalarList<number>(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength());
   _o.parentNamespaceTest = (this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null);
-  _o.vectorOfReferrables = this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength());
+  _o.vectorOfReferrables = this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength());
   _o.singleWeakReference = this.singleWeakReference();
-  _o.vectorOfWeakReferences = this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength());
-  _o.vectorOfStrongReferrables = this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength());
+  _o.vectorOfWeakReferences = this.bb!.createScalarList<bigint>(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength());
+  _o.vectorOfStrongReferrables = this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength());
   _o.coOwningReference = this.coOwningReference();
-  _o.vectorOfCoOwningReferences = this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength());
+  _o.vectorOfCoOwningReferences = this.bb!.createScalarList<bigint>(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength());
   _o.nonOwningReference = this.nonOwningReference();
-  _o.vectorOfNonOwningReferences = this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
+  _o.vectorOfNonOwningReferences = this.bb!.createScalarList<bigint>(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
   _o.anyUniqueType = this.anyUniqueType();
   _o.anyUnique = (() => {
-      let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+      const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })();
   _o.anyAmbiguousType = this.anyAmbiguousType();
   _o.anyAmbiguous = (() => {
-      let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+      const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
       if(temp === null) { return null; }
       return temp.unpack()
   })();
-  _o.vectorOfEnums = this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength());
+  _o.vectorOfEnums = this.bb!.createScalarList<Color>(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength());
   _o.signedEnum = this.signedEnum();
-  _o.testrequirednestedflatbuffer = this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength());
-  _o.scalarKeySortedTables = this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength());
+  _o.testrequirednestedflatbuffer = this.bb!.createScalarList<number>(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength());
+  _o.scalarKeySortedTables = this.bb!.createObjList<Stat, StatT>(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength());
   _o.nativeInline = (this.nativeInline() !== null ? this.nativeInline()!.unpack() : null);
   _o.longEnumNonEnumDefault = this.longEnumNonEnumDefault();
   _o.longEnumNormalDefault = this.longEnumNormalDefault();
+  _o.nanDefault = this.nanDefault();
+  _o.infDefault = this.infDefault();
+  _o.positiveInfDefault = this.positiveInfDefault();
+  _o.infinityDefault = this.infinityDefault();
+  _o.positiveInfinityDefault = this.positiveInfinityDefault();
+  _o.negativeInfDefault = this.negativeInfDefault();
+  _o.negativeInfinityDefault = this.negativeInfinityDefault();
+  _o.doubleInfDefault = this.doubleInfDefault();
 }
 }
 
-export class MonsterT {
+export class MonsterT implements flatbuffers.IGeneratedObject {
 constructor(
   public pos: Vec3T|null = null,
   public mana: number = 150,
@@ -1341,7 +1517,15 @@
   public scalarKeySortedTables: (StatT)[] = [],
   public nativeInline: TestT|null = null,
   public longEnumNonEnumDefault: bigint = BigInt('0'),
-  public longEnumNormalDefault: bigint = BigInt('2')
+  public longEnumNormalDefault: bigint = BigInt('2'),
+  public nanDefault: number = NaN,
+  public infDefault: number = Infinity,
+  public positiveInfDefault: number = Infinity,
+  public infinityDefault: number = Infinity,
+  public positiveInfinityDefault: number = Infinity,
+  public negativeInfDefault: number = -Infinity,
+  public negativeInfinityDefault: number = -Infinity,
+  public doubleInfDefault: number = Infinity
 ){}
 
 
@@ -1428,6 +1612,14 @@
   Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline!.pack(builder) : 0));
   Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault);
   Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault);
+  Monster.addNanDefault(builder, this.nanDefault);
+  Monster.addInfDefault(builder, this.infDefault);
+  Monster.addPositiveInfDefault(builder, this.positiveInfDefault);
+  Monster.addInfinityDefault(builder, this.infinityDefault);
+  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/referrable.ts b/tests/ts/my-game/example/referrable.ts
index ec02980..5260362 100644
--- a/tests/ts/my-game/example/referrable.ts
+++ b/tests/ts/my-game/example/referrable.ts
@@ -4,7 +4,7 @@
 
 
 
-export class Referrable {
+export class Referrable implements flatbuffers.IUnpackableObject<ReferrableT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Referrable {
@@ -81,7 +81,7 @@
 }
 }
 
-export class ReferrableT {
+export class ReferrableT implements flatbuffers.IGeneratedObject {
 constructor(
   public id: bigint = BigInt('0')
 ){}
diff --git a/tests/ts/my-game/example/stat.ts b/tests/ts/my-game/example/stat.ts
index e452599..c1597b2 100644
--- a/tests/ts/my-game/example/stat.ts
+++ b/tests/ts/my-game/example/stat.ts
@@ -4,7 +4,7 @@
 
 
 
-export class Stat {
+export class Stat implements flatbuffers.IUnpackableObject<StatT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Stat {
@@ -118,7 +118,7 @@
 }
 }
 
-export class StatT {
+export class StatT implements flatbuffers.IGeneratedObject {
 constructor(
   public id: string|Uint8Array|null = null,
   public val: bigint = BigInt('0'),
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 52efc12..fa17939 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
@@ -5,7 +5,7 @@
 import { StructOfStructs, StructOfStructsT } from '../../my-game/example/struct-of-structs.js';
 
 
-export class StructOfStructsOfStructs {
+export class StructOfStructsOfStructs implements flatbuffers.IUnpackableObject<StructOfStructsOfStructsT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructsOfStructs {
@@ -55,7 +55,7 @@
 }
 }
 
-export class StructOfStructsOfStructsT {
+export class StructOfStructsOfStructsT implements flatbuffers.IGeneratedObject {
 constructor(
   public a: StructOfStructsT|null = null
 ){}
diff --git a/tests/ts/my-game/example/struct-of-structs.ts b/tests/ts/my-game/example/struct-of-structs.ts
index 749a73c..10d3607 100644
--- a/tests/ts/my-game/example/struct-of-structs.ts
+++ b/tests/ts/my-game/example/struct-of-structs.ts
@@ -6,7 +6,7 @@
 import { Test, TestT } from '../../my-game/example/test.js';
 
 
-export class StructOfStructs {
+export class StructOfStructs implements flatbuffers.IUnpackableObject<StructOfStructsT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructs {
@@ -67,7 +67,7 @@
 }
 }
 
-export class StructOfStructsT {
+export class StructOfStructsT implements flatbuffers.IGeneratedObject {
 constructor(
   public a: AbilityT|null = null,
   public b: TestT|null = null,
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 cfca00b..903ab99 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
@@ -5,7 +5,7 @@
 import { Color } from '../../my-game/example/color.js';
 
 
-export class TestSimpleTableWithEnum {
+export class TestSimpleTableWithEnum implements flatbuffers.IUnpackableObject<TestSimpleTableWithEnumT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):TestSimpleTableWithEnum {
@@ -82,7 +82,7 @@
 }
 }
 
-export class TestSimpleTableWithEnumT {
+export class TestSimpleTableWithEnumT implements flatbuffers.IGeneratedObject {
 constructor(
   public color: Color = Color.Green
 ){}
diff --git a/tests/ts/my-game/example/test.ts b/tests/ts/my-game/example/test.ts
index b3d84ee..7484f2c 100644
--- a/tests/ts/my-game/example/test.ts
+++ b/tests/ts/my-game/example/test.ts
@@ -4,7 +4,7 @@
 
 
 
-export class Test {
+export class Test implements flatbuffers.IUnpackableObject<TestT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Test {
@@ -62,7 +62,7 @@
 }
 }
 
-export class TestT {
+export class TestT implements flatbuffers.IGeneratedObject {
 constructor(
   public a: number = 0,
   public b: number = 0
diff --git a/tests/ts/my-game/example/type-aliases.ts b/tests/ts/my-game/example/type-aliases.ts
index 805c8cf..93262d7 100644
--- a/tests/ts/my-game/example/type-aliases.ts
+++ b/tests/ts/my-game/example/type-aliases.ts
@@ -4,7 +4,7 @@
 
 
 
-export class TypeAliases {
+export class TypeAliases implements flatbuffers.IUnpackableObject<TypeAliasesT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):TypeAliases {
@@ -344,8 +344,8 @@
     this.u64(),
     this.f32(),
     this.f64(),
-    this.bb!.createScalarList(this.v8.bind(this), this.v8Length()),
-    this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length())
+    this.bb!.createScalarList<number>(this.v8.bind(this), this.v8Length()),
+    this.bb!.createScalarList<number>(this.vf64.bind(this), this.vf64Length())
   );
 }
 
@@ -361,12 +361,12 @@
   _o.u64 = this.u64();
   _o.f32 = this.f32();
   _o.f64 = this.f64();
-  _o.v8 = this.bb!.createScalarList(this.v8.bind(this), this.v8Length());
-  _o.vf64 = this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length());
+  _o.v8 = this.bb!.createScalarList<number>(this.v8.bind(this), this.v8Length());
+  _o.vf64 = this.bb!.createScalarList<number>(this.vf64.bind(this), this.vf64Length());
 }
 }
 
-export class TypeAliasesT {
+export class TypeAliasesT implements flatbuffers.IGeneratedObject {
 constructor(
   public i8: number = 0,
   public u8: number = 0,
diff --git a/tests/ts/my-game/example/vec3.ts b/tests/ts/my-game/example/vec3.ts
index bc4c473..84516e0 100644
--- a/tests/ts/my-game/example/vec3.ts
+++ b/tests/ts/my-game/example/vec3.ts
@@ -6,7 +6,7 @@
 import { Test, TestT } from '../../my-game/example/test.js';
 
 
-export class Vec3 {
+export class Vec3 implements flatbuffers.IUnpackableObject<Vec3T> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Vec3 {
@@ -112,7 +112,7 @@
 }
 }
 
-export class Vec3T {
+export class Vec3T implements flatbuffers.IGeneratedObject {
 constructor(
   public x: number = 0.0,
   public y: number = 0.0,
diff --git a/tests/ts/my-game/example2/monster.ts b/tests/ts/my-game/example2/monster.ts
index 7240476..0714486 100644
--- a/tests/ts/my-game/example2/monster.ts
+++ b/tests/ts/my-game/example2/monster.ts
@@ -4,7 +4,7 @@
 
 
 
-export class Monster {
+export class Monster implements flatbuffers.IUnpackableObject<MonsterT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):Monster {
@@ -56,7 +56,7 @@
 unpackTo(_o: MonsterT): void {}
 }
 
-export class MonsterT {
+export class MonsterT implements flatbuffers.IGeneratedObject {
 constructor(){}
 
 
diff --git a/tests/ts/my-game/in-parent-namespace.ts b/tests/ts/my-game/in-parent-namespace.ts
index 0de94df..0e2f412 100644
--- a/tests/ts/my-game/in-parent-namespace.ts
+++ b/tests/ts/my-game/in-parent-namespace.ts
@@ -4,7 +4,7 @@
 
 
 
-export class InParentNamespace {
+export class InParentNamespace implements flatbuffers.IUnpackableObject<InParentNamespaceT> {
   bb: flatbuffers.ByteBuffer|null = null;
   bb_pos = 0;
   __init(i:number, bb:flatbuffers.ByteBuffer):InParentNamespace {
@@ -56,7 +56,7 @@
 unpackTo(_o: InParentNamespaceT): void {}
 }
 
-export class InParentNamespaceT {
+export class InParentNamespaceT implements flatbuffers.IGeneratedObject {
 constructor(){}