bulk code format fix (#8707)

diff --git a/Package.swift b/Package.swift
index 0d2b5a3..57ce61e 100644
--- a/Package.swift
+++ b/Package.swift
@@ -57,10 +57,10 @@
 extension Array where Element == Package.Dependency {
   static var dependencies: [Package.Dependency] {
     #if os(Windows)
-    []
+      []
     #else
-    // Test only Dependency
-    [.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.4.1")]
+      // Test only Dependency
+      [.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.4.1")]
     #endif
   }
 }
@@ -68,13 +68,13 @@
 extension Array where Element == PackageDescription.Target.Dependency {
   static var dependencies: [PackageDescription.Target.Dependency] {
     #if os(Windows)
-    ["FlatBuffers"]
+      ["FlatBuffers"]
     #else
-    // Test only Dependency
-    [
-      .product(name: "GRPC", package: "grpc-swift"),
-      "FlatBuffers",
-    ]
+      // Test only Dependency
+      [
+        .product(name: "GRPC", package: "grpc-swift"),
+        "FlatBuffers",
+      ]
     #endif
   }
 }
diff --git a/android/app/src/main/cpp/generated/animal_generated.h b/android/app/src/main/cpp/generated/animal_generated.h
index 21d92f8..a34bce4 100644
--- a/android/app/src/main/cpp/generated/animal_generated.h
+++ b/android/app/src/main/cpp/generated/animal_generated.h
@@ -1,6 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-
 #ifndef FLATBUFFERS_GENERATED_ANIMAL_COM_FBS_APP_H_
 #define FLATBUFFERS_GENERATED_ANIMAL_COM_FBS_APP_H_
 
@@ -9,9 +8,9 @@
 // Ensure the included flatbuffers.h is the same version as when this file was
 // generated, otherwise it may not be compatible.
 static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
-              FLATBUFFERS_VERSION_MINOR == 12 &&
-              FLATBUFFERS_VERSION_REVISION == 23,
-             "Non-compatible flatbuffers version included");
+                  FLATBUFFERS_VERSION_MINOR == 12 &&
+                  FLATBUFFERS_VERSION_REVISION == 23,
+              "Non-compatible flatbuffers version included");
 
 namespace com {
 namespace fbs {
@@ -27,29 +26,24 @@
     VT_SOUND = 6,
     VT_WEIGHT = 8
   };
-  const ::flatbuffers::String *name() const {
-    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
+  const ::flatbuffers::String* name() const {
+    return GetPointer<const ::flatbuffers::String*>(VT_NAME);
   }
-  const ::flatbuffers::String *sound() const {
-    return GetPointer<const ::flatbuffers::String *>(VT_SOUND);
+  const ::flatbuffers::String* sound() const {
+    return GetPointer<const ::flatbuffers::String*>(VT_SOUND);
   }
-  uint16_t weight() const {
-    return GetField<uint16_t>(VT_WEIGHT, 0);
-  }
-  bool Verify(::flatbuffers::Verifier &verifier) const {
-    return VerifyTableStart(verifier) &&
-           VerifyOffset(verifier, VT_NAME) &&
-           verifier.VerifyString(name()) &&
-           VerifyOffset(verifier, VT_SOUND) &&
+  uint16_t weight() const { return GetField<uint16_t>(VT_WEIGHT, 0); }
+  bool Verify(::flatbuffers::Verifier& verifier) const {
+    return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_NAME) &&
+           verifier.VerifyString(name()) && VerifyOffset(verifier, VT_SOUND) &&
            verifier.VerifyString(sound()) &&
-           VerifyField<uint16_t>(verifier, VT_WEIGHT, 2) &&
-           verifier.EndTable();
+           VerifyField<uint16_t>(verifier, VT_WEIGHT, 2) && verifier.EndTable();
   }
 };
 
 struct AnimalBuilder {
   typedef Animal Table;
-  ::flatbuffers::FlatBufferBuilder &fbb_;
+  ::flatbuffers::FlatBufferBuilder& fbb_;
   ::flatbuffers::uoffset_t start_;
   void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
     fbb_.AddOffset(Animal::VT_NAME, name);
@@ -60,8 +54,7 @@
   void add_weight(uint16_t weight) {
     fbb_.AddElement<uint16_t>(Animal::VT_WEIGHT, weight, 0);
   }
-  explicit AnimalBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
-        : fbb_(_fbb) {
+  explicit AnimalBuilder(::flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) {
     start_ = fbb_.StartTable();
   }
   ::flatbuffers::Offset<Animal> Finish() {
@@ -72,7 +65,7 @@
 };
 
 inline ::flatbuffers::Offset<Animal> CreateAnimal(
-    ::flatbuffers::FlatBufferBuilder &_fbb,
+    ::flatbuffers::FlatBufferBuilder& _fbb,
     ::flatbuffers::Offset<::flatbuffers::String> name = 0,
     ::flatbuffers::Offset<::flatbuffers::String> sound = 0,
     uint16_t weight = 0) {
@@ -84,45 +77,37 @@
 }
 
 inline ::flatbuffers::Offset<Animal> CreateAnimalDirect(
-    ::flatbuffers::FlatBufferBuilder &_fbb,
-    const char *name = nullptr,
-    const char *sound = nullptr,
-    uint16_t weight = 0) {
+    ::flatbuffers::FlatBufferBuilder& _fbb, const char* name = nullptr,
+    const char* sound = nullptr, uint16_t weight = 0) {
   auto name__ = name ? _fbb.CreateString(name) : 0;
   auto sound__ = sound ? _fbb.CreateString(sound) : 0;
-  return com::fbs::app::CreateAnimal(
-      _fbb,
-      name__,
-      sound__,
-      weight);
+  return com::fbs::app::CreateAnimal(_fbb, name__, sound__, weight);
 }
 
-inline const com::fbs::app::Animal *GetAnimal(const void *buf) {
+inline const com::fbs::app::Animal* GetAnimal(const void* buf) {
   return ::flatbuffers::GetRoot<com::fbs::app::Animal>(buf);
 }
 
-inline const com::fbs::app::Animal *GetSizePrefixedAnimal(const void *buf) {
+inline const com::fbs::app::Animal* GetSizePrefixedAnimal(const void* buf) {
   return ::flatbuffers::GetSizePrefixedRoot<com::fbs::app::Animal>(buf);
 }
 
-inline bool VerifyAnimalBuffer(
-    ::flatbuffers::Verifier &verifier) {
+inline bool VerifyAnimalBuffer(::flatbuffers::Verifier& verifier) {
   return verifier.VerifyBuffer<com::fbs::app::Animal>(nullptr);
 }
 
-inline bool VerifySizePrefixedAnimalBuffer(
-    ::flatbuffers::Verifier &verifier) {
+inline bool VerifySizePrefixedAnimalBuffer(::flatbuffers::Verifier& verifier) {
   return verifier.VerifySizePrefixedBuffer<com::fbs::app::Animal>(nullptr);
 }
 
 inline void FinishAnimalBuffer(
-    ::flatbuffers::FlatBufferBuilder &fbb,
+    ::flatbuffers::FlatBufferBuilder& fbb,
     ::flatbuffers::Offset<com::fbs::app::Animal> root) {
   fbb.Finish(root);
 }
 
 inline void FinishSizePrefixedAnimalBuffer(
-    ::flatbuffers::FlatBufferBuilder &fbb,
+    ::flatbuffers::FlatBufferBuilder& fbb,
     ::flatbuffers::Offset<com::fbs::app::Animal> root) {
   fbb.FinishSizePrefixed(root);
 }
diff --git a/android/app/src/main/java/com/flatbuffers/app/MainActivity.kt b/android/app/src/main/java/com/flatbuffers/app/MainActivity.kt
index cdc3573..8bf7a1c 100644
--- a/android/app/src/main/java/com/flatbuffers/app/MainActivity.kt
+++ b/android/app/src/main/java/com/flatbuffers/app/MainActivity.kt
@@ -1,9 +1,9 @@
 package com.flatbuffers.app
 
 import android.annotation.SuppressLint
-import androidx.appcompat.app.AppCompatActivity
 import android.os.Bundle
 import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
 import com.fbs.app.Animal
 import com.google.flatbuffers.FlatBufferBuilder
 import java.nio.ByteBuffer
@@ -27,14 +27,15 @@
   private external fun createAnimalFromJNI(): ByteArray
 
   // Create a "Cow" Animal flatbuffers from Kotlin
-  private fun createAnimalFromKotlin():Animal {
+  private fun createAnimalFromKotlin(): Animal {
     val fb = FlatBufferBuilder(100)
-    val cowOffset = Animal.createAnimal(
-      builder = fb,
-      nameOffset = fb.createString("Cow"),
-      soundOffset = fb.createString("Moo"),
-      weight = 720u
-    )
+    val cowOffset =
+      Animal.createAnimal(
+        builder = fb,
+        nameOffset = fb.createString("Cow"),
+        soundOffset = fb.createString("Moo"),
+        weight = 720u,
+      )
     fb.finish(cowOffset)
     return Animal.getRootAsAnimal(fb.dataBuffer())
   }
diff --git a/android/app/src/main/java/generated/com/fbs/app/Animal.kt b/android/app/src/main/java/generated/com/fbs/app/Animal.kt
index ffa8e0a..5d4ab03 100644
--- a/android/app/src/main/java/generated/com/fbs/app/Animal.kt
+++ b/android/app/src/main/java/generated/com/fbs/app/Animal.kt
@@ -2,83 +2,101 @@
 
 package com.fbs.app
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
 import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
-import com.google.flatbuffers.Struct
 import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @kotlin.ExperimentalUnsignedTypes
 class Animal : Table() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): Animal {
+    __init(_i, _bb)
+    return this
+  }
+
+  val name: String?
+    get() {
+      val o = __offset(4)
+      return if (o != 0) {
+        __string(o + bb_pos)
+      } else {
+        null
+      }
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : Animal {
-        __init(_i, _bb)
-        return this
+
+  val nameAsByteBuffer: ByteBuffer
+    get() = __vector_as_bytebuffer(4, 1)
+
+  fun nameInByteBuffer(_bb: ByteBuffer): ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1)
+
+  val sound: String?
+    get() {
+      val o = __offset(6)
+      return if (o != 0) {
+        __string(o + bb_pos)
+      } else {
+        null
+      }
     }
-    val name : String?
-        get() {
-            val o = __offset(4)
-            return if (o != 0) {
-                __string(o + bb_pos)
-            } else {
-                null
-            }
-        }
-    val nameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1)
-    fun nameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1)
-    val sound : String?
-        get() {
-            val o = __offset(6)
-            return if (o != 0) {
-                __string(o + bb_pos)
-            } else {
-                null
-            }
-        }
-    val soundAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1)
-    fun soundInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1)
-    val weight : UShort
-        get() {
-            val o = __offset(8)
-            return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u
-        }
-    companion object {
-        fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
-        fun getRootAsAnimal(_bb: ByteBuffer): Animal = getRootAsAnimal(_bb, Animal())
-        fun getRootAsAnimal(_bb: ByteBuffer, obj: Animal): Animal {
-            _bb.order(ByteOrder.LITTLE_ENDIAN)
-            return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
-        }
-        fun createAnimal(builder: FlatBufferBuilder, nameOffset: Int, soundOffset: Int, weight: UShort) : Int {
-            builder.startTable(3)
-            addSound(builder, soundOffset)
-            addName(builder, nameOffset)
-            addWeight(builder, weight)
-            return endAnimal(builder)
-        }
-        fun startAnimal(builder: FlatBufferBuilder) = builder.startTable(3)
-        fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(0, name, 0)
-        fun addSound(builder: FlatBufferBuilder, sound: Int) = builder.addOffset(1, sound, 0)
-        fun addWeight(builder: FlatBufferBuilder, weight: UShort) = builder.addShort(2, weight.toShort(), 0)
-        fun endAnimal(builder: FlatBufferBuilder) : Int {
-            val o = builder.endTable()
-            return o
-        }
-        fun finishAnimalBuffer(builder: FlatBufferBuilder, offset: Int) = builder.finish(offset)
-        fun finishSizePrefixedAnimalBuffer(builder: FlatBufferBuilder, offset: Int) = builder.finishSizePrefixed(offset)
+
+  val soundAsByteBuffer: ByteBuffer
+    get() = __vector_as_bytebuffer(6, 1)
+
+  fun soundInByteBuffer(_bb: ByteBuffer): ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1)
+
+  val weight: UShort
+    get() {
+      val o = __offset(8)
+      return if (o != 0) bb.getShort(o + bb_pos).toUShort() else 0u
     }
+
+  companion object {
+    fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
+
+    fun getRootAsAnimal(_bb: ByteBuffer): Animal = getRootAsAnimal(_bb, Animal())
+
+    fun getRootAsAnimal(_bb: ByteBuffer, obj: Animal): Animal {
+      _bb.order(ByteOrder.LITTLE_ENDIAN)
+      return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
+    }
+
+    fun createAnimal(
+      builder: FlatBufferBuilder,
+      nameOffset: Int,
+      soundOffset: Int,
+      weight: UShort,
+    ): Int {
+      builder.startTable(3)
+      addSound(builder, soundOffset)
+      addName(builder, nameOffset)
+      addWeight(builder, weight)
+      return endAnimal(builder)
+    }
+
+    fun startAnimal(builder: FlatBufferBuilder) = builder.startTable(3)
+
+    fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(0, name, 0)
+
+    fun addSound(builder: FlatBufferBuilder, sound: Int) = builder.addOffset(1, sound, 0)
+
+    fun addWeight(builder: FlatBufferBuilder, weight: UShort) =
+      builder.addShort(2, weight.toShort(), 0)
+
+    fun endAnimal(builder: FlatBufferBuilder): Int {
+      val o = builder.endTable()
+      return o
+    }
+
+    fun finishAnimalBuffer(builder: FlatBufferBuilder, offset: Int) = builder.finish(offset)
+
+    fun finishSizePrefixedAnimalBuffer(builder: FlatBufferBuilder, offset: Int) =
+      builder.finishSizePrefixed(offset)
+  }
 }
diff --git a/benchmarks/cpp/bench.h b/benchmarks/cpp/bench.h
index ad4baeb..f358d21 100644
--- a/benchmarks/cpp/bench.h
+++ b/benchmarks/cpp/bench.h
@@ -8,12 +8,12 @@
 
   inline void Add(int64_t value) { sum += value; }
 
-  virtual uint8_t *Encode(void *buf, int64_t &len) = 0;
-  virtual void *Decode(void *buf, int64_t len) = 0;
-  virtual int64_t Use(void *decoded) = 0;
-  virtual void Dealloc(void *decoded) = 0;
+  virtual uint8_t* Encode(void* buf, int64_t& len) = 0;
+  virtual void* Decode(void* buf, int64_t len) = 0;
+  virtual int64_t Use(void* decoded) = 0;
+  virtual void Dealloc(void* decoded) = 0;
 
   int64_t sum = 0;
 };
 
-#endif // BENCHMARKS_CPP_BENCH_H_
\ No newline at end of file
+#endif  // BENCHMARKS_CPP_BENCH_H_
\ No newline at end of file
diff --git a/benchmarks/cpp/flatbuffers/bench_generated.h b/benchmarks/cpp/flatbuffers/bench_generated.h
index f5f04bd..e53a868 100644
--- a/benchmarks/cpp/flatbuffers/bench_generated.h
+++ b/benchmarks/cpp/flatbuffers/bench_generated.h
@@ -1,6 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-
 #ifndef FLATBUFFERS_GENERATED_BENCH_BENCHMARKS_FLATBUFFERS_H_
 #define FLATBUFFERS_GENERATED_BENCH_BENCHMARKS_FLATBUFFERS_H_
 
@@ -9,9 +8,9 @@
 // Ensure the included flatbuffers.h is the same version as when this file was
 // generated, otherwise it may not be compatible.
 static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
-              FLATBUFFERS_VERSION_MINOR == 12 &&
-              FLATBUFFERS_VERSION_REVISION == 23,
-             "Non-compatible flatbuffers version included");
+                  FLATBUFFERS_VERSION_MINOR == 12 &&
+                  FLATBUFFERS_VERSION_REVISION == 23,
+              "Non-compatible flatbuffers version included");
 
 namespace benchmarks_flatbuffers {
 
@@ -34,25 +33,16 @@
 };
 
 inline const Enum (&EnumValuesEnum())[3] {
-  static const Enum values[] = {
-    Enum_Apples,
-    Enum_Pears,
-    Enum_Bananas
-  };
+  static const Enum values[] = {Enum_Apples, Enum_Pears, Enum_Bananas};
   return values;
 }
 
-inline const char * const *EnumNamesEnum() {
-  static const char * const names[4] = {
-    "Apples",
-    "Pears",
-    "Bananas",
-    nullptr
-  };
+inline const char* const* EnumNamesEnum() {
+  static const char* const names[4] = {"Apples", "Pears", "Bananas", nullptr};
   return names;
 }
 
-inline const char *EnumNameEnum(Enum e) {
+inline const char* EnumNameEnum(Enum e) {
   if (flatbuffers::IsOutRange(e, Enum_Apples, Enum_Bananas)) return "";
   const size_t index = static_cast<size_t>(e);
   return EnumNamesEnum()[index];
@@ -67,12 +57,7 @@
   uint32_t length_;
 
  public:
-  Foo()
-      : id_(0),
-        count_(0),
-        prefix_(0),
-        padding0__(0),
-        length_(0) {
+  Foo() : id_(0), count_(0), prefix_(0), padding0__(0), length_(0) {
     (void)padding0__;
   }
   Foo(uint64_t _id, int16_t _count, int8_t _prefix, uint32_t _length)
@@ -83,18 +68,10 @@
         length_(flatbuffers::EndianScalar(_length)) {
     (void)padding0__;
   }
-  uint64_t id() const {
-    return flatbuffers::EndianScalar(id_);
-  }
-  int16_t count() const {
-    return flatbuffers::EndianScalar(count_);
-  }
-  int8_t prefix() const {
-    return flatbuffers::EndianScalar(prefix_);
-  }
-  uint32_t length() const {
-    return flatbuffers::EndianScalar(length_);
-  }
+  uint64_t id() const { return flatbuffers::EndianScalar(id_); }
+  int16_t count() const { return flatbuffers::EndianScalar(count_); }
+  int8_t prefix() const { return flatbuffers::EndianScalar(prefix_); }
+  uint32_t length() const { return flatbuffers::EndianScalar(length_); }
 };
 FLATBUFFERS_STRUCT_END(Foo, 16);
 
@@ -104,20 +81,17 @@
   int32_t time_;
   float ratio_;
   uint16_t size_;
-  int16_t padding0__;  int32_t padding1__;
+  int16_t padding0__;
+  int32_t padding1__;
 
  public:
   Bar()
-      : parent_(),
-        time_(0),
-        ratio_(0),
-        size_(0),
-        padding0__(0),
-        padding1__(0) {
+      : parent_(), time_(0), ratio_(0), size_(0), padding0__(0), padding1__(0) {
     (void)padding0__;
     (void)padding1__;
   }
-  Bar(const benchmarks_flatbuffers::Foo &_parent, int32_t _time, float _ratio, uint16_t _size)
+  Bar(const benchmarks_flatbuffers::Foo& _parent, int32_t _time, float _ratio,
+      uint16_t _size)
       : parent_(_parent),
         time_(flatbuffers::EndianScalar(_time)),
         ratio_(flatbuffers::EndianScalar(_ratio)),
@@ -127,18 +101,10 @@
     (void)padding0__;
     (void)padding1__;
   }
-  const benchmarks_flatbuffers::Foo &parent() const {
-    return parent_;
-  }
-  int32_t time() const {
-    return flatbuffers::EndianScalar(time_);
-  }
-  float ratio() const {
-    return flatbuffers::EndianScalar(ratio_);
-  }
-  uint16_t size() const {
-    return flatbuffers::EndianScalar(size_);
-  }
+  const benchmarks_flatbuffers::Foo& parent() const { return parent_; }
+  int32_t time() const { return flatbuffers::EndianScalar(time_); }
+  float ratio() const { return flatbuffers::EndianScalar(ratio_); }
+  uint16_t size() const { return flatbuffers::EndianScalar(size_); }
 };
 FLATBUFFERS_STRUCT_END(Bar, 32);
 
@@ -150,34 +116,28 @@
     VT_RATING = 8,
     VT_POSTFIX = 10
   };
-  const benchmarks_flatbuffers::Bar *sibling() const {
-    return GetStruct<const benchmarks_flatbuffers::Bar *>(VT_SIBLING);
+  const benchmarks_flatbuffers::Bar* sibling() const {
+    return GetStruct<const benchmarks_flatbuffers::Bar*>(VT_SIBLING);
   }
-  const flatbuffers::String *name() const {
-    return GetPointer<const flatbuffers::String *>(VT_NAME);
+  const flatbuffers::String* name() const {
+    return GetPointer<const flatbuffers::String*>(VT_NAME);
   }
-  double rating() const {
-    return GetField<double>(VT_RATING, 0.0);
-  }
-  uint8_t postfix() const {
-    return GetField<uint8_t>(VT_POSTFIX, 0);
-  }
-  bool Verify(flatbuffers::Verifier &verifier) const {
+  double rating() const { return GetField<double>(VT_RATING, 0.0); }
+  uint8_t postfix() const { return GetField<uint8_t>(VT_POSTFIX, 0); }
+  bool Verify(flatbuffers::Verifier& verifier) const {
     return VerifyTableStart(verifier) &&
            VerifyField<benchmarks_flatbuffers::Bar>(verifier, VT_SIBLING, 8) &&
-           VerifyOffset(verifier, VT_NAME) &&
-           verifier.VerifyString(name()) &&
+           VerifyOffset(verifier, VT_NAME) && verifier.VerifyString(name()) &&
            VerifyField<double>(verifier, VT_RATING, 8) &&
-           VerifyField<uint8_t>(verifier, VT_POSTFIX, 1) &&
-           verifier.EndTable();
+           VerifyField<uint8_t>(verifier, VT_POSTFIX, 1) && verifier.EndTable();
   }
 };
 
 struct FooBarBuilder {
   typedef FooBar Table;
-  flatbuffers::FlatBufferBuilder &fbb_;
+  flatbuffers::FlatBufferBuilder& fbb_;
   flatbuffers::uoffset_t start_;
-  void add_sibling(const benchmarks_flatbuffers::Bar *sibling) {
+  void add_sibling(const benchmarks_flatbuffers::Bar* sibling) {
     fbb_.AddStruct(FooBar::VT_SIBLING, sibling);
   }
   void add_name(flatbuffers::Offset<flatbuffers::String> name) {
@@ -189,8 +149,7 @@
   void add_postfix(uint8_t postfix) {
     fbb_.AddElement<uint8_t>(FooBar::VT_POSTFIX, postfix, 0);
   }
-  explicit FooBarBuilder(flatbuffers::FlatBufferBuilder &_fbb)
-        : fbb_(_fbb) {
+  explicit FooBarBuilder(flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) {
     start_ = fbb_.StartTable();
   }
   flatbuffers::Offset<FooBar> Finish() {
@@ -201,10 +160,9 @@
 };
 
 inline flatbuffers::Offset<FooBar> CreateFooBar(
-    flatbuffers::FlatBufferBuilder &_fbb,
-    const benchmarks_flatbuffers::Bar *sibling = nullptr,
-    flatbuffers::Offset<flatbuffers::String> name = 0,
-    double rating = 0.0,
+    flatbuffers::FlatBufferBuilder& _fbb,
+    const benchmarks_flatbuffers::Bar* sibling = nullptr,
+    flatbuffers::Offset<flatbuffers::String> name = 0, double rating = 0.0,
     uint8_t postfix = 0) {
   FooBarBuilder builder_(_fbb);
   builder_.add_rating(rating);
@@ -215,18 +173,12 @@
 }
 
 inline flatbuffers::Offset<FooBar> CreateFooBarDirect(
-    flatbuffers::FlatBufferBuilder &_fbb,
-    const benchmarks_flatbuffers::Bar *sibling = nullptr,
-    const char *name = nullptr,
-    double rating = 0.0,
-    uint8_t postfix = 0) {
+    flatbuffers::FlatBufferBuilder& _fbb,
+    const benchmarks_flatbuffers::Bar* sibling = nullptr,
+    const char* name = nullptr, double rating = 0.0, uint8_t postfix = 0) {
   auto name__ = name ? _fbb.CreateString(name) : 0;
-  return benchmarks_flatbuffers::CreateFooBar(
-      _fbb,
-      sibling,
-      name__,
-      rating,
-      postfix);
+  return benchmarks_flatbuffers::CreateFooBar(_fbb, sibling, name__, rating,
+                                              postfix);
 }
 
 struct FooBarContainer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
@@ -237,49 +189,53 @@
     VT_FRUIT = 8,
     VT_LOCATION = 10
   };
-  const flatbuffers::Vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>> *list() const {
-    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>> *>(VT_LIST);
+  const flatbuffers::Vector<
+      flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>*
+  list() const {
+    return GetPointer<const flatbuffers::Vector<
+        flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>*>(VT_LIST);
   }
-  bool initialized() const {
-    return GetField<uint8_t>(VT_INITIALIZED, 0) != 0;
-  }
+  bool initialized() const { return GetField<uint8_t>(VT_INITIALIZED, 0) != 0; }
   benchmarks_flatbuffers::Enum fruit() const {
-    return static_cast<benchmarks_flatbuffers::Enum>(GetField<int16_t>(VT_FRUIT, 0));
+    return static_cast<benchmarks_flatbuffers::Enum>(
+        GetField<int16_t>(VT_FRUIT, 0));
   }
-  const flatbuffers::String *location() const {
-    return GetPointer<const flatbuffers::String *>(VT_LOCATION);
+  const flatbuffers::String* location() const {
+    return GetPointer<const flatbuffers::String*>(VT_LOCATION);
   }
-  bool Verify(flatbuffers::Verifier &verifier) const {
-    return VerifyTableStart(verifier) &&
-           VerifyOffset(verifier, VT_LIST) &&
+  bool Verify(flatbuffers::Verifier& verifier) const {
+    return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_LIST) &&
            verifier.VerifyVector(list()) &&
            verifier.VerifyVectorOfTables(list()) &&
            VerifyField<uint8_t>(verifier, VT_INITIALIZED, 1) &&
            VerifyField<int16_t>(verifier, VT_FRUIT, 2) &&
            VerifyOffset(verifier, VT_LOCATION) &&
-           verifier.VerifyString(location()) &&
-           verifier.EndTable();
+           verifier.VerifyString(location()) && verifier.EndTable();
   }
 };
 
 struct FooBarContainerBuilder {
   typedef FooBarContainer Table;
-  flatbuffers::FlatBufferBuilder &fbb_;
+  flatbuffers::FlatBufferBuilder& fbb_;
   flatbuffers::uoffset_t start_;
-  void add_list(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>> list) {
+  void add_list(flatbuffers::Offset<flatbuffers::Vector<
+                    flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>>
+                    list) {
     fbb_.AddOffset(FooBarContainer::VT_LIST, list);
   }
   void add_initialized(bool initialized) {
-    fbb_.AddElement<uint8_t>(FooBarContainer::VT_INITIALIZED, static_cast<uint8_t>(initialized), 0);
+    fbb_.AddElement<uint8_t>(FooBarContainer::VT_INITIALIZED,
+                             static_cast<uint8_t>(initialized), 0);
   }
   void add_fruit(benchmarks_flatbuffers::Enum fruit) {
-    fbb_.AddElement<int16_t>(FooBarContainer::VT_FRUIT, static_cast<int16_t>(fruit), 0);
+    fbb_.AddElement<int16_t>(FooBarContainer::VT_FRUIT,
+                             static_cast<int16_t>(fruit), 0);
   }
   void add_location(flatbuffers::Offset<flatbuffers::String> location) {
     fbb_.AddOffset(FooBarContainer::VT_LOCATION, location);
   }
-  explicit FooBarContainerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
-        : fbb_(_fbb) {
+  explicit FooBarContainerBuilder(flatbuffers::FlatBufferBuilder& _fbb)
+      : fbb_(_fbb) {
     start_ = fbb_.StartTable();
   }
   flatbuffers::Offset<FooBarContainer> Finish() {
@@ -290,8 +246,10 @@
 };
 
 inline flatbuffers::Offset<FooBarContainer> CreateFooBarContainer(
-    flatbuffers::FlatBufferBuilder &_fbb,
-    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>> list = 0,
+    flatbuffers::FlatBufferBuilder& _fbb,
+    flatbuffers::Offset<flatbuffers::Vector<
+        flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>>
+        list = 0,
     bool initialized = false,
     benchmarks_flatbuffers::Enum fruit = benchmarks_flatbuffers::Enum_Apples,
     flatbuffers::Offset<flatbuffers::String> location = 0) {
@@ -304,47 +262,52 @@
 }
 
 inline flatbuffers::Offset<FooBarContainer> CreateFooBarContainerDirect(
-    flatbuffers::FlatBufferBuilder &_fbb,
-    const std::vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>> *list = nullptr,
+    flatbuffers::FlatBufferBuilder& _fbb,
+    const std::vector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>*
+        list = nullptr,
     bool initialized = false,
     benchmarks_flatbuffers::Enum fruit = benchmarks_flatbuffers::Enum_Apples,
-    const char *location = nullptr) {
-  auto list__ = list ? _fbb.CreateVector<flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>(*list) : 0;
+    const char* location = nullptr) {
+  auto list__ =
+      list ? _fbb.CreateVector<
+                 flatbuffers::Offset<benchmarks_flatbuffers::FooBar>>(*list)
+           : 0;
   auto location__ = location ? _fbb.CreateString(location) : 0;
   return benchmarks_flatbuffers::CreateFooBarContainer(
-      _fbb,
-      list__,
-      initialized,
-      fruit,
-      location__);
+      _fbb, list__, initialized, fruit, location__);
 }
 
-inline const benchmarks_flatbuffers::FooBarContainer *GetFooBarContainer(const void *buf) {
+inline const benchmarks_flatbuffers::FooBarContainer* GetFooBarContainer(
+    const void* buf) {
   return flatbuffers::GetRoot<benchmarks_flatbuffers::FooBarContainer>(buf);
 }
 
-inline const benchmarks_flatbuffers::FooBarContainer *GetSizePrefixedFooBarContainer(const void *buf) {
-  return flatbuffers::GetSizePrefixedRoot<benchmarks_flatbuffers::FooBarContainer>(buf);
+inline const benchmarks_flatbuffers::FooBarContainer*
+GetSizePrefixedFooBarContainer(const void* buf) {
+  return flatbuffers::GetSizePrefixedRoot<
+      benchmarks_flatbuffers::FooBarContainer>(buf);
 }
 
-inline bool VerifyFooBarContainerBuffer(
-    flatbuffers::Verifier &verifier) {
-  return verifier.VerifyBuffer<benchmarks_flatbuffers::FooBarContainer>(nullptr);
+inline bool VerifyFooBarContainerBuffer(flatbuffers::Verifier& verifier) {
+  return verifier.VerifyBuffer<benchmarks_flatbuffers::FooBarContainer>(
+      nullptr);
 }
 
 inline bool VerifySizePrefixedFooBarContainerBuffer(
-    flatbuffers::Verifier &verifier) {
-  return verifier.VerifySizePrefixedBuffer<benchmarks_flatbuffers::FooBarContainer>(nullptr);
+    flatbuffers::Verifier& verifier) {
+  return verifier
+      .VerifySizePrefixedBuffer<benchmarks_flatbuffers::FooBarContainer>(
+          nullptr);
 }
 
 inline void FinishFooBarContainerBuffer(
-    flatbuffers::FlatBufferBuilder &fbb,
+    flatbuffers::FlatBufferBuilder& fbb,
     flatbuffers::Offset<benchmarks_flatbuffers::FooBarContainer> root) {
   fbb.Finish(root);
 }
 
 inline void FinishSizePrefixedFooBarContainerBuffer(
-    flatbuffers::FlatBufferBuilder &fbb,
+    flatbuffers::FlatBufferBuilder& fbb,
     flatbuffers::Offset<benchmarks_flatbuffers::FooBarContainer> root) {
   fbb.FinishSizePrefixed(root);
 }
diff --git a/benchmarks/cpp/flatbuffers/fb_bench.h b/benchmarks/cpp/flatbuffers/fb_bench.h
index ffb5f54..09eb2ba 100644
--- a/benchmarks/cpp/flatbuffers/fb_bench.h
+++ b/benchmarks/cpp/flatbuffers/fb_bench.h
@@ -8,16 +8,16 @@
 #include "include/flatbuffers/flatbuffers.h"
 
 struct StaticAllocator : public flatbuffers::Allocator {
-  explicit StaticAllocator(uint8_t *buffer) : buffer_(buffer) {}
+  explicit StaticAllocator(uint8_t* buffer) : buffer_(buffer) {}
 
-  uint8_t *allocate(size_t) override { return buffer_; }
+  uint8_t* allocate(size_t) override { return buffer_; }
 
-  void deallocate(uint8_t *, size_t) override {}
+  void deallocate(uint8_t*, size_t) override {}
 
-  uint8_t *buffer_;
+  uint8_t* buffer_;
 };
 
 std::unique_ptr<Bench> NewFlatBuffersBench(
-    int64_t initial_size = 1024, flatbuffers::Allocator *allocator = nullptr);
+    int64_t initial_size = 1024, flatbuffers::Allocator* allocator = nullptr);
 
 #endif  // BENCHMARKS_CPP_FLATBUFFERS_FB_BENCH_H_
\ No newline at end of file
diff --git a/benchmarks/swift/Benchmarks/FlatbuffersBenchmarks/FlatbuffersBenchmarks.swift b/benchmarks/swift/Benchmarks/FlatbuffersBenchmarks/FlatbuffersBenchmarks.swift
index 28b4711..92eaf4a 100644
--- a/benchmarks/swift/Benchmarks/FlatbuffersBenchmarks/FlatbuffersBenchmarks.swift
+++ b/benchmarks/swift/Benchmarks/FlatbuffersBenchmarks/FlatbuffersBenchmarks.swift
@@ -88,8 +88,8 @@
 
   Benchmark(
     "Allocating ByteBuffer 1GB",
-    configuration: singleConfiguration)
-  { benchmark in
+    configuration: singleConfiguration
+  ) { benchmark in
     let memory = UnsafeMutableRawPointer.allocate(
       byteCount: 1_024_000_000,
       alignment: 1)
@@ -108,7 +108,7 @@
   }
 
   Benchmark("Strings 10") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
       blackHole(fb.create(string: str10))
@@ -116,7 +116,7 @@
   }
 
   Benchmark("Strings 100") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
       blackHole(fb.create(string: str100))
@@ -124,7 +124,7 @@
   }
 
   Benchmark("Vector 1 Bytes") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
       blackHole(fb.createVector(bytes: bytes))
@@ -132,7 +132,7 @@
   }
 
   Benchmark("Vector 1 Ints") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
       blackHole(fb.createVector(ints))
@@ -140,7 +140,7 @@
   }
 
   Benchmark("Vector 100 Ints") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for i in benchmark.scaledIterations {
       blackHole(fb.createVector(ints))
@@ -148,7 +148,7 @@
   }
 
   Benchmark("Vector 100 Bytes") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for i in benchmark.scaledIterations {
       blackHole(fb.createVector(bytes))
@@ -156,7 +156,7 @@
   }
 
   Benchmark("Vector 100 ContiguousBytes") { benchmark in
-    var fb = FlatBufferBuilder(initialSize: 1<<20)
+    var fb = FlatBufferBuilder(initialSize: 1 << 20)
     benchmark.startMeasurement()
     for i in benchmark.scaledIterations {
       blackHole(fb.createVector(bytes: bytes))
@@ -165,8 +165,8 @@
 
   Benchmark(
     "FlatBufferBuilder Add",
-    configuration: kiloConfiguration)
-  { benchmark in
+    configuration: kiloConfiguration
+  ) { benchmark in
     var fb = FlatBufferBuilder(initialSize: 1024 * 1024 * 32)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
@@ -182,8 +182,8 @@
 
   Benchmark(
     "FlatBufferBuilder Start table",
-    configuration: kiloConfiguration)
-  { benchmark in
+    configuration: kiloConfiguration
+  ) { benchmark in
     var fb = FlatBufferBuilder(initialSize: 1024 * 1024 * 32)
     benchmark.startMeasurement()
     for _ in benchmark.scaledIterations {
diff --git a/benchmarks/swift/Package.swift b/benchmarks/swift/Package.swift
index 4067daf..da2da4f 100644
--- a/benchmarks/swift/Package.swift
+++ b/benchmarks/swift/Package.swift
@@ -20,7 +20,7 @@
 let package = Package(
   name: "benchmarks",
   platforms: [
-    .macOS(.v13),
+    .macOS(.v13)
   ],
   dependencies: [
     .package(path: "../.."),
@@ -37,6 +37,6 @@
       ],
       path: "Benchmarks/FlatbuffersBenchmarks",
       plugins: [
-        .plugin(name: "BenchmarkPlugin", package: "package-benchmark"),
-      ]),
+        .plugin(name: "BenchmarkPlugin", package: "package-benchmark")
+      ])
   ])
diff --git a/conan/build.py b/conan/build.py
index 62a3799..104f9e0 100644
--- a/conan/build.py
+++ b/conan/build.py
@@ -6,45 +6,54 @@
 from cpt.packager import ConanMultiPackager
 
 
-
 def get_branch():
-    try:
-        for line in subprocess.check_output("git branch", shell=True).decode().splitlines():
-            line = line.strip()
-            if line.startswith("*") and " (HEAD detached" not in line:
-                return line.replace("*", "", 1).strip()
-        return ""
-    except Exception:
-        pass
+  try:
+    for line in (
+        subprocess.check_output("git branch", shell=True).decode().splitlines()
+    ):
+      line = line.strip()
+      if line.startswith("*") and " (HEAD detached" not in line:
+        return line.replace("*", "", 1).strip()
     return ""
+  except Exception:
+    pass
+  return ""
 
 
 def get_version():
-    version = get_branch()
-    match = re.search(r"v(\d+\.\d+\.\d+.*)", version)
-    if match:
-        return match.group(1)
-    return version
+  version = get_branch()
+  match = re.search(r"v(\d+\.\d+\.\d+.*)", version)
+  if match:
+    return match.group(1)
+  return version
 
 
 def get_reference(username):
-    return "flatbuffers/{}@google/stable".format(get_version())
+  return "flatbuffers/{}@google/stable".format(get_version())
 
 
 if __name__ == "__main__":
-    login_username = os.getenv("CONAN_LOGIN_USERNAME", "aardappel")
-    username = os.getenv("CONAN_USERNAME", "google")
-    upload = os.getenv("CONAN_UPLOAD", "https://api.bintray.com/conan/aardappel/flatbuffers")
-    stable_branch_pattern = os.getenv("CONAN_STABLE_BRANCH_PATTERN", r"v\d+\.\d+\.\d+.*")
-    test_folder = os.getenv("CPT_TEST_FOLDER", os.path.join("conan", "test_package"))
-    upload_only_when_stable = os.getenv("CONAN_UPLOAD_ONLY_WHEN_STABLE", True)
+  login_username = os.getenv("CONAN_LOGIN_USERNAME", "aardappel")
+  username = os.getenv("CONAN_USERNAME", "google")
+  upload = os.getenv(
+      "CONAN_UPLOAD", "https://api.bintray.com/conan/aardappel/flatbuffers"
+  )
+  stable_branch_pattern = os.getenv(
+      "CONAN_STABLE_BRANCH_PATTERN", r"v\d+\.\d+\.\d+.*"
+  )
+  test_folder = os.getenv(
+      "CPT_TEST_FOLDER", os.path.join("conan", "test_package")
+  )
+  upload_only_when_stable = os.getenv("CONAN_UPLOAD_ONLY_WHEN_STABLE", True)
 
-    builder = ConanMultiPackager(reference=get_reference(username),
-                                 username=username,
-                                 login_username=login_username,
-                                 upload=upload,
-                                 stable_branch_pattern=stable_branch_pattern,
-                                 upload_only_when_stable=upload_only_when_stable,
-                                 test_folder=test_folder)
-    builder.add_common_builds(pure_c=False)
-    builder.run()
+  builder = ConanMultiPackager(
+      reference=get_reference(username),
+      username=username,
+      login_username=login_username,
+      upload=upload,
+      stable_branch_pattern=stable_branch_pattern,
+      upload_only_when_stable=upload_only_when_stable,
+      test_folder=test_folder,
+  )
+  builder.add_common_builds(pure_c=False)
+  builder.run()
diff --git a/conan/test_package/conanfile.py b/conan/test_package/conanfile.py
index 735e31d..afa7894 100644
--- a/conan/test_package/conanfile.py
+++ b/conan/test_package/conanfile.py
@@ -1,21 +1,21 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-from conans import ConanFile, CMake
 import os
+from conans import CMake, ConanFile
 
 
 class TestPackageConan(ConanFile):
-    settings = "os", "compiler", "build_type", "arch"
-    generators = "cmake"
+  settings = "os", "compiler", "build_type", "arch"
+  generators = "cmake"
 
-    def build(self):
-        cmake = CMake(self)
-        cmake.configure()
-        cmake.build()
+  def build(self):
+    cmake = CMake(self)
+    cmake.configure()
+    cmake.build()
 
-    def test(self):
-        bin_path = os.path.join("bin", "test_package")
-        self.run(bin_path, run_environment=True)
-        self.run("flatc --version", run_environment=True)
-        self.run("flathash fnv1_16 conan", run_environment=True)
+  def test(self):
+    bin_path = os.path.join("bin", "test_package")
+    self.run(bin_path, run_environment=True)
+    self.run("flatc --version", run_environment=True)
+    self.run("flathash fnv1_16 conan", run_environment=True)
diff --git a/conanfile.py b/conanfile.py
index 9d62290..dc63d14 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -1,75 +1,83 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-"""Conan recipe package for Google FlatBuffers
-"""
+"""Conan recipe package for Google FlatBuffers"""
 import os
 import shutil
-from conans import ConanFile, CMake, tools
+from conans import CMake, ConanFile, tools
 
 
 class FlatbuffersConan(ConanFile):
-    name = "flatbuffers"
-    license = "Apache-2.0"
-    url = "https://github.com/google/flatbuffers"
-    homepage = "http://google.github.io/flatbuffers/"
-    author = "Wouter van Oortmerssen"
-    topics = ("conan", "flatbuffers", "serialization", "rpc", "json-parser")
-    description = "Memory Efficient Serialization Library"
-    settings = "os", "compiler", "build_type", "arch"
-    options = {"shared": [True, False], "fPIC": [True, False]}
-    default_options = {"shared": False, "fPIC": True}
-    generators = "cmake"
-    exports = "LICENSE"
-    exports_sources = ["CMake/*", "include/*", "src/*", "grpc/*", "CMakeLists.txt", "conan/CMakeLists.txt"]
+  name = "flatbuffers"
+  license = "Apache-2.0"
+  url = "https://github.com/google/flatbuffers"
+  homepage = "http://google.github.io/flatbuffers/"
+  author = "Wouter van Oortmerssen"
+  topics = ("conan", "flatbuffers", "serialization", "rpc", "json-parser")
+  description = "Memory Efficient Serialization Library"
+  settings = "os", "compiler", "build_type", "arch"
+  options = {"shared": [True, False], "fPIC": [True, False]}
+  default_options = {"shared": False, "fPIC": True}
+  generators = "cmake"
+  exports = "LICENSE"
+  exports_sources = [
+      "CMake/*",
+      "include/*",
+      "src/*",
+      "grpc/*",
+      "CMakeLists.txt",
+      "conan/CMakeLists.txt",
+  ]
 
-    def source(self):
-        """Wrap the original CMake file to call conan_basic_setup
-        """
-        shutil.move("CMakeLists.txt", "CMakeListsOriginal.txt")
-        shutil.move(os.path.join("conan", "CMakeLists.txt"), "CMakeLists.txt")
+  def source(self):
+    """Wrap the original CMake file to call conan_basic_setup"""
+    shutil.move("CMakeLists.txt", "CMakeListsOriginal.txt")
+    shutil.move(os.path.join("conan", "CMakeLists.txt"), "CMakeLists.txt")
 
-    def config_options(self):
-        """Remove fPIC option on Windows platform
-        """
-        if self.settings.os == "Windows":
-            self.options.remove("fPIC")
+  def config_options(self):
+    """Remove fPIC option on Windows platform"""
+    if self.settings.os == "Windows":
+      self.options.remove("fPIC")
 
-    def configure_cmake(self):
-        """Create CMake instance and execute configure step
-        """
-        cmake = CMake(self)
-        cmake.definitions["FLATBUFFERS_BUILD_TESTS"] = False
-        cmake.definitions["FLATBUFFERS_BUILD_SHAREDLIB"] = self.options.shared
-        cmake.definitions["FLATBUFFERS_BUILD_FLATLIB"] = not self.options.shared
-        cmake.configure()
-        return cmake
+  def configure_cmake(self):
+    """Create CMake instance and execute configure step"""
+    cmake = CMake(self)
+    cmake.definitions["FLATBUFFERS_BUILD_TESTS"] = False
+    cmake.definitions["FLATBUFFERS_BUILD_SHAREDLIB"] = self.options.shared
+    cmake.definitions["FLATBUFFERS_BUILD_FLATLIB"] = not self.options.shared
+    cmake.configure()
+    return cmake
 
-    def build(self):
-        """Configure, build and install FlatBuffers using CMake.
-        """
-        cmake = self.configure_cmake()
-        cmake.build()
+  def build(self):
+    """Configure, build and install FlatBuffers using CMake."""
+    cmake = self.configure_cmake()
+    cmake.build()
 
-    def package(self):
-        """Copy Flatbuffers' artifacts to package folder
-        """
-        cmake = self.configure_cmake()
-        cmake.install()
-        self.copy(pattern="LICENSE", dst="licenses")
-        self.copy(pattern="FindFlatBuffers.cmake", dst=os.path.join("lib", "cmake", "flatbuffers"), src="CMake")
-        self.copy(pattern="flathash*", dst="bin", src="bin")
-        self.copy(pattern="flatc*", dst="bin", src="bin")
-        if self.settings.os == "Windows" and self.options.shared:
-            if self.settings.compiler == "Visual Studio":
-                shutil.move(os.path.join(self.package_folder, "lib", "%s.dll" % self.name),
-                            os.path.join(self.package_folder, "bin", "%s.dll" % self.name))
-            elif self.settings.compiler == "gcc":
-                shutil.move(os.path.join(self.package_folder, "lib", "lib%s.dll" % self.name),
-                            os.path.join(self.package_folder, "bin", "lib%s.dll" % self.name))
+  def package(self):
+    """Copy Flatbuffers' artifacts to package folder"""
+    cmake = self.configure_cmake()
+    cmake.install()
+    self.copy(pattern="LICENSE", dst="licenses")
+    self.copy(
+        pattern="FindFlatBuffers.cmake",
+        dst=os.path.join("lib", "cmake", "flatbuffers"),
+        src="CMake",
+    )
+    self.copy(pattern="flathash*", dst="bin", src="bin")
+    self.copy(pattern="flatc*", dst="bin", src="bin")
+    if self.settings.os == "Windows" and self.options.shared:
+      if self.settings.compiler == "Visual Studio":
+        shutil.move(
+            os.path.join(self.package_folder, "lib", "%s.dll" % self.name),
+            os.path.join(self.package_folder, "bin", "%s.dll" % self.name),
+        )
+      elif self.settings.compiler == "gcc":
+        shutil.move(
+            os.path.join(self.package_folder, "lib", "lib%s.dll" % self.name),
+            os.path.join(self.package_folder, "bin", "lib%s.dll" % self.name),
+        )
 
-    def package_info(self):
-        """Collect built libraries names and solve flatc path.
-        """
-        self.cpp_info.libs = tools.collect_libs(self)
-        self.user_info.flatc = os.path.join(self.package_folder, "bin", "flatc")
+  def package_info(self):
+    """Collect built libraries names and solve flatc path."""
+    self.cpp_info.libs = tools.collect_libs(self)
+    self.user_info.flatc = os.path.join(self.package_folder, "bin", "flatc")
diff --git a/dart/example/example.dart b/dart/example/example.dart
index d397bbb..3299813 100644
--- a/dart/example/example.dart
+++ b/dart/example/example.dart
@@ -15,6 +15,7 @@
  */
 
 import 'package:flat_buffers/flat_buffers.dart' as fb;
+
 import './monster_my_game.sample_generated.dart' as my_game;
 
 // Example how to use FlatBuffers to create and read binary buffers.
@@ -78,7 +79,8 @@
   builder.finish(monsteroff);
   if (verify(builder.buffer)) {
     print(
-        "The FlatBuffer was successfully created with a builder and verified!");
+      "The FlatBuffer was successfully created with a builder and verified!",
+    );
   }
 }
 
@@ -94,7 +96,10 @@
     name: 'Orc',
     inventory: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
     color: my_game.Color.Red,
-    weapons: [my_game.WeaponObjectBuilder(name: 'Sword', damage: 3), axe],
+    weapons: [
+      my_game.WeaponObjectBuilder(name: 'Sword', damage: 3),
+      axe,
+    ],
     equippedType: my_game.EquipmentTypeId.Weapon,
     equipped: axe,
   );
@@ -108,7 +113,8 @@
   // Instead, we're going to access it right away (as if we just received it).
   if (verify(buffer)) {
     print(
-        "The FlatBuffer was successfully created with an object builder and verified!");
+      "The FlatBuffer was successfully created with an object builder and verified!",
+    );
   }
 }
 
diff --git a/dart/example/monster_my_game.sample_generated.dart b/dart/example/monster_my_game.sample_generated.dart
index ba0a81f..612de33 100644
--- a/dart/example/monster_my_game.sample_generated.dart
+++ b/dart/example/monster_my_game.sample_generated.dart
@@ -4,8 +4,8 @@
 library my_game.sample;
 
 import 'dart:typed_data' show Uint8List;
-import 'package:flat_buffers/flat_buffers.dart' as fb;
 
+import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 class Color {
   final int value;
@@ -19,7 +19,7 @@
     return result;
   }
 
-  static Color? _createOrNull(int? value) => 
+  static Color? _createOrNull(int? value) =>
       value == null ? null : Color.fromValue(value);
 
   static const int minValue = 0;
@@ -29,10 +29,7 @@
   static const Color Red = Color._(0);
   static const Color Green = Color._(1);
   static const Color Blue = Color._(2);
-  static const Map<int, Color> values = {
-    0: Red,
-    1: Green,
-    2: Blue};
+  static const Map<int, Color> values = {0: Red, 1: Green, 2: Blue};
 
   static const fb.Reader<Color> reader = _ColorReader();
 
@@ -60,12 +57,14 @@
   factory EquipmentTypeId.fromValue(int value) {
     final result = values[value];
     if (result == null) {
-      throw StateError('Invalid value $value for bit flag enum EquipmentTypeId');
+      throw StateError(
+        'Invalid value $value for bit flag enum EquipmentTypeId',
+      );
     }
     return result;
   }
 
-  static EquipmentTypeId? _createOrNull(int? value) => 
+  static EquipmentTypeId? _createOrNull(int? value) =>
       value == null ? null : EquipmentTypeId.fromValue(value);
 
   static const int minValue = 0;
@@ -74,9 +73,7 @@
 
   static const EquipmentTypeId NONE = EquipmentTypeId._(0);
   static const EquipmentTypeId Weapon = EquipmentTypeId._(1);
-  static const Map<int, EquipmentTypeId> values = {
-    0: NONE,
-    1: Weapon};
+  static const Map<int, EquipmentTypeId> values = {0: NONE, 1: Weapon};
 
   static const fb.Reader<EquipmentTypeId> reader = _EquipmentTypeIdReader();
 
@@ -122,8 +119,7 @@
   int get size => 12;
 
   @override
-  Vec3 createObject(fb.BufferContext bc, int offset) => 
-    Vec3._(bc, offset);
+  Vec3 createObject(fb.BufferContext bc, int offset) => Vec3._(bc, offset);
 }
 
 class Vec3Builder {
@@ -137,7 +133,6 @@
     fbBuilder.putFloat32(x);
     return fbBuilder.offset;
   }
-
 }
 
 class Vec3ObjectBuilder extends fb.ObjectBuilder {
@@ -145,14 +140,10 @@
   final double _y;
   final double _z;
 
-  Vec3ObjectBuilder({
-    required double x,
-    required double y,
-    required double z,
-  })
-      : _x = x,
-        _y = y,
-        _z = z;
+  Vec3ObjectBuilder({required double x, required double y, required double z})
+    : _x = x,
+      _y = y,
+      _z = z;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -171,6 +162,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Monster {
   Monster._(this._bc, this._bcOffset);
   factory Monster(List<int> bytes) {
@@ -186,18 +178,30 @@
   Vec3? get pos => Vec3.reader.vTableGetNullable(_bc, _bcOffset, 4);
   int get mana => const fb.Int16Reader().vTableGet(_bc, _bcOffset, 6, 150);
   int get hp => const fb.Int16Reader().vTableGet(_bc, _bcOffset, 8, 100);
-  String? get name => const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 10);
-  List<int>? get inventory => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 14);
-  Color get color => Color.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 16, 2));
-  List<Weapon>? get weapons => const fb.ListReader<Weapon>(Weapon.reader).vTableGetNullable(_bc, _bcOffset, 18);
-  EquipmentTypeId? get equippedType => EquipmentTypeId._createOrNull(const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 20));
+  String? get name =>
+      const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 10);
+  List<int>? get inventory =>
+      const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 14);
+  Color get color =>
+      Color.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 16, 2));
+  List<Weapon>? get weapons => const fb.ListReader<Weapon>(
+    Weapon.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 18);
+  EquipmentTypeId? get equippedType => EquipmentTypeId._createOrNull(
+    const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 20),
+  );
   dynamic get equipped {
     switch (equippedType?.value) {
-      case 1: return Weapon.reader.vTableGetNullable(_bc, _bcOffset, 22);
-      default: return null;
+      case 1:
+        return Weapon.reader.vTableGetNullable(_bc, _bcOffset, 22);
+      default:
+        return null;
     }
   }
-  List<Vec3>? get path => const fb.ListReader<Vec3>(Vec3.reader).vTableGetNullable(_bc, _bcOffset, 24);
+
+  List<Vec3>? get path => const fb.ListReader<Vec3>(
+    Vec3.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 24);
 
   @override
   String toString() {
@@ -209,8 +213,8 @@
   const _MonsterReader();
 
   @override
-  Monster createObject(fb.BufferContext bc, int offset) => 
-    Monster._(bc, offset);
+  Monster createObject(fb.BufferContext bc, int offset) =>
+      Monster._(bc, offset);
 }
 
 class MonsterBuilder {
@@ -226,38 +230,47 @@
     fbBuilder.addStruct(0, offset);
     return fbBuilder.offset;
   }
+
   int addMana(int? mana) {
     fbBuilder.addInt16(1, mana);
     return fbBuilder.offset;
   }
+
   int addHp(int? hp) {
     fbBuilder.addInt16(2, hp);
     return fbBuilder.offset;
   }
+
   int addNameOffset(int? offset) {
     fbBuilder.addOffset(3, offset);
     return fbBuilder.offset;
   }
+
   int addInventoryOffset(int? offset) {
     fbBuilder.addOffset(5, offset);
     return fbBuilder.offset;
   }
+
   int addColor(Color? color) {
     fbBuilder.addInt8(6, color?.value);
     return fbBuilder.offset;
   }
+
   int addWeaponsOffset(int? offset) {
     fbBuilder.addOffset(7, offset);
     return fbBuilder.offset;
   }
+
   int addEquippedType(EquipmentTypeId? equippedType) {
     fbBuilder.addUint8(8, equippedType?.value);
     return fbBuilder.offset;
   }
+
   int addEquippedOffset(int? offset) {
     fbBuilder.addOffset(9, offset);
     return fbBuilder.offset;
   }
+
   int addPathOffset(int? offset) {
     fbBuilder.addOffset(10, offset);
     return fbBuilder.offset;
@@ -291,29 +304,34 @@
     EquipmentTypeId? equippedType,
     dynamic equipped,
     List<Vec3ObjectBuilder>? path,
-  })
-      : _pos = pos,
-        _mana = mana,
-        _hp = hp,
-        _name = name,
-        _inventory = inventory,
-        _color = color,
-        _weapons = weapons,
-        _equippedType = equippedType,
-        _equipped = equipped,
-        _path = path;
+  }) : _pos = pos,
+       _mana = mana,
+       _hp = hp,
+       _name = name,
+       _inventory = inventory,
+       _color = color,
+       _weapons = weapons,
+       _equippedType = equippedType,
+       _equipped = equipped,
+       _path = path;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? nameOffset = _name == null ? null
+    final int? nameOffset = _name == null
+        ? null
         : fbBuilder.writeString(_name!);
-    final int? inventoryOffset = _inventory == null ? null
+    final int? inventoryOffset = _inventory == null
+        ? null
         : fbBuilder.writeListUint8(_inventory!);
-    final int? weaponsOffset = _weapons == null ? null
-        : fbBuilder.writeList(_weapons!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
+    final int? weaponsOffset = _weapons == null
+        ? null
+        : fbBuilder.writeList(
+            _weapons!.map((b) => b.getOrCreateOffset(fbBuilder)).toList(),
+          );
     final int? equippedOffset = _equipped?.getOrCreateOffset(fbBuilder);
-    final int? pathOffset = _path == null ? null
+    final int? pathOffset = _path == null
+        ? null
         : fbBuilder.writeListOfStructs(_path!);
     fbBuilder.startTable(10);
     if (_pos != null) {
@@ -339,6 +357,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Weapon {
   Weapon._(this._bc, this._bcOffset);
   factory Weapon(List<int> bytes) {
@@ -351,7 +370,8 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  String? get name => const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 4);
+  String? get name =>
+      const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 4);
   int get damage => const fb.Int16Reader().vTableGet(_bc, _bcOffset, 6, 0);
 
   @override
@@ -364,8 +384,7 @@
   const _WeaponReader();
 
   @override
-  Weapon createObject(fb.BufferContext bc, int offset) => 
-    Weapon._(bc, offset);
+  Weapon createObject(fb.BufferContext bc, int offset) => Weapon._(bc, offset);
 }
 
 class WeaponBuilder {
@@ -381,6 +400,7 @@
     fbBuilder.addOffset(0, offset);
     return fbBuilder.offset;
   }
+
   int addDamage(int? damage) {
     fbBuilder.addInt16(1, damage);
     return fbBuilder.offset;
@@ -395,17 +415,15 @@
   final String? _name;
   final int? _damage;
 
-  WeaponObjectBuilder({
-    String? name,
-    int? damage,
-  })
-      : _name = name,
-        _damage = damage;
+  WeaponObjectBuilder({String? name, int? damage})
+    : _name = name,
+      _damage = damage;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? nameOffset = _name == null ? null
+    final int? nameOffset = _name == null
+        ? null
         : fbBuilder.writeString(_name!);
     fbBuilder.startTable(2);
     fbBuilder.addOffset(0, nameOffset);
diff --git a/dart/lib/flat_buffers.dart b/dart/lib/flat_buffers.dart
index 2395992..7590bdb 100644
--- a/dart/lib/flat_buffers.dart
+++ b/dart/lib/flat_buffers.dart
@@ -27,10 +27,11 @@
   ByteData get buffer => _buffer;
 
   /// Create from a FlatBuffer represented by a list of bytes (uint8).
-  factory BufferContext.fromBytes(List<int> byteList) =>
-      BufferContext(byteList is Uint8List
-          ? byteList.buffer.asByteData(byteList.offsetInBytes)
-          : ByteData.view(Uint8List.fromList(byteList).buffer));
+  factory BufferContext.fromBytes(List<int> byteList) => BufferContext(
+    byteList is Uint8List
+        ? byteList.buffer.asByteData(byteList.offsetInBytes)
+        : ByteData.view(Uint8List.fromList(byteList).buffer),
+  );
 
   /// Create from a FlatBuffer represented by ByteData.
   BufferContext(this._buffer);
@@ -149,9 +150,9 @@
     bool internStrings = false,
     Allocator allocator = const DefaultAllocator(),
     this.deduplicateTables = true,
-  })  : _allocator = allocator,
-        _buf = allocator.allocate(initialSize),
-        _vTables = deduplicateTables ? [] : const [] {
+  }) : _allocator = allocator,
+       _buf = allocator.allocate(initialSize),
+       _vTables = deduplicateTables ? [] : const [] {
     if (internStrings) {
       _strings = <String, int>{};
     }
@@ -350,8 +351,10 @@
   Uint8List get buffer {
     assert(_finished);
     final finishedSize = size();
-    return _buf.buffer
-        .asUint8List(_buf.lengthInBytes - finishedSize, finishedSize);
+    return _buf.buffer.asUint8List(
+      _buf.lengthInBytes - finishedSize,
+      finishedSize,
+    );
   }
 
   /// Finish off the creation of the buffer.  The given [offset] is used as the
@@ -368,14 +371,18 @@
     if (fileIdentifier != null) {
       for (var i = 0; i < 4; i++) {
         _setUint8AtTail(
-            finishedSize - _sizeofUint32 - i, fileIdentifier.codeUnitAt(i));
+          finishedSize - _sizeofUint32 - i,
+          fileIdentifier.codeUnitAt(i),
+        );
       }
     }
 
     // zero out the added padding
-    for (var i = sizeBeforePadding + 1;
-        i <= finishedSize - requiredBytes;
-        i++) {
+    for (
+      var i = sizeBeforePadding + 1;
+      i <= finishedSize - requiredBytes;
+      i++
+    ) {
       _setUint8AtTail(i, 0);
     }
     _finished = true;
@@ -687,8 +694,10 @@
   int writeString(String value, {bool asciiOptimization = false}) {
     assert(!_inVTable);
     if (_strings != null) {
-      return _strings!
-          .putIfAbsent(value, () => _writeString(value, asciiOptimization));
+      return _strings!.putIfAbsent(
+        value,
+        () => _writeString(value, asciiOptimization),
+      );
     } else {
       return _writeString(value, asciiOptimization);
     }
@@ -1005,8 +1014,11 @@
         : List<E>.generate(
             bc.buffer.getUint32(listOffset, Endian.little),
             (int index) => _elementReader.read(
-                bc, listOffset + size + _elementReader.size * index),
-            growable: true);
+              bc,
+              listOffset + size + _elementReader.size * index,
+            ),
+            growable: true,
+          );
   }
 }
 
@@ -1284,7 +1296,7 @@
   List<E?>? _items;
 
   _FbGenericList(this.elementReader, BufferContext bp, int offset)
-      : super(bp, offset);
+    : super(bp, offset);
 
   @override
   @pragma('vm:prefer-inline')
@@ -1454,7 +1466,11 @@
   /// Params [inUseBack] and [inUseFront] indicate how much of [oldData] is
   /// actually in use at each end, and needs to be copied.
   ByteData resize(
-      ByteData oldData, int newSize, int inUseBack, int inUseFront) {
+    ByteData oldData,
+    int newSize,
+    int inUseBack,
+    int inUseFront,
+  ) {
     final newData = allocate(newSize);
     _copyDownward(oldData, newData, inUseBack, inUseFront);
     deallocate(oldData);
@@ -1465,17 +1481,25 @@
   /// memory of size [inUseFront] and [inUseBack] will be copied from the front
   /// and back of the old memory allocation.
   void _copyDownward(
-      ByteData oldData, ByteData newData, int inUseBack, int inUseFront) {
+    ByteData oldData,
+    ByteData newData,
+    int inUseBack,
+    int inUseFront,
+  ) {
     if (inUseBack != 0) {
       newData.buffer.asUint8List().setAll(
-          newData.lengthInBytes - inUseBack,
-          oldData.buffer.asUint8List().getRange(
-              oldData.lengthInBytes - inUseBack, oldData.lengthInBytes));
+        newData.lengthInBytes - inUseBack,
+        oldData.buffer.asUint8List().getRange(
+          oldData.lengthInBytes - inUseBack,
+          oldData.lengthInBytes,
+        ),
+      );
     }
     if (inUseFront != 0) {
-      newData.buffer
-          .asUint8List()
-          .setAll(0, oldData.buffer.asUint8List().getRange(0, inUseFront));
+      newData.buffer.asUint8List().setAll(
+        0,
+        oldData.buffer.asUint8List().getRange(0, inUseFront),
+      );
     }
   }
 }
diff --git a/dart/lib/src/builder.dart b/dart/lib/src/builder.dart
index 82681e7..cdd0aec 100644
--- a/dart/lib/src/builder.dart
+++ b/dart/lib/src/builder.dart
@@ -107,8 +107,11 @@
     final newOffset = _newOffset(length + 1);
     _pushBuffer(utf8String);
     _offset = newOffset;
-    final stackValue =
-        _StackValue.withOffset(stringOffset, ValueType.String, bitWidth);
+    final stackValue = _StackValue.withOffset(
+      stringOffset,
+      ValueType.String,
+      bitWidth,
+    );
     _stack.add(stackValue);
     _stringCache[value] = stackValue;
   }
@@ -128,8 +131,11 @@
     final newOffset = _newOffset(length + 1);
     _pushBuffer(utf8String);
     _offset = newOffset;
-    final stackValue =
-        _StackValue.withOffset(keyOffset, ValueType.Key, BitWidth.width8);
+    final stackValue = _StackValue.withOffset(
+      keyOffset,
+      ValueType.Key,
+      BitWidth.width8,
+    );
     _stack.add(stackValue);
     _keyCache[value] = stackValue;
   }
@@ -147,8 +153,11 @@
     final newOffset = _newOffset(length);
     _pushBuffer(value.asUint8List());
     _offset = newOffset;
-    final stackValue =
-        _StackValue.withOffset(blobOffset, ValueType.Blob, bitWidth);
+    final stackValue = _StackValue.withOffset(
+      blobOffset,
+      ValueType.Blob,
+      bitWidth,
+    );
     _stack.add(stackValue);
   }
 
@@ -170,7 +179,10 @@
     final valueOffset = _offset;
     _pushBuffer(stackValue.asU8List(stackValue.width));
     final stackOffset = _StackValue.withOffset(
-        valueOffset, ValueType.IndirectInt, stackValue.width);
+      valueOffset,
+      ValueType.IndirectInt,
+      stackValue.width,
+    );
     _stack.add(stackOffset);
     _offset = newOffset;
     if (cache) {
@@ -195,7 +207,10 @@
     final valueOffset = _offset;
     _pushBuffer(stackValue.asU8List(stackValue.width));
     final stackOffset = _StackValue.withOffset(
-        valueOffset, ValueType.IndirectFloat, stackValue.width);
+      valueOffset,
+      ValueType.IndirectFloat,
+      stackValue.width,
+    );
     _stack.add(stackOffset);
     _offset = newOffset;
     if (cache) {
@@ -252,9 +267,10 @@
     tmp._offset = _offset;
     tmp._stack = List.from(_stack);
     tmp._stackPointers = List.from(_stackPointers);
-    tmp._buffer.buffer
-        .asUint8List()
-        .setAll(0, _buffer.buffer.asUint8List(0, _offset));
+    tmp._buffer.buffer.asUint8List().setAll(
+      0,
+      _buffer.buffer.asUint8List(0, _offset),
+    );
     for (var i = 0; i < tmp._stackPointers.length; i++) {
       tmp.end();
     }
@@ -271,7 +287,8 @@
     if (_stackPointers.isNotEmpty && _stackPointers.last.isVector == false) {
       if (_stack.last.type != ValueType.Key) {
         throw StateError(
-            'Adding value to a map before adding a key is prohibited');
+          'Adding value to a map before adding a key is prohibited',
+        );
       }
     }
   }
@@ -288,7 +305,8 @@
   void _finish() {
     if (_stack.length != 1) {
       throw StateError(
-          'Stack has to be exactly 1, but is ${_stack.length}. You have to end all started vectors and maps, before calling [finish]');
+        'Stack has to be exactly 1, but is ${_stack.length}. You have to end all started vectors and maps, before calling [finish]',
+      );
     }
     final value = _stack[0];
     final byteWidth = _align(value.elementWidth(_offset, 0));
@@ -298,8 +316,12 @@
     _finished = true;
   }
 
-  _StackValue _createVector(int start, int vecLength, int step,
-      [_StackValue? keys]) {
+  _StackValue _createVector(
+    int start,
+    int vecLength,
+    int step, [
+    _StackValue? keys,
+  ]) {
     var bitWidth = BitWidthUtil.uwidth(vecLength);
     var prefixElements = 1;
     if (keys != null) {
@@ -326,7 +348,8 @@
       }
     }
     final byteWidth = _align(bitWidth);
-    final fix = typed & ValueTypeUtils.isNumber(vectorType) &&
+    final fix =
+        typed & ValueTypeUtils.isNumber(vectorType) &&
         vecLength >= 2 &&
         vecLength <= 4;
     if (keys != null) {
@@ -349,8 +372,10 @@
       return _StackValue.withOffset(vecOffset, ValueType.Map, bitWidth);
     }
     if (typed) {
-      final vType =
-          ValueTypeUtils.toTypedVector(vectorType, fix ? vecLength : 0);
+      final vType = ValueTypeUtils.toTypedVector(
+        vectorType,
+        fix ? vecLength : 0,
+      );
       return _StackValue.withOffset(vecOffset, vType, bitWidth);
     }
     return _StackValue.withOffset(vecOffset, ValueType.Vector, bitWidth);
@@ -366,7 +391,8 @@
   void _sortKeysAndEndMap(_StackPointer pointer) {
     if (((_stack.length - pointer.stackPosition) & 1) == 1) {
       throw StateError(
-          'The stack needs to hold key value pairs (even number of elements). Check if you combined [addKey] with add... method calls properly.');
+        'The stack needs to hold key value pairs (even number of elements). Check if you combined [addKey] with add... method calls properly.',
+      );
     }
 
     var sorted = true;
@@ -412,8 +438,12 @@
       keysStackValue = _createVector(pointer.stackPosition, vecLength, 2);
       _keyVectorCache[keysHash] = keysStackValue;
     }
-    final vec =
-        _createVector(pointer.stackPosition + 1, vecLength, 2, keysStackValue);
+    final vec = _createVector(
+      pointer.stackPosition + 1,
+      vecLength,
+      2,
+      keysStackValue,
+    );
     _stack.removeRange(pointer.stackPosition, _stack.length);
     _stack.add(vec);
   }
@@ -421,7 +451,8 @@
   bool _shouldFlip(_StackValue v1, _StackValue v2) {
     if (v1.type != ValueType.Key || v2.type != ValueType.Key) {
       throw StateError(
-          'Stack values are not keys $v1 | $v2. Check if you combined [addKey] with add... method calls properly.');
+        'Stack values are not keys $v1 | $v2. Check if you combined [addKey] with add... method calls properly.',
+      );
     }
 
     late int c1, c2;
@@ -450,7 +481,8 @@
         _writeUInt(relativeOffset, byteWidth);
       } else {
         throw StateError(
-            'Unexpected size $byteWidth. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new');
+          'Unexpected size $byteWidth. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new',
+        );
       }
     } else {
       _pushBuffer(value.asU8List(BitWidthUtil.fromByteWidth(byteWidth)));
@@ -523,29 +555,27 @@
   final ValueType _type;
   final BitWidth _width;
 
-  _StackValue.withNull()
-      : _type = ValueType.Null,
-        _width = BitWidth.width8;
+  _StackValue.withNull() : _type = ValueType.Null, _width = BitWidth.width8;
 
   _StackValue.withInt(int value)
-      : _type = ValueType.Int,
-        _width = BitWidthUtil.width(value),
-        _value = value;
+    : _type = ValueType.Int,
+      _width = BitWidthUtil.width(value),
+      _value = value;
 
   _StackValue.withBool(bool value)
-      : _type = ValueType.Bool,
-        _width = BitWidth.width8,
-        _value = value;
+    : _type = ValueType.Bool,
+      _width = BitWidth.width8,
+      _value = value;
 
   _StackValue.withDouble(double value)
-      : _type = ValueType.Float,
-        _width = BitWidthUtil.width(value),
-        _value = value;
+    : _type = ValueType.Float,
+      _width = BitWidthUtil.width(value),
+      _value = value;
 
   _StackValue.withOffset(int value, ValueType type, BitWidth width)
-      : _offset = value,
-        _type = type,
-        _width = width;
+    : _offset = value,
+      _type = type,
+      _width = width;
 
   BitWidth storedWidth({BitWidth width = BitWidth.width8}) {
     return ValueTypeUtils.isInline(_type)
@@ -562,16 +592,16 @@
     final offset = _offset!;
     for (var i = 0; i < 4; i++) {
       final width = 1 << i;
-      final bitWidth = BitWidthUtil.uwidth(size +
-          BitWidthUtil.paddingSize(size, width) +
-          index * width -
-          offset);
+      final bitWidth = BitWidthUtil.uwidth(
+        size + BitWidthUtil.paddingSize(size, width) + index * width - offset,
+      );
       if (1 << bitWidth.index == width) {
         return bitWidth;
       }
     }
     throw StateError(
-        'Element is of unknown. Size: $size at index: $index. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new');
+      'Element is of unknown. Size: $size at index: $index. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new',
+    );
   }
 
   List<int> asU8List(BitWidth width) {
@@ -619,7 +649,8 @@
     }
 
     throw StateError(
-        'Unexpected type: $_type. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new');
+      'Unexpected type: $_type. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new',
+    );
   }
 
   ValueType get type {
diff --git a/dart/lib/src/reference.dart b/dart/lib/src/reference.dart
index 66195c1..2abba10 100644
--- a/dart/lib/src/reference.dart
+++ b/dart/lib/src/reference.dart
@@ -1,6 +1,7 @@
 import 'dart:collection';
 import 'dart:convert';
 import 'dart:typed_data';
+
 import 'types.dart';
 
 /// Main class to read a value out of a FlexBuffer.
@@ -16,10 +17,15 @@
   int? _length;
 
   Reference._(
-      this._buffer, this._offset, this._parentWidth, int packedType, this._path,
-      [int? byteWidth, ValueType? valueType])
-      : _byteWidth = byteWidth ?? 1 << (packedType & 3),
-        _valueType = valueType ?? ValueTypeUtils.fromInt(packedType >> 2);
+    this._buffer,
+    this._offset,
+    this._parentWidth,
+    int packedType,
+    this._path, [
+    int? byteWidth,
+    ValueType? valueType,
+  ]) : _byteWidth = byteWidth ?? 1 << (packedType & 3),
+       _valueType = valueType ?? ValueTypeUtils.fromInt(packedType >> 2);
 
   /// Use this method to access the root value of a FlexBuffer.
   static Reference fromBuffer(ByteBuffer buffer) {
@@ -31,8 +37,13 @@
     final byteWidth = byteData.getUint8(len - 1);
     final packedType = byteData.getUint8(len - 2);
     final offset = len - byteWidth - 2;
-    return Reference._(ByteData.view(buffer), offset,
-        BitWidthUtil.fromByteWidth(byteWidth), packedType, "/");
+    return Reference._(
+      ByteData.view(buffer),
+      offset,
+      BitWidthUtil.fromByteWidth(byteWidth),
+      packedType,
+      "/",
+    );
   }
 
   /// Returns true if the underlying value is null.
@@ -138,7 +149,8 @@
       final index = key;
       if (index >= length || index < 0) {
         throw ArgumentError(
-            'Key: [$key] is not applicable on: $_path of: $_valueType length: $length');
+          'Key: [$key] is not applicable on: $_path of: $_valueType length: $length',
+        );
       }
       final elementOffset = _indirect + index * _byteWidth;
       int packedType = 0;
@@ -154,13 +166,14 @@
         packedType = _buffer.getUint8(_indirect + length * _byteWidth + index);
       }
       return Reference._(
-          _buffer,
-          elementOffset,
-          BitWidthUtil.fromByteWidth(_byteWidth),
-          packedType,
-          "$_path[$index]",
-          byteWidth,
-          valueType);
+        _buffer,
+        elementOffset,
+        BitWidthUtil.fromByteWidth(_byteWidth),
+        packedType,
+        "$_path[$index]",
+        byteWidth,
+        valueType,
+      );
     }
     if (key is String && _valueType == ValueType.Map) {
       final index = _keyIndex(key);
@@ -169,7 +182,8 @@
       }
     }
     throw ArgumentError(
-        'Key: [$key] is not applicable on: $_path of: $_valueType');
+      'Key: [$key] is not applicable on: $_path of: $_valueType',
+    );
   }
 
   /// Get an iterable if the underlying flexBuffer value is a vector.
@@ -213,18 +227,24 @@
           ValueTypeUtils.isAVector(_valueType) ||
           _valueType == ValueType.Map) {
         _length = _readUInt(
-            _indirect - _byteWidth, BitWidthUtil.fromByteWidth(_byteWidth));
+          _indirect - _byteWidth,
+          BitWidthUtil.fromByteWidth(_byteWidth),
+        );
       } else if (_valueType == ValueType.Null) {
         _length = 0;
       } else if (_valueType == ValueType.String) {
         final indirect = _indirect;
         var sizeByteWidth = _byteWidth;
-        var size = _readUInt(indirect - sizeByteWidth,
-            BitWidthUtil.fromByteWidth(sizeByteWidth));
+        var size = _readUInt(
+          indirect - sizeByteWidth,
+          BitWidthUtil.fromByteWidth(sizeByteWidth),
+        );
         while (_buffer.getInt8(indirect + size) != 0) {
           sizeByteWidth <<= 1;
-          size = _readUInt(indirect - sizeByteWidth,
-              BitWidthUtil.fromByteWidth(sizeByteWidth));
+          size = _readUInt(
+            indirect - sizeByteWidth,
+            BitWidthUtil.fromByteWidth(sizeByteWidth),
+          );
         }
         _length = size;
       } else if (_valueType == ValueType.Key) {
@@ -289,7 +309,8 @@
       return result.toString();
     }
     throw UnsupportedError(
-        'Type: $_valueType is not supported for JSON conversion');
+      'Type: $_valueType is not supported for JSON conversion',
+    );
   }
 
   /// Computes the indirect offset of the value.
@@ -354,10 +375,13 @@
   int? _keyIndex(String key) {
     final input = utf8.encode(key);
     final keysVectorOffset = _indirect - _byteWidth * 3;
-    final indirectOffset = keysVectorOffset -
+    final indirectOffset =
+        keysVectorOffset -
         _readUInt(keysVectorOffset, BitWidthUtil.fromByteWidth(_byteWidth));
     final byteWidth = _readUInt(
-        keysVectorOffset + _byteWidth, BitWidthUtil.fromByteWidth(_byteWidth));
+      keysVectorOffset + _byteWidth,
+      BitWidthUtil.fromByteWidth(_byteWidth),
+    );
     var low = 0;
     var high = length - 1;
     while (low <= high) {
@@ -390,24 +414,37 @@
     final indirect = _indirect;
     final elementOffset = indirect + index * _byteWidth;
     final packedType = _buffer.getUint8(indirect + length * _byteWidth + index);
-    return Reference._(_buffer, elementOffset,
-        BitWidthUtil.fromByteWidth(_byteWidth), packedType, "$_path/$key");
+    return Reference._(
+      _buffer,
+      elementOffset,
+      BitWidthUtil.fromByteWidth(_byteWidth),
+      packedType,
+      "$_path/$key",
+    );
   }
 
   Reference _valueForIndex(int index) {
     final indirect = _indirect;
     final elementOffset = indirect + index * _byteWidth;
     final packedType = _buffer.getUint8(indirect + length * _byteWidth + index);
-    return Reference._(_buffer, elementOffset,
-        BitWidthUtil.fromByteWidth(_byteWidth), packedType, "$_path/[$index]");
+    return Reference._(
+      _buffer,
+      elementOffset,
+      BitWidthUtil.fromByteWidth(_byteWidth),
+      packedType,
+      "$_path/[$index]",
+    );
   }
 
   String _keyForIndex(int index) {
     final keysVectorOffset = _indirect - _byteWidth * 3;
-    final indirectOffset = keysVectorOffset -
+    final indirectOffset =
+        keysVectorOffset -
         _readUInt(keysVectorOffset, BitWidthUtil.fromByteWidth(_byteWidth));
     final byteWidth = _readUInt(
-        keysVectorOffset + _byteWidth, BitWidthUtil.fromByteWidth(_byteWidth));
+      keysVectorOffset + _byteWidth,
+      BitWidthUtil.fromByteWidth(_byteWidth),
+    );
     final keyOffset = indirectOffset + index * byteWidth;
     final keyIndirectOffset =
         keyOffset - _readUInt(keyOffset, BitWidthUtil.fromByteWidth(byteWidth));
diff --git a/dart/lib/src/types.dart b/dart/lib/src/types.dart
index b4d0060..653eabd 100644
--- a/dart/lib/src/types.dart
+++ b/dart/lib/src/types.dart
@@ -86,7 +86,8 @@
   VectorFloat,
   VectorKey,
   @Deprecated(
-      'VectorString is deprecated due to a flaw in the binary format (https://github.com/google/flatbuffers/issues/5627)')
+    'VectorString is deprecated due to a flaw in the binary format (https://github.com/google/flatbuffers/issues/5627)',
+  )
   VectorString,
   VectorInt2,
   VectorUInt2,
@@ -99,7 +100,7 @@
   VectorFloat4,
   Blob,
   Bool,
-  VectorBool
+  VectorBool,
 }
 
 class ValueTypeUtils {
@@ -153,31 +154,37 @@
   static ValueType toTypedVector(ValueType self, int length) {
     if (length == 0) {
       return ValueTypeUtils.fromInt(
-          toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt));
+        toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt),
+      );
     }
     if (length == 2) {
       return ValueTypeUtils.fromInt(
-          toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt2));
+        toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt2),
+      );
     }
     if (length == 3) {
       return ValueTypeUtils.fromInt(
-          toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt3));
+        toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt3),
+      );
     }
     if (length == 4) {
       return ValueTypeUtils.fromInt(
-          toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt4));
+        toInt(self) - toInt(ValueType.Int) + toInt(ValueType.VectorInt4),
+      );
     }
     throw Exception('unexpected length ' + length.toString());
   }
 
   static ValueType typedVectorElementType(ValueType self) {
     return ValueTypeUtils.fromInt(
-        toInt(self) - toInt(ValueType.VectorInt) + toInt(ValueType.Int));
+      toInt(self) - toInt(ValueType.VectorInt) + toInt(ValueType.Int),
+    );
   }
 
   static ValueType fixedTypedVectorElementType(ValueType self) {
     return ValueTypeUtils.fromInt(
-        (toInt(self) - toInt(ValueType.VectorInt2)) % 3 + toInt(ValueType.Int));
+      (toInt(self) - toInt(ValueType.VectorInt2)) % 3 + toInt(ValueType.Int),
+    );
   }
 
   static int fixedTypedVectorElementSize(ValueType self) {
diff --git a/dart/test/bool_structs_generated.dart b/dart/test/bool_structs_generated.dart
index b123ba1..ec47327 100644
--- a/dart/test/bool_structs_generated.dart
+++ b/dart/test/bool_structs_generated.dart
@@ -2,8 +2,8 @@
 // ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable, constant_identifier_names
 
 import 'dart:typed_data' show Uint8List;
-import 'package:flat_buffers/flat_buffers.dart' as fb;
 
+import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 class Foo {
   Foo._(this._bc, this._bcOffset);
@@ -17,15 +17,15 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  FooProperties? get myFoo => FooProperties.reader.vTableGetNullable(_bc, _bcOffset, 4);
+  FooProperties? get myFoo =>
+      FooProperties.reader.vTableGetNullable(_bc, _bcOffset, 4);
 
   @override
   String toString() {
     return 'Foo{myFoo: ${myFoo}}';
   }
 
-  FooT unpack() => FooT(
-      myFoo: myFoo?.unpack());
+  FooT unpack() => FooT(myFoo: myFoo?.unpack());
 
   static int pack(fb.Builder fbBuilder, FooT? object) {
     if (object == null) return 0;
@@ -36,8 +36,7 @@
 class FooT implements fb.Packable {
   FooPropertiesT? myFoo;
 
-  FooT({
-      this.myFoo});
+  FooT({this.myFoo});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -58,8 +57,7 @@
   const _FooReader();
 
   @override
-  Foo createObject(fb.BufferContext bc, int offset) => 
-    Foo._(bc, offset);
+  Foo createObject(fb.BufferContext bc, int offset) => Foo._(bc, offset);
 }
 
 class FooBuilder {
@@ -84,10 +82,7 @@
 class FooObjectBuilder extends fb.ObjectBuilder {
   final FooPropertiesObjectBuilder? _myFoo;
 
-  FooObjectBuilder({
-    FooPropertiesObjectBuilder? myFoo,
-  })
-      : _myFoo = myFoo;
+  FooObjectBuilder({FooPropertiesObjectBuilder? myFoo}) : _myFoo = myFoo;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -107,6 +102,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class FooProperties {
   FooProperties._(this._bc, this._bcOffset);
 
@@ -123,9 +119,7 @@
     return 'FooProperties{a: ${a}, b: ${b}}';
   }
 
-  FooPropertiesT unpack() => FooPropertiesT(
-      a: a,
-      b: b);
+  FooPropertiesT unpack() => FooPropertiesT(a: a, b: b);
 
   static int pack(fb.Builder fbBuilder, FooPropertiesT? object) {
     if (object == null) return 0;
@@ -137,9 +131,7 @@
   bool a;
   bool b;
 
-  FooPropertiesT({
-      required this.a,
-      required this.b});
+  FooPropertiesT({required this.a, required this.b});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -161,8 +153,8 @@
   int get size => 2;
 
   @override
-  FooProperties createObject(fb.BufferContext bc, int offset) => 
-    FooProperties._(bc, offset);
+  FooProperties createObject(fb.BufferContext bc, int offset) =>
+      FooProperties._(bc, offset);
 }
 
 class FooPropertiesBuilder {
@@ -175,19 +167,15 @@
     fbBuilder.putBool(a);
     return fbBuilder.offset;
   }
-
 }
 
 class FooPropertiesObjectBuilder extends fb.ObjectBuilder {
   final bool _a;
   final bool _b;
 
-  FooPropertiesObjectBuilder({
-    required bool a,
-    required bool b,
-  })
-      : _a = a,
-        _b = b;
+  FooPropertiesObjectBuilder({required bool a, required bool b})
+    : _a = a,
+      _b = b;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/dart/test/enums_generated.dart b/dart/test/enums_generated.dart
index e2b8c50..b57e8fa 100644
--- a/dart/test/enums_generated.dart
+++ b/dart/test/enums_generated.dart
@@ -2,8 +2,8 @@
 // ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable, constant_identifier_names
 
 import 'dart:typed_data' show Uint8List;
-import 'package:flat_buffers/flat_buffers.dart' as fb;
 
+import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 enum OptionsEnum {
   A(1),
@@ -15,10 +15,14 @@
 
   factory OptionsEnum.fromValue(int value) {
     switch (value) {
-      case 1: return OptionsEnum.A;
-      case 2: return OptionsEnum.B;
-      case 3: return OptionsEnum.C;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 1:
+        return OptionsEnum.A;
+      case 2:
+        return OptionsEnum.B;
+      case 3:
+        return OptionsEnum.C;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -53,7 +57,9 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  List<OptionsEnum>? get options => const fb.ListReader<OptionsEnum>(OptionsEnum.reader).vTableGetNullable(_bc, _bcOffset, 4);
+  List<OptionsEnum>? get options => const fb.ListReader<OptionsEnum>(
+    OptionsEnum.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 4);
 
   @override
   String toString() {
@@ -61,7 +67,11 @@
   }
 
   MyTableT unpack() => MyTableT(
-      options: const fb.ListReader<OptionsEnum>(OptionsEnum.reader, lazy: false).vTableGetNullable(_bc, _bcOffset, 4));
+    options: const fb.ListReader<OptionsEnum>(
+      OptionsEnum.reader,
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 4),
+  );
 
   static int pack(fb.Builder fbBuilder, MyTableT? object) {
     if (object == null) return 0;
@@ -72,12 +82,12 @@
 class MyTableT implements fb.Packable {
   List<OptionsEnum>? options;
 
-  MyTableT({
-      this.options});
+  MyTableT({this.options});
 
   @override
   int pack(fb.Builder fbBuilder) {
-    final int? optionsOffset = options == null ? null
+    final int? optionsOffset = options == null
+        ? null
         : fbBuilder.writeListUint32(options!.map((f) => f.value).toList());
     fbBuilder.startTable(1);
     fbBuilder.addOffset(0, optionsOffset);
@@ -94,8 +104,8 @@
   const _MyTableReader();
 
   @override
-  MyTable createObject(fb.BufferContext bc, int offset) => 
-    MyTable._(bc, offset);
+  MyTable createObject(fb.BufferContext bc, int offset) =>
+      MyTable._(bc, offset);
 }
 
 class MyTableBuilder {
@@ -120,15 +130,13 @@
 class MyTableObjectBuilder extends fb.ObjectBuilder {
   final List<OptionsEnum>? _options;
 
-  MyTableObjectBuilder({
-    List<OptionsEnum>? options,
-  })
-      : _options = options;
+  MyTableObjectBuilder({List<OptionsEnum>? options}) : _options = options;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? optionsOffset = _options == null ? null
+    final int? optionsOffset = _options == null
+        ? null
         : fbBuilder.writeListUint32(_options!.map((f) => f.value).toList());
     fbBuilder.startTable(1);
     fbBuilder.addOffset(0, optionsOffset);
diff --git a/dart/test/flat_buffers_test.dart b/dart/test/flat_buffers_test.dart
index b872cfb..275a2ef 100644
--- a/dart/test/flat_buffers_test.dart
+++ b/dart/test/flat_buffers_test.dart
@@ -1,16 +1,15 @@
-import 'dart:typed_data';
 import 'dart:io' as io;
-
-import 'package:path/path.dart' as path;
+import 'dart:typed_data';
 
 import 'package:flat_buffers/flat_buffers.dart';
+import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import './monster_test_my_game.example_generated.dart' as example;
-import './monster_test_my_game.example2_generated.dart' as example2;
-import 'enums_generated.dart' as example3;
 import './bool_structs_generated.dart' as example4;
+import './monster_test_my_game.example2_generated.dart' as example2;
+import './monster_test_my_game.example_generated.dart' as example;
+import 'enums_generated.dart' as example3;
 
 main() {
   defineReflectiveSuite(() {
@@ -29,11 +28,9 @@
 @reflectiveTest
 class CheckOtherLangaugesData {
   test_cppData() async {
-    List<int> data = await io.File(path.join(
-      path.context.current,
-      'test',
-      'monsterdata_test.mon',
-    )).readAsBytes();
+    List<int> data = await io.File(
+      path.join(path.context.current, 'test', 'monsterdata_test.mon'),
+    ).readAsBytes();
     example.Monster mon = example.Monster(data);
     expect(mon.hp, 80);
     expect(mon.mana, 150);
@@ -61,91 +58,92 @@
 
     // this will fail if accessing any field fails.
     expect(
-        mon.toString(),
-        'Monster{'
-        'pos: Vec3{x: 1.0, y: 2.0, z: 3.0, test1: 3.0, test2: Color.Green, test3: Test{a: 5, b: 6}}, '
-        'mana: 150, hp: 80, name: MyMonster, inventory: [0, 1, 2, 3, 4], '
-        'color: Color.Blue, testType: AnyTypeId.Monster, '
-        'test: Monster{pos: null, mana: 150, hp: 100, name: Fred, '
-        'inventory: null, color: Color.Blue, testType: null, '
-        'test: null, test4: null, testarrayofstring: null, '
-        'testarrayoftables: null, enemy: null, testnestedflatbuffer: null, '
-        'testempty: null, testbool: false, testhashs32Fnv1: 0, '
-        'testhashu32Fnv1: 0, testhashs64Fnv1: 0, testhashu64Fnv1: 0, '
-        'testhashs32Fnv1a: 0, testhashu32Fnv1a: 0, testhashs64Fnv1a: 0, '
-        'testhashu64Fnv1a: 0, testarrayofbools: null, testf: 3.14159, '
-        'testf2: 3.0, testf3: 0.0, testarrayofstring2: null, '
-        'testarrayofsortedstruct: null, flex: null, test5: null, '
-        'vectorOfLongs: null, vectorOfDoubles: null, parentNamespaceTest: null, '
-        'vectorOfReferrables: null, singleWeakReference: 0, '
-        'vectorOfWeakReferences: null, vectorOfStrongReferrables: null, '
-        'coOwningReference: 0, vectorOfCoOwningReferences: null, '
-        'nonOwningReference: 0, vectorOfNonOwningReferences: null, '
-        'anyUniqueType: null, anyUnique: null, anyAmbiguousType: null, '
-        'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
-        'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, '
-        'nativeInline: null, '
-        'longEnumNonEnumDefault: LongEnum._default, '
-        'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
-        'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
-        'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
-        '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, '
-        'test4: [Test{a: 10, b: 20}, Test{a: 30, b: 40}], '
-        'testarrayofstring: [test1, test2], testarrayoftables: null, '
-        'enemy: Monster{pos: null, mana: 150, hp: 100, name: Fred, '
-        'inventory: null, color: Color.Blue, testType: null, '
-        'test: null, test4: null, testarrayofstring: null, '
-        'testarrayoftables: null, enemy: null, testnestedflatbuffer: null, '
-        'testempty: null, testbool: false, testhashs32Fnv1: 0, '
-        'testhashu32Fnv1: 0, testhashs64Fnv1: 0, testhashu64Fnv1: 0, '
-        'testhashs32Fnv1a: 0, testhashu32Fnv1a: 0, testhashs64Fnv1a: 0, '
-        'testhashu64Fnv1a: 0, testarrayofbools: null, testf: 3.14159, '
-        'testf2: 3.0, testf3: 0.0, testarrayofstring2: null, '
-        'testarrayofsortedstruct: null, flex: null, test5: null, '
-        'vectorOfLongs: null, vectorOfDoubles: null, parentNamespaceTest: null, '
-        'vectorOfReferrables: null, singleWeakReference: 0, '
-        'vectorOfWeakReferences: null, vectorOfStrongReferrables: null, '
-        'coOwningReference: 0, vectorOfCoOwningReferences: null, '
-        'nonOwningReference: 0, vectorOfNonOwningReferences: null, '
-        'anyUniqueType: null, anyUnique: null, anyAmbiguousType: null, '
-        'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
-        'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, '
-        'nativeInline: null, '
-        'longEnumNonEnumDefault: LongEnum._default, '
-        'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
-        'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
-        'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
-        '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, '
-        'testnestedflatbuffer: null, testempty: null, testbool: true, '
-        'testhashs32Fnv1: -579221183, testhashu32Fnv1: 3715746113, '
-        'testhashs64Fnv1: 7930699090847568257, '
-        'testhashu64Fnv1: 7930699090847568257, '
-        'testhashs32Fnv1a: -1904106383, testhashu32Fnv1a: 2390860913, '
-        'testhashs64Fnv1a: 4898026182817603057, '
-        'testhashu64Fnv1a: 4898026182817603057, '
-        'testarrayofbools: [true, false, true], testf: 3.14159, testf2: 3.0, '
-        'testf3: 0.0, testarrayofstring2: null, testarrayofsortedstruct: ['
-        'Ability{id: 0, distance: 45}, Ability{id: 1, distance: 21}, '
-        'Ability{id: 5, distance: 12}], '
-        'flex: null, test5: [Test{a: 10, b: 20}, Test{a: 30, b: 40}], '
-        'vectorOfLongs: [1, 100, 10000, 1000000, 100000000], '
-        'vectorOfDoubles: [-1.7976931348623157e+308, 0.0, 1.7976931348623157e+308], '
-        'parentNamespaceTest: null, vectorOfReferrables: null, '
-        'singleWeakReference: 0, vectorOfWeakReferences: null, '
-        'vectorOfStrongReferrables: null, coOwningReference: 0, '
-        'vectorOfCoOwningReferences: null, nonOwningReference: 0, '
-        'vectorOfNonOwningReferences: null, '
-        'anyUniqueType: null, anyUnique: null, '
-        'anyAmbiguousType: null, '
-        'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
-        'testrequirednestedflatbuffer: null, scalarKeySortedTables: [Stat{id: '
-        'miss, val: 0, count: 0}, Stat{id: hit, val: 10, count: 1}], '
-        'nativeInline: Test{a: 1, b: 2}, '
-        'longEnumNonEnumDefault: LongEnum._default, '
-        'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
-        'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
-        'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
-        '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}');
+      mon.toString(),
+      'Monster{'
+      'pos: Vec3{x: 1.0, y: 2.0, z: 3.0, test1: 3.0, test2: Color.Green, test3: Test{a: 5, b: 6}}, '
+      'mana: 150, hp: 80, name: MyMonster, inventory: [0, 1, 2, 3, 4], '
+      'color: Color.Blue, testType: AnyTypeId.Monster, '
+      'test: Monster{pos: null, mana: 150, hp: 100, name: Fred, '
+      'inventory: null, color: Color.Blue, testType: null, '
+      'test: null, test4: null, testarrayofstring: null, '
+      'testarrayoftables: null, enemy: null, testnestedflatbuffer: null, '
+      'testempty: null, testbool: false, testhashs32Fnv1: 0, '
+      'testhashu32Fnv1: 0, testhashs64Fnv1: 0, testhashu64Fnv1: 0, '
+      'testhashs32Fnv1a: 0, testhashu32Fnv1a: 0, testhashs64Fnv1a: 0, '
+      'testhashu64Fnv1a: 0, testarrayofbools: null, testf: 3.14159, '
+      'testf2: 3.0, testf3: 0.0, testarrayofstring2: null, '
+      'testarrayofsortedstruct: null, flex: null, test5: null, '
+      'vectorOfLongs: null, vectorOfDoubles: null, parentNamespaceTest: null, '
+      'vectorOfReferrables: null, singleWeakReference: 0, '
+      'vectorOfWeakReferences: null, vectorOfStrongReferrables: null, '
+      'coOwningReference: 0, vectorOfCoOwningReferences: null, '
+      'nonOwningReference: 0, vectorOfNonOwningReferences: null, '
+      'anyUniqueType: null, anyUnique: null, anyAmbiguousType: null, '
+      'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
+      'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, '
+      'nativeInline: null, '
+      'longEnumNonEnumDefault: LongEnum._default, '
+      'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
+      'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
+      'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
+      '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, '
+      'test4: [Test{a: 10, b: 20}, Test{a: 30, b: 40}], '
+      'testarrayofstring: [test1, test2], testarrayoftables: null, '
+      'enemy: Monster{pos: null, mana: 150, hp: 100, name: Fred, '
+      'inventory: null, color: Color.Blue, testType: null, '
+      'test: null, test4: null, testarrayofstring: null, '
+      'testarrayoftables: null, enemy: null, testnestedflatbuffer: null, '
+      'testempty: null, testbool: false, testhashs32Fnv1: 0, '
+      'testhashu32Fnv1: 0, testhashs64Fnv1: 0, testhashu64Fnv1: 0, '
+      'testhashs32Fnv1a: 0, testhashu32Fnv1a: 0, testhashs64Fnv1a: 0, '
+      'testhashu64Fnv1a: 0, testarrayofbools: null, testf: 3.14159, '
+      'testf2: 3.0, testf3: 0.0, testarrayofstring2: null, '
+      'testarrayofsortedstruct: null, flex: null, test5: null, '
+      'vectorOfLongs: null, vectorOfDoubles: null, parentNamespaceTest: null, '
+      'vectorOfReferrables: null, singleWeakReference: 0, '
+      'vectorOfWeakReferences: null, vectorOfStrongReferrables: null, '
+      'coOwningReference: 0, vectorOfCoOwningReferences: null, '
+      'nonOwningReference: 0, vectorOfNonOwningReferences: null, '
+      'anyUniqueType: null, anyUnique: null, anyAmbiguousType: null, '
+      'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
+      'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, '
+      'nativeInline: null, '
+      'longEnumNonEnumDefault: LongEnum._default, '
+      'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
+      'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
+      'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
+      '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, '
+      'testnestedflatbuffer: null, testempty: null, testbool: true, '
+      'testhashs32Fnv1: -579221183, testhashu32Fnv1: 3715746113, '
+      'testhashs64Fnv1: 7930699090847568257, '
+      'testhashu64Fnv1: 7930699090847568257, '
+      'testhashs32Fnv1a: -1904106383, testhashu32Fnv1a: 2390860913, '
+      'testhashs64Fnv1a: 4898026182817603057, '
+      'testhashu64Fnv1a: 4898026182817603057, '
+      'testarrayofbools: [true, false, true], testf: 3.14159, testf2: 3.0, '
+      'testf3: 0.0, testarrayofstring2: null, testarrayofsortedstruct: ['
+      'Ability{id: 0, distance: 45}, Ability{id: 1, distance: 21}, '
+      'Ability{id: 5, distance: 12}], '
+      'flex: null, test5: [Test{a: 10, b: 20}, Test{a: 30, b: 40}], '
+      'vectorOfLongs: [1, 100, 10000, 1000000, 100000000], '
+      'vectorOfDoubles: [-1.7976931348623157e+308, 0.0, 1.7976931348623157e+308], '
+      'parentNamespaceTest: null, vectorOfReferrables: null, '
+      'singleWeakReference: 0, vectorOfWeakReferences: null, '
+      'vectorOfStrongReferrables: null, coOwningReference: 0, '
+      'vectorOfCoOwningReferences: null, nonOwningReference: 0, '
+      'vectorOfNonOwningReferences: null, '
+      'anyUniqueType: null, anyUnique: null, '
+      'anyAmbiguousType: null, '
+      'anyAmbiguous: null, vectorOfEnums: null, signedEnum: Race.None, '
+      'testrequirednestedflatbuffer: null, scalarKeySortedTables: [Stat{id: '
+      'miss, val: 0, count: 0}, Stat{id: hit, val: 10, count: 1}], '
+      'nativeInline: Test{a: 1, b: 2}, '
+      'longEnumNonEnumDefault: LongEnum._default, '
+      'longEnumNormalDefault: LongEnum.LongOne, nanDefault: NaN, '
+      'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
+      'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
+      '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}',
+    );
   }
 }
 
@@ -298,20 +296,72 @@
     expect(allocator.buffer(builder.size()), [2, 0, 0, 0, 0, 0, 0, 1]);
 
     builder.putUint8(3);
-    expect(
-        allocator.buffer(builder.size()), [0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 1]);
+    expect(allocator.buffer(builder.size()), [
+      0,
+      0,
+      0,
+      3,
+      2,
+      0,
+      0,
+      0,
+      0,
+      0,
+      0,
+      1,
+    ]);
 
     builder.putUint8(4);
-    expect(
-        allocator.buffer(builder.size()), [0, 0, 4, 3, 2, 0, 0, 0, 0, 0, 0, 1]);
+    expect(allocator.buffer(builder.size()), [
+      0,
+      0,
+      4,
+      3,
+      2,
+      0,
+      0,
+      0,
+      0,
+      0,
+      0,
+      1,
+    ]);
 
     builder.putUint8(5);
-    expect(
-        allocator.buffer(builder.size()), [0, 5, 4, 3, 2, 0, 0, 0, 0, 0, 0, 1]);
+    expect(allocator.buffer(builder.size()), [
+      0,
+      5,
+      4,
+      3,
+      2,
+      0,
+      0,
+      0,
+      0,
+      0,
+      0,
+      1,
+    ]);
 
     builder.putUint32(6);
-    expect(allocator.buffer(builder.size()),
-        [6, 0, 0, 0, 0, 5, 4, 3, 2, 0, 0, 0, 0, 0, 0, 1]);
+    expect(allocator.buffer(builder.size()), [
+      6,
+      0,
+      0,
+      0,
+      0,
+      5,
+      4,
+      3,
+      2,
+      0,
+      0,
+      0,
+      0,
+      0,
+      0,
+      1,
+    ]);
   }
 
   void test_table_default() {
@@ -331,14 +381,14 @@
     int objectOffset = buffer.derefObject(0);
     // was not written, so uses the new default value
     expect(
-        const Int32Reader()
-            .vTableGet(buffer, objectOffset, indexToField(0), 15),
-        15);
+      const Int32Reader().vTableGet(buffer, objectOffset, indexToField(0), 15),
+      15,
+    );
     // has the written value
     expect(
-        const Int32Reader()
-            .vTableGet(buffer, objectOffset, indexToField(1), 15),
-        20);
+      const Int32Reader().vTableGet(buffer, objectOffset, indexToField(1), 15),
+      20,
+    );
   }
 
   void test_table_format([Builder? builder]) {
@@ -370,7 +420,9 @@
     for (int i = 0; i < 3; i++) {
       int offset = byteData.getUint16(vTableLoc + 4 + 2 * i, Endian.little);
       expect(
-          byteData.getInt32(tableDataLoc + offset, Endian.little), 10 + 10 * i);
+        byteData.getInt32(tableDataLoc + offset, Endian.little),
+        10 + 10 * i,
+      );
     }
   }
 
@@ -380,10 +432,14 @@
     List<int> byteList;
     {
       Builder builder = Builder(initialSize: 0);
-      int? latinStringOffset =
-          builder.writeString(latinString, asciiOptimization: true);
-      int? unicodeStringOffset =
-          builder.writeString(unicodeString, asciiOptimization: true);
+      int? latinStringOffset = builder.writeString(
+        latinString,
+        asciiOptimization: true,
+      );
+      int? unicodeStringOffset = builder.writeString(
+        unicodeString,
+        asciiOptimization: true,
+      );
       builder.startTable(2);
       builder.addOffset(0, latinStringOffset);
       builder.addOffset(1, unicodeStringOffset);
@@ -395,13 +451,19 @@
     BufferContext buf = BufferContext.fromBytes(byteList);
     int objectOffset = buf.derefObject(0);
     expect(
-        const StringReader()
-            .vTableGetNullable(buf, objectOffset, indexToField(0)),
-        latinString);
+      const StringReader().vTableGetNullable(
+        buf,
+        objectOffset,
+        indexToField(0),
+      ),
+      latinString,
+    );
     expect(
-        const StringReader(asciiOptimization: true)
-            .vTableGetNullable(buf, objectOffset, indexToField(1)),
-        unicodeString);
+      const StringReader(
+        asciiOptimization: true,
+      ).vTableGetNullable(buf, objectOffset, indexToField(1)),
+      unicodeString,
+    );
   }
 
   void test_table_types([Builder? builder]) {
@@ -425,33 +487,41 @@
     BufferContext buf = BufferContext.fromBytes(byteList);
     int objectOffset = buf.derefObject(0);
     expect(
-        const BoolReader()
-            .vTableGetNullable(buf, objectOffset, indexToField(0)),
-        true);
+      const BoolReader().vTableGetNullable(buf, objectOffset, indexToField(0)),
+      true,
+    );
     expect(
-        const Int8Reader()
-            .vTableGetNullable(buf, objectOffset, indexToField(1)),
-        10);
+      const Int8Reader().vTableGetNullable(buf, objectOffset, indexToField(1)),
+      10,
+    );
     expect(
-        const Int32Reader()
-            .vTableGetNullable(buf, objectOffset, indexToField(2)),
-        20);
+      const Int32Reader().vTableGetNullable(buf, objectOffset, indexToField(2)),
+      20,
+    );
     expect(
-        const StringReader()
-            .vTableGetNullable(buf, objectOffset, indexToField(3)),
-        '12345');
+      const StringReader().vTableGetNullable(
+        buf,
+        objectOffset,
+        indexToField(3),
+      ),
+      '12345',
+    );
     expect(
-        const Int32Reader()
-            .vTableGetNullable(buf, objectOffset, indexToField(4)),
-        40);
+      const Int32Reader().vTableGetNullable(buf, objectOffset, indexToField(4)),
+      40,
+    );
     expect(
-        const Uint32Reader()
-            .vTableGetNullable(buf, objectOffset, indexToField(5)),
-        0x9ABCDEF0);
+      const Uint32Reader().vTableGetNullable(
+        buf,
+        objectOffset,
+        indexToField(5),
+      ),
+      0x9ABCDEF0,
+    );
     expect(
-        const Uint8Reader()
-            .vTableGetNullable(buf, objectOffset, indexToField(6)),
-        0x9A);
+      const Uint8Reader().vTableGetNullable(buf, objectOffset, indexToField(6)),
+      0x9A,
+    );
   }
 
   void test_writeList_of_Uint32() {
@@ -596,8 +666,9 @@
     }
     // read and verify
     BufferContext buf = BufferContext.fromBytes(byteList);
-    List<TestPointImpl> items =
-        const ListReader<TestPointImpl>(TestPointReader()).read(buf, 0);
+    List<TestPointImpl> items = const ListReader<TestPointImpl>(
+      TestPointReader(),
+    ).read(buf, 0);
     expect(items, hasLength(2));
     expect(items[0].x, 10);
     expect(items[0].y, 20);
@@ -627,8 +698,10 @@
     List<int> byteList;
     {
       builder ??= Builder(initialSize: 0);
-      int listOffset = builder.writeList(
-          [builder.writeString('12345'), builder.writeString('ABC')]);
+      int listOffset = builder.writeList([
+        builder.writeString('12345'),
+        builder.writeString('ABC'),
+      ]);
       builder.startTable(1);
       builder.addOffset(0, listOffset);
       int offset = builder.endTable();
@@ -707,13 +780,14 @@
       test_table_format,
       test_table_types,
       test_writeList_ofObjects,
-      test_writeList_ofStrings_inObject
+      test_writeList_ofStrings_inObject,
     ];
 
     // Execute all test cases in all permutations of their order.
     // To do that, we generate permutations of test case indexes.
-    final testCasesPermutations =
-        _permutationsOf(List.generate(testCases.length, (index) => index));
+    final testCasesPermutations = _permutationsOf(
+      List.generate(testCases.length, (index) => index),
+    );
     expect(testCasesPermutations.length, _factorial(testCases.length));
 
     for (var indexes in testCasesPermutations) {
@@ -783,12 +857,13 @@
   void test_tableMonster() {
     final monster = example.MonsterT()
       ..pos = example.Vec3T(
-          x: 1,
-          y: 2,
-          z: 3,
-          test1: 4.0,
-          test2: example.Color.Red,
-          test3: example.TestT(a: 1, b: 2))
+        x: 1,
+        y: 2,
+        z: 3,
+        test1: 4.0,
+        test2: example.Color.Red,
+        test3: example.TestT(a: 1, b: 2),
+      )
       ..mana = 2
       ..name = 'Monstrous'
       ..inventory = [24, 42]
@@ -804,7 +879,7 @@
       ..testf = 42.24
       ..testarrayofsortedstruct = [
         example.AbilityT(id: 1, distance: 5),
-        example.AbilityT(id: 3, distance: 7)
+        example.AbilityT(id: 3, distance: 7),
       ]
       ..vectorOfLongs = [5, 6, 7]
       ..vectorOfDoubles = [8.9, 9.0, 10.1, 11.2]
@@ -867,8 +942,9 @@
 
   StringListWrapperImpl(this.bp, this.offset);
 
-  List<String>? get items => const ListReader<String>(StringReader())
-      .vTableGetNullable(bp, offset, indexToField(0));
+  List<String>? get items => const ListReader<String>(
+    StringReader(),
+  ).vTableGetNullable(bp, offset, indexToField(0));
 }
 
 class StringListWrapperReader extends TableReader<StringListWrapperImpl> {
@@ -906,10 +982,14 @@
     expect(example.Color.values, same(example.Color.values));
     expect(example.Race.values, same(example.Race.values));
     expect(example.AnyTypeId.values, same(example.AnyTypeId.values));
-    expect(example.AnyUniqueAliasesTypeId.values,
-        same(example.AnyUniqueAliasesTypeId.values));
-    expect(example.AnyAmbiguousAliasesTypeId.values,
-        same(example.AnyAmbiguousAliasesTypeId.values));
+    expect(
+      example.AnyUniqueAliasesTypeId.values,
+      same(example.AnyUniqueAliasesTypeId.values),
+    );
+    expect(
+      example.AnyAmbiguousAliasesTypeId.values,
+      same(example.AnyAmbiguousAliasesTypeId.values),
+    );
   }
 }
 
@@ -917,11 +997,13 @@
 @reflectiveTest
 class ListOfEnumsTest {
   void test_listOfEnums() async {
-    var mytable = example3.MyTableObjectBuilder(options: [
-      example3.OptionsEnum.A,
-      example3.OptionsEnum.B,
-      example3.OptionsEnum.C
-    ]);
+    var mytable = example3.MyTableObjectBuilder(
+      options: [
+        example3.OptionsEnum.A,
+        example3.OptionsEnum.B,
+        example3.OptionsEnum.C,
+      ],
+    );
     var bytes = mytable.toBytes();
     var mytable_read = example3.MyTable(bytes);
     expect(mytable_read.options![0].value, example3.OptionsEnum.A.value);
@@ -934,7 +1016,8 @@
 class BoolInStructTest {
   void test_boolInStruct() async {
     var mystruct = example4.FooObjectBuilder(
-        myFoo: example4.FooPropertiesObjectBuilder(a: true, b: false));
+      myFoo: example4.FooPropertiesObjectBuilder(a: true, b: false),
+    );
     var bytes = mystruct.toBytes();
     var mystruct_read = example4.Foo(bytes);
     expect(mystruct_read.myFoo!.a, true);
diff --git a/dart/test/flex_builder_test.dart b/dart/test/flex_builder_test.dart
index 0c4a18e..0f766de 100644
--- a/dart/test/flex_builder_test.dart
+++ b/dart/test/flex_builder_test.dart
@@ -62,8 +62,23 @@
     {
       var flx = Builder();
       flx.addString('hello 😱');
-      expect(flx.finish(),
-          [10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]);
+      expect(flx.finish(), [
+        10,
+        104,
+        101,
+        108,
+        108,
+        111,
+        32,
+        240,
+        159,
+        152,
+        177,
+        0,
+        11,
+        20,
+        1,
+      ]);
     }
   });
 
@@ -117,7 +132,7 @@
         192,
         16,
         75,
-        1
+        1,
       ]);
     }
     {
@@ -177,7 +192,7 @@
         7,
         3,
         60,
-        1
+        1,
       ]);
     }
     {
@@ -215,7 +230,7 @@
         10,
         6,
         60,
-        1
+        1,
       ]);
     }
     {
@@ -300,7 +315,7 @@
         104,
         45,
         43,
-        1
+        1,
       ]);
     }
   });
@@ -322,8 +337,24 @@
         ..addKey('')
         ..addInt(45)
         ..end();
-      expect(
-          flx.finish(), [97, 0, 0, 2, 2, 5, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]);
+      expect(flx.finish(), [
+        97,
+        0,
+        0,
+        2,
+        2,
+        5,
+        2,
+        1,
+        2,
+        45,
+        12,
+        4,
+        4,
+        4,
+        36,
+        1,
+      ]);
     }
     {
       var flx = Builder()
@@ -367,7 +398,7 @@
         36,
         4,
         40,
-        1
+        1,
       ]);
     }
   });
@@ -381,133 +412,152 @@
 
   test('build from object', () {
     expect(
-        Builder.buildFromObject(Uint8List.fromList([1, 2, 3]).buffer)
-            .asUint8List(),
-        [3, 1, 2, 3, 3, 100, 1]);
+      Builder.buildFromObject(
+        Uint8List.fromList([1, 2, 3]).buffer,
+      ).asUint8List(),
+      [3, 1, 2, 3, 3, 100, 1],
+    );
     expect(Builder.buildFromObject(null).asUint8List(), [0, 0, 1]);
     expect(Builder.buildFromObject(true).asUint8List(), [1, 104, 1]);
     expect(Builder.buildFromObject(false).asUint8List(), [0, 104, 1]);
     expect(Builder.buildFromObject(25).asUint8List(), [25, 4, 1]);
     expect(Builder.buildFromObject(-250).asUint8List(), [6, 255, 5, 2]);
+    expect(Builder.buildFromObject(-2.50).asUint8List(), [
+      0,
+      0,
+      32,
+      192,
+      14,
+      4,
+    ]);
+    expect(Builder.buildFromObject('Maxim').asUint8List(), [
+      5,
+      77,
+      97,
+      120,
+      105,
+      109,
+      0,
+      6,
+      20,
+      1,
+    ]);
     expect(
-        Builder.buildFromObject(-2.50).asUint8List(), [0, 0, 32, 192, 14, 4]);
-    expect(Builder.buildFromObject('Maxim').asUint8List(),
-        [5, 77, 97, 120, 105, 109, 0, 6, 20, 1]);
+      Builder.buildFromObject([1, 3.3, 'max', true, null, false]).asUint8List(),
+      [
+        3,
+        109,
+        97,
+        120,
+        0,
+        0,
+        0,
+        0,
+        6,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        102,
+        102,
+        102,
+        102,
+        102,
+        102,
+        10,
+        64,
+        31,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        4,
+        15,
+        20,
+        104,
+        0,
+        104,
+        54,
+        43,
+        1,
+      ],
+    );
     expect(
-        Builder.buildFromObject([1, 3.3, 'max', true, null, false])
-            .asUint8List(),
-        [
-          3,
-          109,
-          97,
-          120,
-          0,
-          0,
-          0,
-          0,
-          6,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          1,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          102,
-          102,
-          102,
-          102,
-          102,
-          102,
-          10,
-          64,
-          31,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          1,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          0,
-          4,
-          15,
-          20,
-          104,
-          0,
-          104,
-          54,
-          43,
-          1
-        ]);
-    expect(
-        Builder.buildFromObject([
-          {'something': 12},
-          {'something': 45}
-        ]).asUint8List(),
-        [
-          115,
-          111,
-          109,
-          101,
-          116,
-          104,
-          105,
-          110,
-          103,
-          0,
-          1,
-          11,
-          1,
-          1,
-          1,
-          12,
-          4,
-          6,
-          1,
-          1,
-          45,
-          4,
-          2,
-          8,
-          4,
-          36,
-          36,
-          4,
-          40,
-          1
-        ]);
+      Builder.buildFromObject([
+        {'something': 12},
+        {'something': 45},
+      ]).asUint8List(),
+      [
+        115,
+        111,
+        109,
+        101,
+        116,
+        104,
+        105,
+        110,
+        103,
+        0,
+        1,
+        11,
+        1,
+        1,
+        1,
+        12,
+        4,
+        6,
+        1,
+        1,
+        45,
+        4,
+        2,
+        8,
+        4,
+        36,
+        36,
+        4,
+        40,
+        1,
+      ],
+    );
   });
 
   test('add double indirectly', () {
@@ -543,7 +593,7 @@
       35,
       8,
       40,
-      1
+      1,
     ]);
   });
 
@@ -580,7 +630,7 @@
       27,
       8,
       40,
-      1
+      1,
     ]);
   });
 
diff --git a/dart/test/flex_reader_test.dart b/dart/test/flex_reader_test.dart
index 6e0855f..d77d1da 100644
--- a/dart/test/flex_reader_test.dart
+++ b/dart/test/flex_reader_test.dart
@@ -20,70 +20,76 @@
     expect(Reference.fromBuffer(b([1, 4, 5, 2])).intValue, 1025);
     expect(Reference.fromBuffer(b([255, 251, 5, 2])).intValue, -1025);
     expect(Reference.fromBuffer(b([1, 4, 9, 2])).intValue, 1025);
-    expect(Reference.fromBuffer(b([255, 255, 255, 127, 6, 4])).intValue,
-        2147483647);
+    expect(
+      Reference.fromBuffer(b([255, 255, 255, 127, 6, 4])).intValue,
+      2147483647,
+    );
     expect(Reference.fromBuffer(b([0, 0, 0, 128, 6, 4])).intValue, -2147483648);
     expect(
-        Reference.fromBuffer(b([255, 255, 255, 255, 0, 0, 0, 0, 7, 8]))
-            .intValue,
-        4294967295);
+      Reference.fromBuffer(b([255, 255, 255, 255, 0, 0, 0, 0, 7, 8])).intValue,
+      4294967295,
+    );
     expect(
-        Reference.fromBuffer(b([255, 255, 255, 255, 255, 255, 255, 127, 7, 8]))
-            .intValue,
-        9223372036854775807);
-    expect(Reference.fromBuffer(b([0, 0, 0, 0, 0, 0, 0, 128, 7, 8])).intValue,
-        -9223372036854775808);
+      Reference.fromBuffer(
+        b([255, 255, 255, 255, 255, 255, 255, 127, 7, 8]),
+      ).intValue,
+      9223372036854775807,
+    );
+    expect(
+      Reference.fromBuffer(b([0, 0, 0, 0, 0, 0, 0, 128, 7, 8])).intValue,
+      -9223372036854775808,
+    );
     // Dart does not really support UInt64
-//      expect(FlxValue.fromBuffer(b([255, 255, 255, 255, 255, 255, 255, 255, 11, 8])).intValue, 18446744073709551615);
+    //      expect(FlxValue.fromBuffer(b([255, 255, 255, 255, 255, 255, 255, 255, 11, 8])).intValue, 18446744073709551615);
   });
   test('double value', () {
     expect(Reference.fromBuffer(b([0, 0, 128, 63, 14, 4])).doubleValue, 1.0);
     expect(Reference.fromBuffer(b([0, 0, 144, 64, 14, 4])).doubleValue, 4.5);
-    expect(Reference.fromBuffer(b([205, 204, 204, 61, 14, 4])).doubleValue,
-        closeTo(.1, .001));
     expect(
-        Reference.fromBuffer(b([154, 153, 153, 153, 153, 153, 185, 63, 15, 8]))
-            .doubleValue,
-        .1);
+      Reference.fromBuffer(b([205, 204, 204, 61, 14, 4])).doubleValue,
+      closeTo(.1, .001),
+    );
+    expect(
+      Reference.fromBuffer(
+        b([154, 153, 153, 153, 153, 153, 185, 63, 15, 8]),
+      ).doubleValue,
+      .1,
+    );
   });
   test('num value', () {
     expect(Reference.fromBuffer(b([0, 0, 144, 64, 14, 4])).numValue, 4.5);
-    expect(Reference.fromBuffer(b([205, 204, 204, 61, 14, 4])).numValue,
-        closeTo(.1, .001));
     expect(
-        Reference.fromBuffer(b([154, 153, 153, 153, 153, 153, 185, 63, 15, 8]))
-            .numValue,
-        .1);
+      Reference.fromBuffer(b([205, 204, 204, 61, 14, 4])).numValue,
+      closeTo(.1, .001),
+    );
+    expect(
+      Reference.fromBuffer(
+        b([154, 153, 153, 153, 153, 153, 185, 63, 15, 8]),
+      ).numValue,
+      .1,
+    );
     expect(Reference.fromBuffer(b([255, 251, 5, 2])).numValue, -1025);
   });
   test('string value', () {
     expect(
-        Reference.fromBuffer(b([5, 77, 97, 120, 105, 109, 0, 6, 20, 1]))
-            .stringValue,
-        'Maxim');
+      Reference.fromBuffer(
+        b([5, 77, 97, 120, 105, 109, 0, 6, 20, 1]),
+      ).stringValue,
+      'Maxim',
+    );
     expect(
-        Reference.fromBuffer(b([
-          10,
-          104,
-          101,
-          108,
-          108,
-          111,
-          32,
-          240,
-          159,
-          152,
-          177,
-          0,
-          11,
-          20,
-          1
-        ])).stringValue,
-        'hello 😱');
+      Reference.fromBuffer(
+        b([10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]),
+      ).stringValue,
+      'hello 😱',
+    );
   });
   test('blob value', () {
-    expect(
-        Reference.fromBuffer(b([3, 1, 2, 3, 3, 100, 1])).blobValue, [1, 2, 3]);
+    expect(Reference.fromBuffer(b([3, 1, 2, 3, 3, 100, 1])).blobValue, [
+      1,
+      2,
+      3,
+    ]);
   });
   test('bool vector', () {
     var flx = Reference.fromBuffer(b([3, 1, 0, 1, 3, 144, 1]));
@@ -95,450 +101,443 @@
     testNumbers([3, 1, 2, 3, 3, 44, 1], [1, 2, 3]);
     testNumbers([3, 255, 2, 3, 3, 44, 1], [-1, 2, 3]);
     testNumbers([3, 0, 1, 0, 43, 2, 3, 0, 6, 45, 1], [1, 555, 3]);
-    testNumbers([3, 0, 0, 0, 1, 0, 0, 0, 204, 216, 0, 0, 3, 0, 0, 0, 12, 46, 1],
-        [1, 55500, 3]);
-    testNumbers([
-      3,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      1,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      172,
-      128,
-      94,
-      239,
-      12,
-      0,
-      0,
-      0,
-      3,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      24,
-      47,
-      1
-    ], [
-      1,
-      55555555500,
-      3
-    ]);
     testNumbers(
-        [3, 0, 0, 0, 0, 0, 192, 63, 0, 0, 32, 64, 0, 0, 96, 64, 12, 54, 1],
-        [1.5, 2.5, 3.5]);
-    testNumbers([
-      3,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      154,
-      153,
-      153,
-      153,
-      153,
-      153,
-      241,
-      63,
-      154,
-      153,
-      153,
-      153,
-      153,
-      153,
-      1,
-      64,
-      102,
-      102,
-      102,
-      102,
-      102,
-      102,
-      10,
-      64,
-      24,
-      55,
-      1
-    ], [
-      1.1,
-      2.2,
-      3.3
-    ]);
+      [3, 0, 0, 0, 1, 0, 0, 0, 204, 216, 0, 0, 3, 0, 0, 0, 12, 46, 1],
+      [1, 55500, 3],
+    );
+    testNumbers(
+      [
+        3,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        172,
+        128,
+        94,
+        239,
+        12,
+        0,
+        0,
+        0,
+        3,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        24,
+        47,
+        1,
+      ],
+      [1, 55555555500, 3],
+    );
+    testNumbers(
+      [3, 0, 0, 0, 0, 0, 192, 63, 0, 0, 32, 64, 0, 0, 96, 64, 12, 54, 1],
+      [1.5, 2.5, 3.5],
+    );
+    testNumbers(
+      [
+        3,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        154,
+        153,
+        153,
+        153,
+        153,
+        153,
+        241,
+        63,
+        154,
+        153,
+        153,
+        153,
+        153,
+        153,
+        1,
+        64,
+        102,
+        102,
+        102,
+        102,
+        102,
+        102,
+        10,
+        64,
+        24,
+        55,
+        1,
+      ],
+      [1.1, 2.2, 3.3],
+    );
   });
   test('number vector, fixed type', () {
     testNumbers([1, 2, 2, 64, 1], [1, 2]);
     testNumbers([255, 255, 0, 1, 4, 65, 1], [-1, 256]);
     testNumbers([211, 255, 255, 255, 0, 232, 3, 0, 8, 66, 1], [-45, 256000]);
-    testNumbers([
-      211,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      127,
-      16,
-      67,
-      1
-    ], [
-      -45,
-      9223372036854775807
-    ]);
+    testNumbers(
+      [
+        211,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        127,
+        16,
+        67,
+        1,
+      ],
+      [-45, 9223372036854775807],
+    );
 
     testNumbers([1, 2, 2, 68, 1], [1, 2]);
     testNumbers([1, 0, 0, 1, 4, 69, 1], [1, 256]);
     testNumbers([45, 0, 0, 0, 0, 232, 3, 0, 8, 70, 1], [45, 256000]);
 
     testNumbers([205, 204, 140, 63, 0, 0, 0, 192, 8, 74, 1], [1.1, -2]);
-    testNumbers([
-      154,
-      153,
-      153,
-      153,
-      153,
-      153,
-      241,
-      63,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      112,
-      192,
-      16,
-      75,
-      1
-    ], [
-      1.1,
-      -256
-    ]);
+    testNumbers(
+      [
+        154,
+        153,
+        153,
+        153,
+        153,
+        153,
+        241,
+        63,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        112,
+        192,
+        16,
+        75,
+        1,
+      ],
+      [1.1, -256],
+    );
 
-    testNumbers([211, 255, 255, 255, 0, 232, 3, 0, 4, 0, 0, 0, 12, 78, 1],
-        [-45, 256000, 4]);
+    testNumbers(
+      [211, 255, 255, 255, 0, 232, 3, 0, 4, 0, 0, 0, 12, 78, 1],
+      [-45, 256000, 4],
+    );
 
-    testNumbers([
-      211,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      127,
-      4,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      9,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      32,
-      91,
-      1
-    ], [
-      -45,
-      9223372036854775807,
-      4,
-      9
-    ]);
+    testNumbers(
+      [
+        211,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        127,
+        4,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        9,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        32,
+        91,
+        1,
+      ],
+      [-45, 9223372036854775807, 4, 9],
+    );
 
-    testNumbers([
-      45,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      127,
-      4,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      9,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      32,
-      95,
-      1
-    ], [
-      45,
-      9223372036854775807,
-      4,
-      9
-    ]);
+    testNumbers(
+      [
+        45,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        127,
+        4,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        9,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        32,
+        95,
+        1,
+      ],
+      [45, 9223372036854775807, 4, 9],
+    );
 
-    testNumbers([
-      154,
-      153,
-      153,
-      153,
-      153,
-      153,
-      241,
-      63,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      112,
-      64,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      16,
-      64,
-      24,
-      87,
-      1
-    ], [
-      1.1,
-      256,
-      4
-    ]);
+    testNumbers(
+      [
+        154,
+        153,
+        153,
+        153,
+        153,
+        153,
+        241,
+        63,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        112,
+        64,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        16,
+        64,
+        24,
+        87,
+        1,
+      ],
+      [1.1, 256, 4],
+    );
 
-    testNumbers([
-      154,
-      153,
-      153,
-      153,
-      153,
-      153,
-      241,
-      63,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      112,
-      64,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      16,
-      64,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      34,
-      64,
-      32,
-      99,
-      1
-    ], [
-      1.1,
-      256,
-      4,
-      9
-    ]);
+    testNumbers(
+      [
+        154,
+        153,
+        153,
+        153,
+        153,
+        153,
+        241,
+        63,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        112,
+        64,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        16,
+        64,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        34,
+        64,
+        32,
+        99,
+        1,
+      ],
+      [1.1, 256, 4, 9],
+    );
   });
   test('string vector', () {
-    testStrings([
-      3,
-      102,
-      111,
-      111,
-      0,
-      3,
-      98,
-      97,
-      114,
-      0,
-      3,
-      98,
-      97,
-      122,
-      0,
-      3,
-      15,
-      11,
-      7,
-      3,
-      60,
-      1
-    ], [
-      'foo',
-      'bar',
-      'baz'
-    ]);
-    testStrings([
-      3,
-      102,
-      111,
-      111,
-      0,
-      3,
-      98,
-      97,
-      114,
-      0,
-      3,
-      98,
-      97,
-      122,
-      0,
-      6,
-      15,
-      11,
-      7,
-      18,
-      14,
-      10,
-      6,
-      60,
-      1
-    ], [
-      'foo',
-      'bar',
-      'baz',
-      'foo',
-      'bar',
-      'baz'
-    ]);
+    testStrings(
+      [
+        3,
+        102,
+        111,
+        111,
+        0,
+        3,
+        98,
+        97,
+        114,
+        0,
+        3,
+        98,
+        97,
+        122,
+        0,
+        3,
+        15,
+        11,
+        7,
+        3,
+        60,
+        1,
+      ],
+      ['foo', 'bar', 'baz'],
+    );
+    testStrings(
+      [
+        3,
+        102,
+        111,
+        111,
+        0,
+        3,
+        98,
+        97,
+        114,
+        0,
+        3,
+        98,
+        97,
+        122,
+        0,
+        6,
+        15,
+        11,
+        7,
+        18,
+        14,
+        10,
+        6,
+        60,
+        1,
+      ],
+      ['foo', 'bar', 'baz', 'foo', 'bar', 'baz'],
+    );
   });
   test('mixed vector', () {
-    var flx = Reference.fromBuffer(b([
-      3,
-      102,
-      111,
-      111,
-      0,
-      0,
-      0,
-      0,
-      5,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      15,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      1,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      251,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      255,
-      205,
-      204,
-      204,
-      204,
-      204,
-      204,
-      244,
-      63,
-      1,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      0,
-      20,
-      4,
-      4,
-      15,
-      104,
-      45,
-      43,
-      1
-    ]));
+    var flx = Reference.fromBuffer(
+      b([
+        3,
+        102,
+        111,
+        111,
+        0,
+        0,
+        0,
+        0,
+        5,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        15,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        251,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        205,
+        204,
+        204,
+        204,
+        204,
+        204,
+        244,
+        63,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        20,
+        4,
+        4,
+        15,
+        104,
+        45,
+        43,
+        1,
+      ]),
+    );
     expect(flx.length, 5);
     expect(flx[0].stringValue, 'foo');
     expect(flx[1].numValue, 1);
@@ -554,7 +553,8 @@
   });
   test('two value map', () {
     var flx = Reference.fromBuffer(
-        b([0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]));
+      b([0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]),
+    );
     expect(flx.length, 2);
     expect(flx['a'].numValue, 12);
     expect(flx[''].numValue, 45);
@@ -578,55 +578,90 @@
     expect(flx['address']['countryCode'].stringValue, 'XX');
 
     expect(
-        () => flx['address']['country'].stringValue,
-        throwsA(predicate((dynamic e) =>
-            e is ArgumentError &&
-            e.message ==
-                'Key: [country] is not applicable on: //address of: ValueType.Map')));
+      () => flx['address']['country'].stringValue,
+      throwsA(
+        predicate(
+          (dynamic e) =>
+              e is ArgumentError &&
+              e.message ==
+                  'Key: [country] is not applicable on: //address of: ValueType.Map',
+        ),
+      ),
+    );
     expect(
-        () => flx['address']['countryCode'][0],
-        throwsA(predicate((dynamic e) =>
-            e is ArgumentError &&
-            e.message ==
-                'Key: [0] is not applicable on: //address/countryCode of: ValueType.String')));
+      () => flx['address']['countryCode'][0],
+      throwsA(
+        predicate(
+          (dynamic e) =>
+              e is ArgumentError &&
+              e.message ==
+                  'Key: [0] is not applicable on: //address/countryCode of: ValueType.String',
+        ),
+      ),
+    );
     expect(
-        () => flx[1],
-        throwsA(predicate((dynamic e) =>
-            e is ArgumentError &&
-            e.message ==
-                'Key: [1] is not applicable on: / of: ValueType.Map')));
+      () => flx[1],
+      throwsA(
+        predicate(
+          (dynamic e) =>
+              e is ArgumentError &&
+              e.message == 'Key: [1] is not applicable on: / of: ValueType.Map',
+        ),
+      ),
+    );
     expect(
-        () => flx['flags'][4],
-        throwsA(predicate((dynamic e) =>
-            e is ArgumentError &&
-            e.message ==
-                'Key: [4] is not applicable on: //flags of: ValueType.VectorBool length: 4')));
+      () => flx['flags'][4],
+      throwsA(
+        predicate(
+          (dynamic e) =>
+              e is ArgumentError &&
+              e.message ==
+                  'Key: [4] is not applicable on: //flags of: ValueType.VectorBool length: 4',
+        ),
+      ),
+    );
     expect(
-        () => flx['flags'][-1],
-        throwsA(predicate((dynamic e) =>
-            e is ArgumentError &&
-            e.message ==
-                'Key: [-1] is not applicable on: //flags of: ValueType.VectorBool length: 4')));
+      () => flx['flags'][-1],
+      throwsA(
+        predicate(
+          (dynamic e) =>
+              e is ArgumentError &&
+              e.message ==
+                  'Key: [-1] is not applicable on: //flags of: ValueType.VectorBool length: 4',
+        ),
+      ),
+    );
   });
   test('complex map to json', () {
     var flx = complexMap();
-    expect(flx.json,
-        '{"address":{"city":"Bla","countryCode":"XX","zip":"12345"},"age":35,"flags":[true,false,true,true],"name":"Maxim","weight":72.5}');
+    expect(
+      flx.json,
+      '{"address":{"city":"Bla","countryCode":"XX","zip":"12345"},"age":35,"flags":[true,false,true,true],"name":"Maxim","weight":72.5}',
+    );
   });
 
   test('complex map iterators', () {
     var flx = complexMap();
-    expect(flx.mapKeyIterable.map((e) => e).toList(),
-        ['address', 'age', 'flags', 'name', 'weight']);
+    expect(flx.mapKeyIterable.map((e) => e).toList(), [
+      'address',
+      'age',
+      'flags',
+      'name',
+      'weight',
+    ]);
     expect(flx.mapValueIterable.map((e) => e.json).toList(), [
       flx['address'].json,
       flx['age'].json,
       flx['flags'].json,
       flx['name'].json,
-      flx['weight'].json
+      flx['weight'].json,
     ]);
-    expect(flx['flags'].vectorIterable.map((e) => e.boolValue).toList(),
-        [true, false, true, true]);
+    expect(flx['flags'].vectorIterable.map((e) => e.boolValue).toList(), [
+      true,
+      false,
+      true,
+      true,
+    ]);
   });
 
   test('bug where offest were stored as int instead of uint', () {
@@ -790,11 +825,13 @@
       4,
       16,
       36,
-      1
+      1,
     ];
     var flx = Reference.fromBuffer(b(data));
-    expect(flx.json,
-        '{"channels_in":64,"dilation_height_factor":1,"dilation_width_factor":1,"fused_activation_function":1,"pad_values":1,"padding":0,"stride_height":1,"stride_width":1}');
+    expect(
+      flx.json,
+      '{"channels_in":64,"dilation_height_factor":1,"dilation_width_factor":1,"fused_activation_function":1,"pad_values":1,"padding":0,"stride_height":1,"stride_width":1}',
+    );
     const object = {
       "channels_in": 64,
       "dilation_height_factor": 1,
@@ -803,13 +840,15 @@
       "pad_values": 1,
       "padding": 0,
       "stride_height": 1,
-      "stride_width": 1
+      "stride_width": 1,
     };
     var data1 = Builder.buildFromObject(object).asUint8List();
     expect(data1.length, data.length);
     var flx1 = Reference.fromBuffer(b(data1));
-    expect(flx1.json,
-        '{"channels_in":64,"dilation_height_factor":1,"dilation_width_factor":1,"fused_activation_function":1,"pad_values":1,"padding":0,"stride_height":1,"stride_width":1}');
+    expect(
+      flx1.json,
+      '{"channels_in":64,"dilation_height_factor":1,"dilation_width_factor":1,"fused_activation_function":1,"pad_values":1,"padding":0,"stride_height":1,"stride_width":1}',
+    );
   });
 }
 
@@ -835,157 +874,159 @@
 }
 
 Reference complexMap() {
-//  {
-//    "age": 35,
-//    "flags": [True, False, True, True],
-//    "weight": 72.5,
-//    "name": "Maxim",
-//    "address": {
-//      "city": "Bla",
-//      "zip": "12345",
-//      "countryCode": "XX",
-//    }
-//  }
-  return Reference.fromBuffer(b([
-    97,
-    100,
-    100,
-    114,
-    101,
-    115,
-    115,
-    0,
-    99,
-    105,
-    116,
-    121,
-    0,
-    3,
-    66,
-    108,
-    97,
-    0,
-    99,
-    111,
-    117,
-    110,
-    116,
-    114,
-    121,
-    67,
-    111,
-    100,
-    101,
-    0,
-    2,
-    88,
-    88,
-    0,
-    122,
-    105,
-    112,
-    0,
-    5,
-    49,
-    50,
-    51,
-    52,
-    53,
-    0,
-    3,
-    38,
-    29,
-    14,
-    3,
-    1,
-    3,
-    38,
-    22,
-    15,
-    20,
-    20,
-    20,
-    97,
-    103,
-    101,
-    0,
-    102,
-    108,
-    97,
-    103,
-    115,
-    0,
-    4,
-    1,
-    0,
-    1,
-    1,
-    110,
-    97,
-    109,
-    101,
-    0,
-    5,
-    77,
-    97,
-    120,
-    105,
-    109,
-    0,
-    119,
-    101,
-    105,
-    103,
-    104,
-    116,
-    0,
-    5,
-    93,
-    36,
-    33,
-    23,
-    12,
-    0,
-    0,
-    7,
-    0,
-    0,
-    0,
-    1,
-    0,
-    0,
-    0,
-    5,
-    0,
-    0,
-    0,
-    60,
-    0,
-    0,
-    0,
-    35,
-    0,
-    0,
-    0,
-    51,
-    0,
-    0,
-    0,
-    45,
-    0,
-    0,
-    0,
-    0,
-    0,
-    145,
-    66,
-    36,
-    4,
-    144,
-    20,
-    14,
-    25,
-    38,
-    1
-  ]));
+  //  {
+  //    "age": 35,
+  //    "flags": [True, False, True, True],
+  //    "weight": 72.5,
+  //    "name": "Maxim",
+  //    "address": {
+  //      "city": "Bla",
+  //      "zip": "12345",
+  //      "countryCode": "XX",
+  //    }
+  //  }
+  return Reference.fromBuffer(
+    b([
+      97,
+      100,
+      100,
+      114,
+      101,
+      115,
+      115,
+      0,
+      99,
+      105,
+      116,
+      121,
+      0,
+      3,
+      66,
+      108,
+      97,
+      0,
+      99,
+      111,
+      117,
+      110,
+      116,
+      114,
+      121,
+      67,
+      111,
+      100,
+      101,
+      0,
+      2,
+      88,
+      88,
+      0,
+      122,
+      105,
+      112,
+      0,
+      5,
+      49,
+      50,
+      51,
+      52,
+      53,
+      0,
+      3,
+      38,
+      29,
+      14,
+      3,
+      1,
+      3,
+      38,
+      22,
+      15,
+      20,
+      20,
+      20,
+      97,
+      103,
+      101,
+      0,
+      102,
+      108,
+      97,
+      103,
+      115,
+      0,
+      4,
+      1,
+      0,
+      1,
+      1,
+      110,
+      97,
+      109,
+      101,
+      0,
+      5,
+      77,
+      97,
+      120,
+      105,
+      109,
+      0,
+      119,
+      101,
+      105,
+      103,
+      104,
+      116,
+      0,
+      5,
+      93,
+      36,
+      33,
+      23,
+      12,
+      0,
+      0,
+      7,
+      0,
+      0,
+      0,
+      1,
+      0,
+      0,
+      0,
+      5,
+      0,
+      0,
+      0,
+      60,
+      0,
+      0,
+      0,
+      35,
+      0,
+      0,
+      0,
+      51,
+      0,
+      0,
+      0,
+      45,
+      0,
+      0,
+      0,
+      0,
+      0,
+      145,
+      66,
+      36,
+      4,
+      144,
+      20,
+      14,
+      25,
+      38,
+      1,
+    ]),
+  );
 }
diff --git a/dart/test/flex_types_test.dart b/dart/test/flex_types_test.dart
index 76ce070..7ed1f2a 100644
--- a/dart/test/flex_types_test.dart
+++ b/dart/test/flex_types_test.dart
@@ -48,116 +48,210 @@
     expect(ValueTypeUtils.isFixedTypedVector(ValueType.VectorInt), isFalse);
   });
   test('to typed vector', () {
-    expect(ValueTypeUtils.toTypedVector(ValueType.Int, 0),
-        equals(ValueType.VectorInt));
-    expect(ValueTypeUtils.toTypedVector(ValueType.UInt, 0),
-        equals(ValueType.VectorUInt));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Bool, 0),
-        equals(ValueType.VectorBool));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Float, 0),
-        equals(ValueType.VectorFloat));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Key, 0),
-        equals(ValueType.VectorKey));
-    expect(ValueTypeUtils.toTypedVector(ValueType.String, 0),
-        equals(ValueType.VectorString));
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Int, 0),
+      equals(ValueType.VectorInt),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.UInt, 0),
+      equals(ValueType.VectorUInt),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Bool, 0),
+      equals(ValueType.VectorBool),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Float, 0),
+      equals(ValueType.VectorFloat),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Key, 0),
+      equals(ValueType.VectorKey),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.String, 0),
+      equals(ValueType.VectorString),
+    );
 
-    expect(ValueTypeUtils.toTypedVector(ValueType.Int, 2),
-        equals(ValueType.VectorInt2));
-    expect(ValueTypeUtils.toTypedVector(ValueType.UInt, 2),
-        equals(ValueType.VectorUInt2));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Float, 2),
-        equals(ValueType.VectorFloat2));
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Int, 2),
+      equals(ValueType.VectorInt2),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.UInt, 2),
+      equals(ValueType.VectorUInt2),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Float, 2),
+      equals(ValueType.VectorFloat2),
+    );
 
-    expect(ValueTypeUtils.toTypedVector(ValueType.Int, 3),
-        equals(ValueType.VectorInt3));
-    expect(ValueTypeUtils.toTypedVector(ValueType.UInt, 3),
-        equals(ValueType.VectorUInt3));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Float, 3),
-        equals(ValueType.VectorFloat3));
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Int, 3),
+      equals(ValueType.VectorInt3),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.UInt, 3),
+      equals(ValueType.VectorUInt3),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Float, 3),
+      equals(ValueType.VectorFloat3),
+    );
 
-    expect(ValueTypeUtils.toTypedVector(ValueType.Int, 4),
-        equals(ValueType.VectorInt4));
-    expect(ValueTypeUtils.toTypedVector(ValueType.UInt, 4),
-        equals(ValueType.VectorUInt4));
-    expect(ValueTypeUtils.toTypedVector(ValueType.Float, 4),
-        equals(ValueType.VectorFloat4));
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Int, 4),
+      equals(ValueType.VectorInt4),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.UInt, 4),
+      equals(ValueType.VectorUInt4),
+    );
+    expect(
+      ValueTypeUtils.toTypedVector(ValueType.Float, 4),
+      equals(ValueType.VectorFloat4),
+    );
   });
   test('typed vector element type', () {
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorInt),
-        equals(ValueType.Int));
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorUInt),
-        equals(ValueType.UInt));
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorFloat),
-        equals(ValueType.Float));
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorString),
-        equals(ValueType.String));
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorKey),
-        equals(ValueType.Key));
-    expect(ValueTypeUtils.typedVectorElementType(ValueType.VectorBool),
-        equals(ValueType.Bool));
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorInt),
+      equals(ValueType.Int),
+    );
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorUInt),
+      equals(ValueType.UInt),
+    );
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorFloat),
+      equals(ValueType.Float),
+    );
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorString),
+      equals(ValueType.String),
+    );
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorKey),
+      equals(ValueType.Key),
+    );
+    expect(
+      ValueTypeUtils.typedVectorElementType(ValueType.VectorBool),
+      equals(ValueType.Bool),
+    );
   });
   test('fixed typed vector element type', () {
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt2),
-        equals(ValueType.Int));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt3),
-        equals(ValueType.Int));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt4),
-        equals(ValueType.Int));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt2),
+      equals(ValueType.Int),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt3),
+      equals(ValueType.Int),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorInt4),
+      equals(ValueType.Int),
+    );
 
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt2),
-        equals(ValueType.UInt));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt3),
-        equals(ValueType.UInt));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt4),
-        equals(ValueType.UInt));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt2),
+      equals(ValueType.UInt),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt3),
+      equals(ValueType.UInt),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorUInt4),
+      equals(ValueType.UInt),
+    );
 
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat2),
-        equals(ValueType.Float));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat3),
-        equals(ValueType.Float));
-    expect(ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat4),
-        equals(ValueType.Float));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat2),
+      equals(ValueType.Float),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat3),
+      equals(ValueType.Float),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementType(ValueType.VectorFloat4),
+      equals(ValueType.Float),
+    );
   });
   test('fixed typed vector element size', () {
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt2),
-        equals(2));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt3),
-        equals(3));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt4),
-        equals(4));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt2),
+      equals(2),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt3),
+      equals(3),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorInt4),
+      equals(4),
+    );
 
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt2),
-        equals(2));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt3),
-        equals(3));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt4),
-        equals(4));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt2),
+      equals(2),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt3),
+      equals(3),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorUInt4),
+      equals(4),
+    );
 
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat2),
-        equals(2));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat3),
-        equals(3));
-    expect(ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat4),
-        equals(4));
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat2),
+      equals(2),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat3),
+      equals(3),
+    );
+    expect(
+      ValueTypeUtils.fixedTypedVectorElementSize(ValueType.VectorFloat4),
+      equals(4),
+    );
   });
   test('packed type', () {
     expect(
-        ValueTypeUtils.packedType(ValueType.Null, BitWidth.width8), equals(0));
+      ValueTypeUtils.packedType(ValueType.Null, BitWidth.width8),
+      equals(0),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Null, BitWidth.width16), equals(1));
+      ValueTypeUtils.packedType(ValueType.Null, BitWidth.width16),
+      equals(1),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Null, BitWidth.width32), equals(2));
+      ValueTypeUtils.packedType(ValueType.Null, BitWidth.width32),
+      equals(2),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Null, BitWidth.width64), equals(3));
+      ValueTypeUtils.packedType(ValueType.Null, BitWidth.width64),
+      equals(3),
+    );
 
     expect(
-        ValueTypeUtils.packedType(ValueType.Int, BitWidth.width8), equals(4));
+      ValueTypeUtils.packedType(ValueType.Int, BitWidth.width8),
+      equals(4),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Int, BitWidth.width16), equals(5));
+      ValueTypeUtils.packedType(ValueType.Int, BitWidth.width16),
+      equals(5),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Int, BitWidth.width32), equals(6));
+      ValueTypeUtils.packedType(ValueType.Int, BitWidth.width32),
+      equals(6),
+    );
     expect(
-        ValueTypeUtils.packedType(ValueType.Int, BitWidth.width64), equals(7));
+      ValueTypeUtils.packedType(ValueType.Int, BitWidth.width64),
+      equals(7),
+    );
   });
   test('bit width', () {
     expect(BitWidthUtil.width(0), BitWidth.width8);
diff --git a/dart/test/include_test1_generated.dart b/dart/test/include_test1_generated.dart
index c04bf6b..2309e45 100644
--- a/dart/test/include_test1_generated.dart
+++ b/dart/test/include_test1_generated.dart
@@ -2,10 +2,11 @@
 // ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable, constant_identifier_names
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
-
-import './include_test2_my_game.other_name_space_generated.dart' as my_game_other_name_space;
+import './include_test2_my_game.other_name_space_generated.dart'
+    as my_game_other_name_space;
 
 class TableA {
   TableA._(this._bc, this._bcOffset);
@@ -19,15 +20,17 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  my_game_other_name_space.TableB? get b => my_game_other_name_space.TableB.reader.vTableGetNullable(_bc, _bcOffset, 4);
+  my_game_other_name_space.TableB? get b => my_game_other_name_space
+      .TableB
+      .reader
+      .vTableGetNullable(_bc, _bcOffset, 4);
 
   @override
   String toString() {
     return 'TableA{b: ${b}}';
   }
 
-  TableAT unpack() => TableAT(
-      b: b?.unpack());
+  TableAT unpack() => TableAT(b: b?.unpack());
 
   static int pack(fb.Builder fbBuilder, TableAT? object) {
     if (object == null) return 0;
@@ -38,8 +41,7 @@
 class TableAT implements fb.Packable {
   my_game_other_name_space.TableBT? b;
 
-  TableAT({
-      this.b});
+  TableAT({this.b});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -59,8 +61,7 @@
   const _TableAReader();
 
   @override
-  TableA createObject(fb.BufferContext bc, int offset) => 
-    TableA._(bc, offset);
+  TableA createObject(fb.BufferContext bc, int offset) => TableA._(bc, offset);
 }
 
 class TableABuilder {
@@ -85,10 +86,8 @@
 class TableAObjectBuilder extends fb.ObjectBuilder {
   final my_game_other_name_space.TableBObjectBuilder? _b;
 
-  TableAObjectBuilder({
-    my_game_other_name_space.TableBObjectBuilder? b,
-  })
-      : _b = b;
+  TableAObjectBuilder({my_game_other_name_space.TableBObjectBuilder? b})
+    : _b = b;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/dart/test/include_test2_my_game.other_name_space_generated.dart b/dart/test/include_test2_my_game.other_name_space_generated.dart
index 365ed3c..975622b 100644
--- a/dart/test/include_test2_my_game.other_name_space_generated.dart
+++ b/dart/test/include_test2_my_game.other_name_space_generated.dart
@@ -4,8 +4,8 @@
 library my_game.other_name_space;
 
 import 'dart:typed_data' show Uint8List;
-import 'package:flat_buffers/flat_buffers.dart' as fb;
 
+import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 import './include_test1_generated.dart';
 
@@ -17,8 +17,10 @@
 
   factory FromInclude.fromValue(int value) {
     switch (value) {
-      case 0: return FromInclude.IncludeVal;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 0:
+        return FromInclude.IncludeVal;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -56,8 +58,7 @@
     return 'Unused{a: ${a}}';
   }
 
-  UnusedT unpack() => UnusedT(
-      a: a);
+  UnusedT unpack() => UnusedT(a: a);
 
   static int pack(fb.Builder fbBuilder, UnusedT? object) {
     if (object == null) return 0;
@@ -68,8 +69,7 @@
 class UnusedT implements fb.Packable {
   int a;
 
-  UnusedT({
-      required this.a});
+  UnusedT({required this.a});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -90,8 +90,7 @@
   int get size => 4;
 
   @override
-  Unused createObject(fb.BufferContext bc, int offset) => 
-    Unused._(bc, offset);
+  Unused createObject(fb.BufferContext bc, int offset) => Unused._(bc, offset);
 }
 
 class UnusedBuilder {
@@ -103,16 +102,12 @@
     fbBuilder.putInt32(a);
     return fbBuilder.offset;
   }
-
 }
 
 class UnusedObjectBuilder extends fb.ObjectBuilder {
   final int _a;
 
-  UnusedObjectBuilder({
-    required int a,
-  })
-      : _a = a;
+  UnusedObjectBuilder({required int a}) : _a = a;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -129,6 +124,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class TableB {
   TableB._(this._bc, this._bcOffset);
   factory TableB(List<int> bytes) {
@@ -148,8 +144,7 @@
     return 'TableB{a: ${a}}';
   }
 
-  TableBT unpack() => TableBT(
-      a: a?.unpack());
+  TableBT unpack() => TableBT(a: a?.unpack());
 
   static int pack(fb.Builder fbBuilder, TableBT? object) {
     if (object == null) return 0;
@@ -160,8 +155,7 @@
 class TableBT implements fb.Packable {
   TableAT? a;
 
-  TableBT({
-      this.a});
+  TableBT({this.a});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -181,8 +175,7 @@
   const _TableBReader();
 
   @override
-  TableB createObject(fb.BufferContext bc, int offset) => 
-    TableB._(bc, offset);
+  TableB createObject(fb.BufferContext bc, int offset) => TableB._(bc, offset);
 }
 
 class TableBBuilder {
@@ -207,10 +200,7 @@
 class TableBObjectBuilder extends fb.ObjectBuilder {
   final TableAObjectBuilder? _a;
 
-  TableBObjectBuilder({
-    TableAObjectBuilder? a,
-  })
-      : _a = a;
+  TableBObjectBuilder({TableAObjectBuilder? a}) : _a = a;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/dart/test/monster_test_my_game.example2_generated.dart b/dart/test/monster_test_my_game.example2_generated.dart
index c266f9c..8f7893f 100644
--- a/dart/test/monster_test_my_game.example2_generated.dart
+++ b/dart/test/monster_test_my_game.example2_generated.dart
@@ -4,12 +4,12 @@
 library my_game.example2;
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
-import './monster_test_my_game_generated.dart' as my_game;
-import './monster_test_my_game.example_generated.dart' as my_game_example;
-
 import './include_test1_generated.dart';
+import './monster_test_my_game.example_generated.dart' as my_game_example;
+import './monster_test_my_game_generated.dart' as my_game;
 
 class Monster {
   Monster._(this._bc, this._bcOffset);
@@ -23,7 +23,6 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-
   @override
   String toString() {
     return 'Monster{}';
@@ -54,12 +53,11 @@
   const _MonsterReader();
 
   @override
-  Monster createObject(fb.BufferContext bc, int offset) => 
-    Monster._(bc, offset);
+  Monster createObject(fb.BufferContext bc, int offset) =>
+      Monster._(bc, offset);
 }
 
 class MonsterObjectBuilder extends fb.ObjectBuilder {
-
   MonsterObjectBuilder();
 
   /// Finish building, and store into the [fbBuilder].
diff --git a/dart/test/monster_test_my_game.example_generated.dart b/dart/test/monster_test_my_game.example_generated.dart
index 5554c4c..7be3afa 100644
--- a/dart/test/monster_test_my_game.example_generated.dart
+++ b/dart/test/monster_test_my_game.example_generated.dart
@@ -4,12 +4,12 @@
 library my_game.example;
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
-import './monster_test_my_game_generated.dart' as my_game;
-import './monster_test_my_game.example2_generated.dart' as my_game_example2;
-
 import './include_test1_generated.dart';
+import './monster_test_my_game.example2_generated.dart' as my_game_example2;
+import './monster_test_my_game_generated.dart' as my_game;
 
 ///  Composite components of Monster color.
 enum Color {
@@ -23,11 +23,16 @@
 
   factory Color.fromValue(int value) {
     switch (value) {
-      case 1: return Color.Red;
-      case 2: return Color.Green;
-      case 8: return Color.Blue;
-      case 0: return Color._default;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 1:
+        return Color.Red;
+      case 2:
+        return Color.Green;
+      case 8:
+        return Color.Blue;
+      case 0:
+        return Color._default;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -59,11 +64,16 @@
 
   factory Race.fromValue(int value) {
     switch (value) {
-      case -1: return Race.None;
-      case 0: return Race.Human;
-      case 1: return Race.Dwarf;
-      case 2: return Race.Elf;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case -1:
+        return Race.None;
+      case 0:
+        return Race.Human;
+      case 1:
+        return Race.Dwarf;
+      case 2:
+        return Race.Elf;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -97,11 +107,16 @@
 
   factory LongEnum.fromValue(int value) {
     switch (value) {
-      case 2: return LongEnum.LongOne;
-      case 4: return LongEnum.LongTwo;
-      case 1099511627776: return LongEnum.LongBig;
-      case 0: return LongEnum._default;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 2:
+        return LongEnum.LongOne;
+      case 4:
+        return LongEnum.LongTwo;
+      case 1099511627776:
+        return LongEnum.LongBig;
+      case 0:
+        return LongEnum._default;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -133,11 +148,16 @@
 
   factory AnyTypeId.fromValue(int value) {
     switch (value) {
-      case 0: return AnyTypeId.NONE;
-      case 1: return AnyTypeId.Monster;
-      case 2: return AnyTypeId.TestSimpleTableWithEnum;
-      case 3: return AnyTypeId.MyGame_Example2_Monster;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 0:
+        return AnyTypeId.NONE;
+      case 1:
+        return AnyTypeId.Monster;
+      case 2:
+        return AnyTypeId.TestSimpleTableWithEnum;
+      case 3:
+        return AnyTypeId.MyGame_Example2_Monster;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -171,11 +191,16 @@
 
   factory AnyUniqueAliasesTypeId.fromValue(int value) {
     switch (value) {
-      case 0: return AnyUniqueAliasesTypeId.NONE;
-      case 1: return AnyUniqueAliasesTypeId.M;
-      case 2: return AnyUniqueAliasesTypeId.TS;
-      case 3: return AnyUniqueAliasesTypeId.M2;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 0:
+        return AnyUniqueAliasesTypeId.NONE;
+      case 1:
+        return AnyUniqueAliasesTypeId.M;
+      case 2:
+        return AnyUniqueAliasesTypeId.TS;
+      case 3:
+        return AnyUniqueAliasesTypeId.M2;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -184,7 +209,8 @@
 
   static const int minValue = 0;
   static const int maxValue = 3;
-  static const fb.Reader<AnyUniqueAliasesTypeId> reader = _AnyUniqueAliasesTypeIdReader();
+  static const fb.Reader<AnyUniqueAliasesTypeId> reader =
+      _AnyUniqueAliasesTypeIdReader();
 }
 
 class _AnyUniqueAliasesTypeIdReader extends fb.Reader<AnyUniqueAliasesTypeId> {
@@ -209,11 +235,16 @@
 
   factory AnyAmbiguousAliasesTypeId.fromValue(int value) {
     switch (value) {
-      case 0: return AnyAmbiguousAliasesTypeId.NONE;
-      case 1: return AnyAmbiguousAliasesTypeId.M1;
-      case 2: return AnyAmbiguousAliasesTypeId.M2;
-      case 3: return AnyAmbiguousAliasesTypeId.M3;
-      default: throw StateError('Invalid value $value for bit flag enum');
+      case 0:
+        return AnyAmbiguousAliasesTypeId.NONE;
+      case 1:
+        return AnyAmbiguousAliasesTypeId.M1;
+      case 2:
+        return AnyAmbiguousAliasesTypeId.M2;
+      case 3:
+        return AnyAmbiguousAliasesTypeId.M3;
+      default:
+        throw StateError('Invalid value $value for bit flag enum');
     }
   }
 
@@ -222,10 +253,12 @@
 
   static const int minValue = 0;
   static const int maxValue = 3;
-  static const fb.Reader<AnyAmbiguousAliasesTypeId> reader = _AnyAmbiguousAliasesTypeIdReader();
+  static const fb.Reader<AnyAmbiguousAliasesTypeId> reader =
+      _AnyAmbiguousAliasesTypeIdReader();
 }
 
-class _AnyAmbiguousAliasesTypeIdReader extends fb.Reader<AnyAmbiguousAliasesTypeId> {
+class _AnyAmbiguousAliasesTypeIdReader
+    extends fb.Reader<AnyAmbiguousAliasesTypeId> {
   const _AnyAmbiguousAliasesTypeIdReader();
 
   @override
@@ -233,7 +266,9 @@
 
   @override
   AnyAmbiguousAliasesTypeId read(fb.BufferContext bc, int offset) =>
-      AnyAmbiguousAliasesTypeId.fromValue(const fb.Uint8Reader().read(bc, offset));
+      AnyAmbiguousAliasesTypeId.fromValue(
+        const fb.Uint8Reader().read(bc, offset),
+      );
 }
 
 class Test {
@@ -252,9 +287,7 @@
     return 'Test{a: ${a}, b: ${b}}';
   }
 
-  TestT unpack() => TestT(
-      a: a,
-      b: b);
+  TestT unpack() => TestT(a: a, b: b);
 
   static int pack(fb.Builder fbBuilder, TestT? object) {
     if (object == null) return 0;
@@ -266,9 +299,7 @@
   int a;
   int b;
 
-  TestT({
-      required this.a,
-      required this.b});
+  TestT({required this.a, required this.b});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -291,8 +322,7 @@
   int get size => 4;
 
   @override
-  Test createObject(fb.BufferContext bc, int offset) => 
-    Test._(bc, offset);
+  Test createObject(fb.BufferContext bc, int offset) => Test._(bc, offset);
 }
 
 class TestBuilder {
@@ -306,19 +336,13 @@
     fbBuilder.putInt16(a);
     return fbBuilder.offset;
   }
-
 }
 
 class TestObjectBuilder extends fb.ObjectBuilder {
   final int _a;
   final int _b;
 
-  TestObjectBuilder({
-    required int a,
-    required int b,
-  })
-      : _a = a,
-        _b = b;
+  TestObjectBuilder({required int a, required int b}) : _a = a, _b = b;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -337,6 +361,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class TestSimpleTableWithEnum {
   TestSimpleTableWithEnum._(this._bc, this._bcOffset);
   factory TestSimpleTableWithEnum(List<int> bytes) {
@@ -344,20 +369,21 @@
     return reader.read(rootRef, 0);
   }
 
-  static const fb.Reader<TestSimpleTableWithEnum> reader = _TestSimpleTableWithEnumReader();
+  static const fb.Reader<TestSimpleTableWithEnum> reader =
+      _TestSimpleTableWithEnumReader();
 
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  Color get color => Color.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 4, 2));
+  Color get color =>
+      Color.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 4, 2));
 
   @override
   String toString() {
     return 'TestSimpleTableWithEnum{color: ${color}}';
   }
 
-  TestSimpleTableWithEnumT unpack() => TestSimpleTableWithEnumT(
-      color: color);
+  TestSimpleTableWithEnumT unpack() => TestSimpleTableWithEnumT(color: color);
 
   static int pack(fb.Builder fbBuilder, TestSimpleTableWithEnumT? object) {
     if (object == null) return 0;
@@ -368,8 +394,7 @@
 class TestSimpleTableWithEnumT implements fb.Packable {
   Color color;
 
-  TestSimpleTableWithEnumT({
-      this.color = Color.Green});
+  TestSimpleTableWithEnumT({this.color = Color.Green});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -384,12 +409,13 @@
   }
 }
 
-class _TestSimpleTableWithEnumReader extends fb.TableReader<TestSimpleTableWithEnum> {
+class _TestSimpleTableWithEnumReader
+    extends fb.TableReader<TestSimpleTableWithEnum> {
   const _TestSimpleTableWithEnumReader();
 
   @override
-  TestSimpleTableWithEnum createObject(fb.BufferContext bc, int offset) => 
-    TestSimpleTableWithEnum._(bc, offset);
+  TestSimpleTableWithEnum createObject(fb.BufferContext bc, int offset) =>
+      TestSimpleTableWithEnum._(bc, offset);
 }
 
 class TestSimpleTableWithEnumBuilder {
@@ -414,10 +440,7 @@
 class TestSimpleTableWithEnumObjectBuilder extends fb.ObjectBuilder {
   final Color? _color;
 
-  TestSimpleTableWithEnumObjectBuilder({
-    Color? color,
-  })
-      : _color = color;
+  TestSimpleTableWithEnumObjectBuilder({Color? color}) : _color = color;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -435,6 +458,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Vec3 {
   Vec3._(this._bc, this._bcOffset);
 
@@ -447,7 +471,8 @@
   double get y => const fb.Float32Reader().read(_bc, _bcOffset + 4);
   double get z => const fb.Float32Reader().read(_bc, _bcOffset + 8);
   double get test1 => const fb.Float64Reader().read(_bc, _bcOffset + 16);
-  Color get test2 => Color.fromValue(const fb.Uint8Reader().read(_bc, _bcOffset + 24));
+  Color get test2 =>
+      Color.fromValue(const fb.Uint8Reader().read(_bc, _bcOffset + 24));
   Test get test3 => Test.reader.read(_bc, _bcOffset + 26);
 
   @override
@@ -456,12 +481,13 @@
   }
 
   Vec3T unpack() => Vec3T(
-      x: x,
-      y: y,
-      z: z,
-      test1: test1,
-      test2: test2,
-      test3: test3.unpack());
+    x: x,
+    y: y,
+    z: z,
+    test1: test1,
+    test2: test2,
+    test3: test3.unpack(),
+  );
 
   static int pack(fb.Builder fbBuilder, Vec3T? object) {
     if (object == null) return 0;
@@ -478,12 +504,13 @@
   TestT test3;
 
   Vec3T({
-      required this.x,
-      required this.y,
-      required this.z,
-      required this.test1,
-      required this.test2,
-      required this.test3});
+    required this.x,
+    required this.y,
+    required this.z,
+    required this.test1,
+    required this.test2,
+    required this.test3,
+  });
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -512,8 +539,7 @@
   int get size => 32;
 
   @override
-  Vec3 createObject(fb.BufferContext bc, int offset) => 
-    Vec3._(bc, offset);
+  Vec3 createObject(fb.BufferContext bc, int offset) => Vec3._(bc, offset);
 }
 
 class Vec3Builder {
@@ -521,7 +547,14 @@
 
   final fb.Builder fbBuilder;
 
-  int finish(double x, double y, double z, double test1, Color test2, fb.StructBuilder test3) {
+  int finish(
+    double x,
+    double y,
+    double z,
+    double test1,
+    Color test2,
+    fb.StructBuilder test3,
+  ) {
     fbBuilder.pad(2);
     test3();
     fbBuilder.pad(1);
@@ -533,7 +566,6 @@
     fbBuilder.putFloat32(x);
     return fbBuilder.offset;
   }
-
 }
 
 class Vec3ObjectBuilder extends fb.ObjectBuilder {
@@ -551,13 +583,12 @@
     required double test1,
     required Color test2,
     required TestObjectBuilder test3,
-  })
-      : _x = x,
-        _y = y,
-        _z = z,
-        _test1 = test1,
-        _test2 = test2,
-        _test3 = test3;
+  }) : _x = x,
+       _y = y,
+       _z = z,
+       _test1 = test1,
+       _test2 = test2,
+       _test3 = test3;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -582,6 +613,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Ability {
   Ability._(this._bc, this._bcOffset);
 
@@ -598,9 +630,7 @@
     return 'Ability{id: ${id}, distance: ${distance}}';
   }
 
-  AbilityT unpack() => AbilityT(
-      id: id,
-      distance: distance);
+  AbilityT unpack() => AbilityT(id: id, distance: distance);
 
   static int pack(fb.Builder fbBuilder, AbilityT? object) {
     if (object == null) return 0;
@@ -612,9 +642,7 @@
   int id;
   int distance;
 
-  AbilityT({
-      required this.id,
-      required this.distance});
+  AbilityT({required this.id, required this.distance});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -636,8 +664,8 @@
   int get size => 8;
 
   @override
-  Ability createObject(fb.BufferContext bc, int offset) => 
-    Ability._(bc, offset);
+  Ability createObject(fb.BufferContext bc, int offset) =>
+      Ability._(bc, offset);
 }
 
 class AbilityBuilder {
@@ -650,19 +678,15 @@
     fbBuilder.putUint32(id);
     return fbBuilder.offset;
   }
-
 }
 
 class AbilityObjectBuilder extends fb.ObjectBuilder {
   final int _id;
   final int _distance;
 
-  AbilityObjectBuilder({
-    required int id,
-    required int distance,
-  })
-      : _id = id,
-        _distance = distance;
+  AbilityObjectBuilder({required int id, required int distance})
+    : _id = id,
+      _distance = distance;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -680,6 +704,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class StructOfStructs {
   StructOfStructs._(this._bc, this._bcOffset);
 
@@ -697,10 +722,8 @@
     return 'StructOfStructs{a: ${a}, b: ${b}, c: ${c}}';
   }
 
-  StructOfStructsT unpack() => StructOfStructsT(
-      a: a.unpack(),
-      b: b.unpack(),
-      c: c.unpack());
+  StructOfStructsT unpack() =>
+      StructOfStructsT(a: a.unpack(), b: b.unpack(), c: c.unpack());
 
   static int pack(fb.Builder fbBuilder, StructOfStructsT? object) {
     if (object == null) return 0;
@@ -713,10 +736,7 @@
   TestT b;
   AbilityT c;
 
-  StructOfStructsT({
-      required this.a,
-      required this.b,
-      required this.c});
+  StructOfStructsT({required this.a, required this.b, required this.c});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -739,8 +759,8 @@
   int get size => 20;
 
   @override
-  StructOfStructs createObject(fb.BufferContext bc, int offset) => 
-    StructOfStructs._(bc, offset);
+  StructOfStructs createObject(fb.BufferContext bc, int offset) =>
+      StructOfStructs._(bc, offset);
 }
 
 class StructOfStructsBuilder {
@@ -754,7 +774,6 @@
     a();
     return fbBuilder.offset;
   }
-
 }
 
 class StructOfStructsObjectBuilder extends fb.ObjectBuilder {
@@ -766,10 +785,9 @@
     required AbilityObjectBuilder a,
     required TestObjectBuilder b,
     required AbilityObjectBuilder c,
-  })
-      : _a = a,
-        _b = b,
-        _c = c;
+  }) : _a = a,
+       _b = b,
+       _c = c;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -788,10 +806,12 @@
     return fbBuilder.buffer;
   }
 }
+
 class StructOfStructsOfStructs {
   StructOfStructsOfStructs._(this._bc, this._bcOffset);
 
-  static const fb.Reader<StructOfStructsOfStructs> reader = _StructOfStructsOfStructsReader();
+  static const fb.Reader<StructOfStructsOfStructs> reader =
+      _StructOfStructsOfStructsReader();
 
   final fb.BufferContext _bc;
   final int _bcOffset;
@@ -803,8 +823,8 @@
     return 'StructOfStructsOfStructs{a: ${a}}';
   }
 
-  StructOfStructsOfStructsT unpack() => StructOfStructsOfStructsT(
-      a: a.unpack());
+  StructOfStructsOfStructsT unpack() =>
+      StructOfStructsOfStructsT(a: a.unpack());
 
   static int pack(fb.Builder fbBuilder, StructOfStructsOfStructsT? object) {
     if (object == null) return 0;
@@ -815,8 +835,7 @@
 class StructOfStructsOfStructsT implements fb.Packable {
   StructOfStructsT a;
 
-  StructOfStructsOfStructsT({
-      required this.a});
+  StructOfStructsOfStructsT({required this.a});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -830,15 +849,16 @@
   }
 }
 
-class _StructOfStructsOfStructsReader extends fb.StructReader<StructOfStructsOfStructs> {
+class _StructOfStructsOfStructsReader
+    extends fb.StructReader<StructOfStructsOfStructs> {
   const _StructOfStructsOfStructsReader();
 
   @override
   int get size => 20;
 
   @override
-  StructOfStructsOfStructs createObject(fb.BufferContext bc, int offset) => 
-    StructOfStructsOfStructs._(bc, offset);
+  StructOfStructsOfStructs createObject(fb.BufferContext bc, int offset) =>
+      StructOfStructsOfStructs._(bc, offset);
 }
 
 class StructOfStructsOfStructsBuilder {
@@ -850,7 +870,6 @@
     a();
     return fbBuilder.offset;
   }
-
 }
 
 class StructOfStructsOfStructsObjectBuilder extends fb.ObjectBuilder {
@@ -858,8 +877,7 @@
 
   StructOfStructsOfStructsObjectBuilder({
     required StructOfStructsObjectBuilder a,
-  })
-      : _a = a;
+  }) : _a = a;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -876,6 +894,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Stat {
   Stat._(this._bc, this._bcOffset);
   factory Stat(List<int> bytes) {
@@ -888,7 +907,8 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  String? get id => const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 4);
+  String? get id =>
+      const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 4);
   int get val => const fb.Int64Reader().vTableGet(_bc, _bcOffset, 6, 0);
   int get count => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 8, 0);
 
@@ -897,10 +917,7 @@
     return 'Stat{id: ${id}, val: ${val}, count: ${count}}';
   }
 
-  StatT unpack() => StatT(
-      id: id,
-      val: val,
-      count: count);
+  StatT unpack() => StatT(id: id, val: val, count: count);
 
   static int pack(fb.Builder fbBuilder, StatT? object) {
     if (object == null) return 0;
@@ -913,15 +930,11 @@
   int val;
   int count;
 
-  StatT({
-      this.id,
-      this.val = 0,
-      this.count = 0});
+  StatT({this.id, this.val = 0, this.count = 0});
 
   @override
   int pack(fb.Builder fbBuilder) {
-    final int? idOffset = id == null ? null
-        : fbBuilder.writeString(id!);
+    final int? idOffset = id == null ? null : fbBuilder.writeString(id!);
     fbBuilder.startTable(3);
     fbBuilder.addOffset(0, idOffset);
     fbBuilder.addInt64(1, val);
@@ -939,8 +952,7 @@
   const _StatReader();
 
   @override
-  Stat createObject(fb.BufferContext bc, int offset) => 
-    Stat._(bc, offset);
+  Stat createObject(fb.BufferContext bc, int offset) => Stat._(bc, offset);
 }
 
 class StatBuilder {
@@ -956,10 +968,12 @@
     fbBuilder.addOffset(0, offset);
     return fbBuilder.offset;
   }
+
   int addVal(int? val) {
     fbBuilder.addInt64(1, val);
     return fbBuilder.offset;
   }
+
   int addCount(int? count) {
     fbBuilder.addUint16(2, count);
     return fbBuilder.offset;
@@ -975,20 +989,15 @@
   final int? _val;
   final int? _count;
 
-  StatObjectBuilder({
-    String? id,
-    int? val,
-    int? count,
-  })
-      : _id = id,
-        _val = val,
-        _count = count;
+  StatObjectBuilder({String? id, int? val, int? count})
+    : _id = id,
+      _val = val,
+      _count = count;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? idOffset = _id == null ? null
-        : fbBuilder.writeString(_id!);
+    final int? idOffset = _id == null ? null : fbBuilder.writeString(_id!);
     fbBuilder.startTable(3);
     fbBuilder.addOffset(0, idOffset);
     fbBuilder.addInt64(1, _val);
@@ -1004,6 +1013,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class Referrable {
   Referrable._(this._bc, this._bcOffset);
   factory Referrable(List<int> bytes) {
@@ -1023,8 +1033,7 @@
     return 'Referrable{id: ${id}}';
   }
 
-  ReferrableT unpack() => ReferrableT(
-      id: id);
+  ReferrableT unpack() => ReferrableT(id: id);
 
   static int pack(fb.Builder fbBuilder, ReferrableT? object) {
     if (object == null) return 0;
@@ -1035,8 +1044,7 @@
 class ReferrableT implements fb.Packable {
   int id;
 
-  ReferrableT({
-      this.id = 0});
+  ReferrableT({this.id = 0});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -1055,8 +1063,8 @@
   const _ReferrableReader();
 
   @override
-  Referrable createObject(fb.BufferContext bc, int offset) => 
-    Referrable._(bc, offset);
+  Referrable createObject(fb.BufferContext bc, int offset) =>
+      Referrable._(bc, offset);
 }
 
 class ReferrableBuilder {
@@ -1081,10 +1089,7 @@
 class ReferrableObjectBuilder extends fb.ObjectBuilder {
   final int? _id;
 
-  ReferrableObjectBuilder({
-    int? id,
-  })
-      : _id = id;
+  ReferrableObjectBuilder({int? id}) : _id = id;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -1102,6 +1107,7 @@
     return fbBuilder.buffer;
   }
 }
+
 ///  an example documentation comment: "monster object"
 class Monster {
   Monster._(this._bc, this._bcOffset);
@@ -1118,87 +1124,203 @@
   Vec3? get pos => Vec3.reader.vTableGetNullable(_bc, _bcOffset, 4);
   int get mana => const fb.Int16Reader().vTableGet(_bc, _bcOffset, 6, 150);
   int get hp => const fb.Int16Reader().vTableGet(_bc, _bcOffset, 8, 100);
-  String? get name => const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 10);
-  List<int>? get inventory => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 14);
-  Color get color => Color.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 16, 8));
-  AnyTypeId? get testType => AnyTypeId._createOrNull(const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 18));
+  String? get name =>
+      const fb.StringReader().vTableGetNullable(_bc, _bcOffset, 10);
+  List<int>? get inventory =>
+      const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 14);
+  Color get color =>
+      Color.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 16, 8));
+  AnyTypeId? get testType => AnyTypeId._createOrNull(
+    const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 18),
+  );
   dynamic get test {
     switch (testType?.value) {
-      case 1: return Monster.reader.vTableGetNullable(_bc, _bcOffset, 20);
-      case 2: return TestSimpleTableWithEnum.reader.vTableGetNullable(_bc, _bcOffset, 20);
-      case 3: return my_game_example2.Monster.reader.vTableGetNullable(_bc, _bcOffset, 20);
-      default: return null;
+      case 1:
+        return Monster.reader.vTableGetNullable(_bc, _bcOffset, 20);
+      case 2:
+        return TestSimpleTableWithEnum.reader.vTableGetNullable(
+          _bc,
+          _bcOffset,
+          20,
+        );
+      case 3:
+        return my_game_example2.Monster.reader.vTableGetNullable(
+          _bc,
+          _bcOffset,
+          20,
+        );
+      default:
+        return null;
     }
   }
-  List<Test>? get test4 => const fb.ListReader<Test>(Test.reader).vTableGetNullable(_bc, _bcOffset, 22);
-  List<String>? get testarrayofstring => const fb.ListReader<String>(fb.StringReader()).vTableGetNullable(_bc, _bcOffset, 24);
+
+  List<Test>? get test4 => const fb.ListReader<Test>(
+    Test.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 22);
+  List<String>? get testarrayofstring => const fb.ListReader<String>(
+    fb.StringReader(),
+  ).vTableGetNullable(_bc, _bcOffset, 24);
+
   ///  an example documentation comment: this will end up in the generated code
   ///  multiline too
-  List<Monster>? get testarrayoftables => const fb.ListReader<Monster>(Monster.reader).vTableGetNullable(_bc, _bcOffset, 26);
+  List<Monster>? get testarrayoftables => const fb.ListReader<Monster>(
+    Monster.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 26);
   Monster? get enemy => Monster.reader.vTableGetNullable(_bc, _bcOffset, 28);
-  List<int>? get testnestedflatbuffer => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 30);
+  List<int>? get testnestedflatbuffer =>
+      const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 30);
   Stat? get testempty => Stat.reader.vTableGetNullable(_bc, _bcOffset, 32);
-  bool get testbool => const fb.BoolReader().vTableGet(_bc, _bcOffset, 34, false);
-  int get testhashs32Fnv1 => const fb.Int32Reader().vTableGet(_bc, _bcOffset, 36, 0);
-  int get testhashu32Fnv1 => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 38, 0);
-  int get testhashs64Fnv1 => const fb.Int64Reader().vTableGet(_bc, _bcOffset, 40, 0);
-  int get testhashu64Fnv1 => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 42, 0);
-  int get testhashs32Fnv1a => const fb.Int32Reader().vTableGet(_bc, _bcOffset, 44, 0);
-  int get testhashu32Fnv1a => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 46, 0);
-  int get testhashs64Fnv1a => const fb.Int64Reader().vTableGet(_bc, _bcOffset, 48, 0);
-  int get testhashu64Fnv1a => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 50, 0);
-  List<bool>? get testarrayofbools => const fb.ListReader<bool>(fb.BoolReader()).vTableGetNullable(_bc, _bcOffset, 52);
-  double get testf => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 54, 3.14159);
-  double get testf2 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 56, 3.0);
-  double get testf3 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 58, 0.0);
-  List<String>? get testarrayofstring2 => const fb.ListReader<String>(fb.StringReader()).vTableGetNullable(_bc, _bcOffset, 60);
-  List<Ability>? get testarrayofsortedstruct => const fb.ListReader<Ability>(Ability.reader).vTableGetNullable(_bc, _bcOffset, 62);
-  List<int>? get flex => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 64);
-  List<Test>? get test5 => const fb.ListReader<Test>(Test.reader).vTableGetNullable(_bc, _bcOffset, 66);
-  List<int>? get vectorOfLongs => const fb.ListReader<int>(fb.Int64Reader()).vTableGetNullable(_bc, _bcOffset, 68);
-  List<double>? get vectorOfDoubles => const fb.ListReader<double>(fb.Float64Reader()).vTableGetNullable(_bc, _bcOffset, 70);
-  my_game.InParentNamespace? get parentNamespaceTest => my_game.InParentNamespace.reader.vTableGetNullable(_bc, _bcOffset, 72);
-  List<Referrable>? get vectorOfReferrables => const fb.ListReader<Referrable>(Referrable.reader).vTableGetNullable(_bc, _bcOffset, 74);
-  int get singleWeakReference => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 76, 0);
-  List<int>? get vectorOfWeakReferences => const fb.ListReader<int>(fb.Uint64Reader()).vTableGetNullable(_bc, _bcOffset, 78);
-  List<Referrable>? get vectorOfStrongReferrables => const fb.ListReader<Referrable>(Referrable.reader).vTableGetNullable(_bc, _bcOffset, 80);
-  int get coOwningReference => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 82, 0);
-  List<int>? get vectorOfCoOwningReferences => const fb.ListReader<int>(fb.Uint64Reader()).vTableGetNullable(_bc, _bcOffset, 84);
-  int get nonOwningReference => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 86, 0);
-  List<int>? get vectorOfNonOwningReferences => const fb.ListReader<int>(fb.Uint64Reader()).vTableGetNullable(_bc, _bcOffset, 88);
-  AnyUniqueAliasesTypeId? get anyUniqueType => AnyUniqueAliasesTypeId._createOrNull(const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 90));
+  bool get testbool =>
+      const fb.BoolReader().vTableGet(_bc, _bcOffset, 34, false);
+  int get testhashs32Fnv1 =>
+      const fb.Int32Reader().vTableGet(_bc, _bcOffset, 36, 0);
+  int get testhashu32Fnv1 =>
+      const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 38, 0);
+  int get testhashs64Fnv1 =>
+      const fb.Int64Reader().vTableGet(_bc, _bcOffset, 40, 0);
+  int get testhashu64Fnv1 =>
+      const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 42, 0);
+  int get testhashs32Fnv1a =>
+      const fb.Int32Reader().vTableGet(_bc, _bcOffset, 44, 0);
+  int get testhashu32Fnv1a =>
+      const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 46, 0);
+  int get testhashs64Fnv1a =>
+      const fb.Int64Reader().vTableGet(_bc, _bcOffset, 48, 0);
+  int get testhashu64Fnv1a =>
+      const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 50, 0);
+  List<bool>? get testarrayofbools => const fb.ListReader<bool>(
+    fb.BoolReader(),
+  ).vTableGetNullable(_bc, _bcOffset, 52);
+  double get testf =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 54, 3.14159);
+  double get testf2 =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 56, 3.0);
+  double get testf3 =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 58, 0.0);
+  List<String>? get testarrayofstring2 => const fb.ListReader<String>(
+    fb.StringReader(),
+  ).vTableGetNullable(_bc, _bcOffset, 60);
+  List<Ability>? get testarrayofsortedstruct => const fb.ListReader<Ability>(
+    Ability.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 62);
+  List<int>? get flex =>
+      const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 64);
+  List<Test>? get test5 => const fb.ListReader<Test>(
+    Test.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 66);
+  List<int>? get vectorOfLongs => const fb.ListReader<int>(
+    fb.Int64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 68);
+  List<double>? get vectorOfDoubles => const fb.ListReader<double>(
+    fb.Float64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 70);
+  my_game.InParentNamespace? get parentNamespaceTest =>
+      my_game.InParentNamespace.reader.vTableGetNullable(_bc, _bcOffset, 72);
+  List<Referrable>? get vectorOfReferrables => const fb.ListReader<Referrable>(
+    Referrable.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 74);
+  int get singleWeakReference =>
+      const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 76, 0);
+  List<int>? get vectorOfWeakReferences => const fb.ListReader<int>(
+    fb.Uint64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 78);
+  List<Referrable>? get vectorOfStrongReferrables =>
+      const fb.ListReader<Referrable>(
+        Referrable.reader,
+      ).vTableGetNullable(_bc, _bcOffset, 80);
+  int get coOwningReference =>
+      const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 82, 0);
+  List<int>? get vectorOfCoOwningReferences => const fb.ListReader<int>(
+    fb.Uint64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 84);
+  int get nonOwningReference =>
+      const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 86, 0);
+  List<int>? get vectorOfNonOwningReferences => const fb.ListReader<int>(
+    fb.Uint64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 88);
+  AnyUniqueAliasesTypeId? get anyUniqueType =>
+      AnyUniqueAliasesTypeId._createOrNull(
+        const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 90),
+      );
   dynamic get anyUnique {
     switch (anyUniqueType?.value) {
-      case 1: return Monster.reader.vTableGetNullable(_bc, _bcOffset, 92);
-      case 2: return TestSimpleTableWithEnum.reader.vTableGetNullable(_bc, _bcOffset, 92);
-      case 3: return my_game_example2.Monster.reader.vTableGetNullable(_bc, _bcOffset, 92);
-      default: return null;
+      case 1:
+        return Monster.reader.vTableGetNullable(_bc, _bcOffset, 92);
+      case 2:
+        return TestSimpleTableWithEnum.reader.vTableGetNullable(
+          _bc,
+          _bcOffset,
+          92,
+        );
+      case 3:
+        return my_game_example2.Monster.reader.vTableGetNullable(
+          _bc,
+          _bcOffset,
+          92,
+        );
+      default:
+        return null;
     }
   }
-  AnyAmbiguousAliasesTypeId? get anyAmbiguousType => AnyAmbiguousAliasesTypeId._createOrNull(const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 94));
+
+  AnyAmbiguousAliasesTypeId? get anyAmbiguousType =>
+      AnyAmbiguousAliasesTypeId._createOrNull(
+        const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 94),
+      );
   dynamic get anyAmbiguous {
     switch (anyAmbiguousType?.value) {
-      case 1: return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
-      case 2: return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
-      case 3: return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
-      default: return null;
+      case 1:
+        return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
+      case 2:
+        return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
+      case 3:
+        return Monster.reader.vTableGetNullable(_bc, _bcOffset, 96);
+      default:
+        return null;
     }
   }
-  List<Color>? get vectorOfEnums => const fb.ListReader<Color>(Color.reader).vTableGetNullable(_bc, _bcOffset, 98);
-  Race get signedEnum => Race.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 100, -1));
-  List<int>? get testrequirednestedflatbuffer => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 102);
-  List<Stat>? get scalarKeySortedTables => const fb.ListReader<Stat>(Stat.reader).vTableGetNullable(_bc, _bcOffset, 104);
+
+  List<Color>? get vectorOfEnums => const fb.ListReader<Color>(
+    Color.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 98);
+  Race get signedEnum =>
+      Race.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 100, -1));
+  List<int>? get testrequirednestedflatbuffer =>
+      const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 102);
+  List<Stat>? get scalarKeySortedTables => const fb.ListReader<Stat>(
+    Stat.reader,
+  ).vTableGetNullable(_bc, _bcOffset, 104);
   Test? get nativeInline => Test.reader.vTableGetNullable(_bc, _bcOffset, 106);
-  LongEnum get longEnumNonEnumDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 108, 0));
-  LongEnum get longEnumNormalDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 110, 2));
-  double get nanDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 112, double.nan);
-  double get infDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 114, double.infinity);
-  double get positiveInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 116, double.infinity);
-  double get infinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 118, double.infinity);
-  double get positiveInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 120, double.infinity);
-  double get negativeInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 122, double.negativeInfinity);
-  double get negativeInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 124, double.negativeInfinity);
-  double get doubleInfDefault => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 126, double.infinity);
+  LongEnum get longEnumNonEnumDefault => LongEnum.fromValue(
+    const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 108, 0),
+  );
+  LongEnum get longEnumNormalDefault => LongEnum.fromValue(
+    const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 110, 2),
+  );
+  double get nanDefault =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 112, double.nan);
+  double get infDefault =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 114, double.infinity);
+  double get positiveInfDefault =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 116, double.infinity);
+  double get infinityDefault =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 118, double.infinity);
+  double get positiveInfinityDefault =>
+      const fb.Float32Reader().vTableGet(_bc, _bcOffset, 120, double.infinity);
+  double get negativeInfDefault => const fb.Float32Reader().vTableGet(
+    _bc,
+    _bcOffset,
+    122,
+    double.negativeInfinity,
+  );
+  double get negativeInfinityDefault => const fb.Float32Reader().vTableGet(
+    _bc,
+    _bcOffset,
+    124,
+    double.negativeInfinity,
+  );
+  double get doubleInfDefault =>
+      const fb.Float64Reader().vTableGet(_bc, _bcOffset, 126, double.infinity);
 
   @override
   String toString() {
@@ -1206,67 +1328,109 @@
   }
 
   MonsterT unpack() => MonsterT(
-      pos: pos?.unpack(),
-      mana: mana,
-      hp: hp,
-      name: name,
-      inventory: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 14),
-      color: color,
-      testType: testType,
-      test: test,
-      test4: test4?.map((e) => e.unpack()).toList(),
-      testarrayofstring: const fb.ListReader<String>(fb.StringReader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 24),
-      testarrayoftables: testarrayoftables?.map((e) => e.unpack()).toList(),
-      enemy: enemy?.unpack(),
-      testnestedflatbuffer: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 30),
-      testempty: testempty?.unpack(),
-      testbool: testbool,
-      testhashs32Fnv1: testhashs32Fnv1,
-      testhashu32Fnv1: testhashu32Fnv1,
-      testhashs64Fnv1: testhashs64Fnv1,
-      testhashu64Fnv1: testhashu64Fnv1,
-      testhashs32Fnv1a: testhashs32Fnv1a,
-      testhashu32Fnv1a: testhashu32Fnv1a,
-      testhashs64Fnv1a: testhashs64Fnv1a,
-      testhashu64Fnv1a: testhashu64Fnv1a,
-      testarrayofbools: const fb.ListReader<bool>(fb.BoolReader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 52),
-      testf: testf,
-      testf2: testf2,
-      testf3: testf3,
-      testarrayofstring2: const fb.ListReader<String>(fb.StringReader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 60),
-      testarrayofsortedstruct: testarrayofsortedstruct?.map((e) => e.unpack()).toList(),
-      flex: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 64),
-      test5: test5?.map((e) => e.unpack()).toList(),
-      vectorOfLongs: const fb.ListReader<int>(fb.Int64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 68),
-      vectorOfDoubles: const fb.ListReader<double>(fb.Float64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 70),
-      parentNamespaceTest: parentNamespaceTest?.unpack(),
-      vectorOfReferrables: vectorOfReferrables?.map((e) => e.unpack()).toList(),
-      singleWeakReference: singleWeakReference,
-      vectorOfWeakReferences: const fb.ListReader<int>(fb.Uint64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 78),
-      vectorOfStrongReferrables: vectorOfStrongReferrables?.map((e) => e.unpack()).toList(),
-      coOwningReference: coOwningReference,
-      vectorOfCoOwningReferences: const fb.ListReader<int>(fb.Uint64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 84),
-      nonOwningReference: nonOwningReference,
-      vectorOfNonOwningReferences: const fb.ListReader<int>(fb.Uint64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 88),
-      anyUniqueType: anyUniqueType,
-      anyUnique: anyUnique,
-      anyAmbiguousType: anyAmbiguousType,
-      anyAmbiguous: anyAmbiguous,
-      vectorOfEnums: const fb.ListReader<Color>(Color.reader, lazy: false).vTableGetNullable(_bc, _bcOffset, 98),
-      signedEnum: signedEnum,
-      testrequirednestedflatbuffer: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 102),
-      scalarKeySortedTables: scalarKeySortedTables?.map((e) => e.unpack()).toList(),
-      nativeInline: nativeInline?.unpack(),
-      longEnumNonEnumDefault: longEnumNonEnumDefault,
-      longEnumNormalDefault: longEnumNormalDefault,
-      nanDefault: nanDefault,
-      infDefault: infDefault,
-      positiveInfDefault: positiveInfDefault,
-      infinityDefault: infinityDefault,
-      positiveInfinityDefault: positiveInfinityDefault,
-      negativeInfDefault: negativeInfDefault,
-      negativeInfinityDefault: negativeInfinityDefault,
-      doubleInfDefault: doubleInfDefault);
+    pos: pos?.unpack(),
+    mana: mana,
+    hp: hp,
+    name: name,
+    inventory: const fb.Uint8ListReader(
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 14),
+    color: color,
+    testType: testType,
+    test: test,
+    test4: test4?.map((e) => e.unpack()).toList(),
+    testarrayofstring: const fb.ListReader<String>(
+      fb.StringReader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 24),
+    testarrayoftables: testarrayoftables?.map((e) => e.unpack()).toList(),
+    enemy: enemy?.unpack(),
+    testnestedflatbuffer: const fb.Uint8ListReader(
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 30),
+    testempty: testempty?.unpack(),
+    testbool: testbool,
+    testhashs32Fnv1: testhashs32Fnv1,
+    testhashu32Fnv1: testhashu32Fnv1,
+    testhashs64Fnv1: testhashs64Fnv1,
+    testhashu64Fnv1: testhashu64Fnv1,
+    testhashs32Fnv1a: testhashs32Fnv1a,
+    testhashu32Fnv1a: testhashu32Fnv1a,
+    testhashs64Fnv1a: testhashs64Fnv1a,
+    testhashu64Fnv1a: testhashu64Fnv1a,
+    testarrayofbools: const fb.ListReader<bool>(
+      fb.BoolReader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 52),
+    testf: testf,
+    testf2: testf2,
+    testf3: testf3,
+    testarrayofstring2: const fb.ListReader<String>(
+      fb.StringReader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 60),
+    testarrayofsortedstruct: testarrayofsortedstruct
+        ?.map((e) => e.unpack())
+        .toList(),
+    flex: const fb.Uint8ListReader(
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 64),
+    test5: test5?.map((e) => e.unpack()).toList(),
+    vectorOfLongs: const fb.ListReader<int>(
+      fb.Int64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 68),
+    vectorOfDoubles: const fb.ListReader<double>(
+      fb.Float64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 70),
+    parentNamespaceTest: parentNamespaceTest?.unpack(),
+    vectorOfReferrables: vectorOfReferrables?.map((e) => e.unpack()).toList(),
+    singleWeakReference: singleWeakReference,
+    vectorOfWeakReferences: const fb.ListReader<int>(
+      fb.Uint64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 78),
+    vectorOfStrongReferrables: vectorOfStrongReferrables
+        ?.map((e) => e.unpack())
+        .toList(),
+    coOwningReference: coOwningReference,
+    vectorOfCoOwningReferences: const fb.ListReader<int>(
+      fb.Uint64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 84),
+    nonOwningReference: nonOwningReference,
+    vectorOfNonOwningReferences: const fb.ListReader<int>(
+      fb.Uint64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 88),
+    anyUniqueType: anyUniqueType,
+    anyUnique: anyUnique,
+    anyAmbiguousType: anyAmbiguousType,
+    anyAmbiguous: anyAmbiguous,
+    vectorOfEnums: const fb.ListReader<Color>(
+      Color.reader,
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 98),
+    signedEnum: signedEnum,
+    testrequirednestedflatbuffer: const fb.Uint8ListReader(
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 102),
+    scalarKeySortedTables: scalarKeySortedTables
+        ?.map((e) => e.unpack())
+        .toList(),
+    nativeInline: nativeInline?.unpack(),
+    longEnumNonEnumDefault: longEnumNonEnumDefault,
+    longEnumNormalDefault: longEnumNormalDefault,
+    nanDefault: nanDefault,
+    infDefault: infDefault,
+    positiveInfDefault: positiveInfDefault,
+    infinityDefault: infinityDefault,
+    positiveInfinityDefault: positiveInfinityDefault,
+    negativeInfDefault: negativeInfDefault,
+    negativeInfinityDefault: negativeInfinityDefault,
+    doubleInfDefault: doubleInfDefault,
+  );
 
   static int pack(fb.Builder fbBuilder, MonsterT? object) {
     if (object == null) return 0;
@@ -1286,6 +1450,7 @@
   dynamic test;
   List<TestT>? test4;
   List<String>? testarrayofstring;
+
   ///  an example documentation comment: this will end up in the generated code
   ///  multiline too
   List<MonsterT>? testarrayoftables;
@@ -1341,127 +1506,168 @@
   double doubleInfDefault;
 
   MonsterT({
-      this.pos,
-      this.mana = 150,
-      this.hp = 100,
-      this.name,
-      this.inventory,
-      this.color = Color.Blue,
-      this.testType,
-      this.test,
-      this.test4,
-      this.testarrayofstring,
-      this.testarrayoftables,
-      this.enemy,
-      this.testnestedflatbuffer,
-      this.testempty,
-      this.testbool = false,
-      this.testhashs32Fnv1 = 0,
-      this.testhashu32Fnv1 = 0,
-      this.testhashs64Fnv1 = 0,
-      this.testhashu64Fnv1 = 0,
-      this.testhashs32Fnv1a = 0,
-      this.testhashu32Fnv1a = 0,
-      this.testhashs64Fnv1a = 0,
-      this.testhashu64Fnv1a = 0,
-      this.testarrayofbools,
-      this.testf = 3.14159,
-      this.testf2 = 3.0,
-      this.testf3 = 0.0,
-      this.testarrayofstring2,
-      this.testarrayofsortedstruct,
-      this.flex,
-      this.test5,
-      this.vectorOfLongs,
-      this.vectorOfDoubles,
-      this.parentNamespaceTest,
-      this.vectorOfReferrables,
-      this.singleWeakReference = 0,
-      this.vectorOfWeakReferences,
-      this.vectorOfStrongReferrables,
-      this.coOwningReference = 0,
-      this.vectorOfCoOwningReferences,
-      this.nonOwningReference = 0,
-      this.vectorOfNonOwningReferences,
-      this.anyUniqueType,
-      this.anyUnique,
-      this.anyAmbiguousType,
-      this.anyAmbiguous,
-      this.vectorOfEnums,
-      this.signedEnum = Race.None,
-      this.testrequirednestedflatbuffer,
-      this.scalarKeySortedTables,
-      this.nativeInline,
-      this.longEnumNonEnumDefault = LongEnum._default,
-      this.longEnumNormalDefault = LongEnum.LongOne,
-      this.nanDefault = double.nan,
-      this.infDefault = double.infinity,
-      this.positiveInfDefault = double.infinity,
-      this.infinityDefault = double.infinity,
-      this.positiveInfinityDefault = double.infinity,
-      this.negativeInfDefault = double.negativeInfinity,
-      this.negativeInfinityDefault = double.negativeInfinity,
-      this.doubleInfDefault = double.infinity});
+    this.pos,
+    this.mana = 150,
+    this.hp = 100,
+    this.name,
+    this.inventory,
+    this.color = Color.Blue,
+    this.testType,
+    this.test,
+    this.test4,
+    this.testarrayofstring,
+    this.testarrayoftables,
+    this.enemy,
+    this.testnestedflatbuffer,
+    this.testempty,
+    this.testbool = false,
+    this.testhashs32Fnv1 = 0,
+    this.testhashu32Fnv1 = 0,
+    this.testhashs64Fnv1 = 0,
+    this.testhashu64Fnv1 = 0,
+    this.testhashs32Fnv1a = 0,
+    this.testhashu32Fnv1a = 0,
+    this.testhashs64Fnv1a = 0,
+    this.testhashu64Fnv1a = 0,
+    this.testarrayofbools,
+    this.testf = 3.14159,
+    this.testf2 = 3.0,
+    this.testf3 = 0.0,
+    this.testarrayofstring2,
+    this.testarrayofsortedstruct,
+    this.flex,
+    this.test5,
+    this.vectorOfLongs,
+    this.vectorOfDoubles,
+    this.parentNamespaceTest,
+    this.vectorOfReferrables,
+    this.singleWeakReference = 0,
+    this.vectorOfWeakReferences,
+    this.vectorOfStrongReferrables,
+    this.coOwningReference = 0,
+    this.vectorOfCoOwningReferences,
+    this.nonOwningReference = 0,
+    this.vectorOfNonOwningReferences,
+    this.anyUniqueType,
+    this.anyUnique,
+    this.anyAmbiguousType,
+    this.anyAmbiguous,
+    this.vectorOfEnums,
+    this.signedEnum = Race.None,
+    this.testrequirednestedflatbuffer,
+    this.scalarKeySortedTables,
+    this.nativeInline,
+    this.longEnumNonEnumDefault = LongEnum._default,
+    this.longEnumNormalDefault = LongEnum.LongOne,
+    this.nanDefault = double.nan,
+    this.infDefault = double.infinity,
+    this.positiveInfDefault = double.infinity,
+    this.infinityDefault = double.infinity,
+    this.positiveInfinityDefault = double.infinity,
+    this.negativeInfDefault = double.negativeInfinity,
+    this.negativeInfinityDefault = double.negativeInfinity,
+    this.doubleInfDefault = double.infinity,
+  });
 
   @override
   int pack(fb.Builder fbBuilder) {
-    final int? nameOffset = name == null ? null
-        : fbBuilder.writeString(name!);
-    final int? inventoryOffset = inventory == null ? null
+    final int? nameOffset = name == null ? null : fbBuilder.writeString(name!);
+    final int? inventoryOffset = inventory == null
+        ? null
         : fbBuilder.writeListUint8(inventory!);
     final int? testOffset = test?.pack(fbBuilder);
     int? test4Offset;
     if (test4 != null) {
-      for (var e in test4!) { e.pack(fbBuilder); }
+      for (var e in test4!) {
+        e.pack(fbBuilder);
+      }
       test4Offset = fbBuilder.endStructVector(test4!.length);
     }
-    final int? testarrayofstringOffset = testarrayofstring == null ? null
-        : fbBuilder.writeList(testarrayofstring!.map(fbBuilder.writeString).toList());
-    final int? testarrayoftablesOffset = testarrayoftables == null ? null
-        : fbBuilder.writeList(testarrayoftables!.map((b) => b.pack(fbBuilder)).toList());
+    final int? testarrayofstringOffset = testarrayofstring == null
+        ? null
+        : fbBuilder.writeList(
+            testarrayofstring!.map(fbBuilder.writeString).toList(),
+          );
+    final int? testarrayoftablesOffset = testarrayoftables == null
+        ? null
+        : fbBuilder.writeList(
+            testarrayoftables!.map((b) => b.pack(fbBuilder)).toList(),
+          );
     final int? enemyOffset = enemy?.pack(fbBuilder);
-    final int? testnestedflatbufferOffset = testnestedflatbuffer == null ? null
+    final int? testnestedflatbufferOffset = testnestedflatbuffer == null
+        ? null
         : fbBuilder.writeListUint8(testnestedflatbuffer!);
     final int? testemptyOffset = testempty?.pack(fbBuilder);
-    final int? testarrayofboolsOffset = testarrayofbools == null ? null
+    final int? testarrayofboolsOffset = testarrayofbools == null
+        ? null
         : fbBuilder.writeListBool(testarrayofbools!);
-    final int? testarrayofstring2Offset = testarrayofstring2 == null ? null
-        : fbBuilder.writeList(testarrayofstring2!.map(fbBuilder.writeString).toList());
+    final int? testarrayofstring2Offset = testarrayofstring2 == null
+        ? null
+        : fbBuilder.writeList(
+            testarrayofstring2!.map(fbBuilder.writeString).toList(),
+          );
     int? testarrayofsortedstructOffset;
     if (testarrayofsortedstruct != null) {
-      for (var e in testarrayofsortedstruct!) { e.pack(fbBuilder); }
-      testarrayofsortedstructOffset = fbBuilder.endStructVector(testarrayofsortedstruct!.length);
+      for (var e in testarrayofsortedstruct!) {
+        e.pack(fbBuilder);
+      }
+      testarrayofsortedstructOffset = fbBuilder.endStructVector(
+        testarrayofsortedstruct!.length,
+      );
     }
-    final int? flexOffset = flex == null ? null
+    final int? flexOffset = flex == null
+        ? null
         : fbBuilder.writeListUint8(flex!);
     int? test5Offset;
     if (test5 != null) {
-      for (var e in test5!) { e.pack(fbBuilder); }
+      for (var e in test5!) {
+        e.pack(fbBuilder);
+      }
       test5Offset = fbBuilder.endStructVector(test5!.length);
     }
-    final int? vectorOfLongsOffset = vectorOfLongs == null ? null
+    final int? vectorOfLongsOffset = vectorOfLongs == null
+        ? null
         : fbBuilder.writeListInt64(vectorOfLongs!);
-    final int? vectorOfDoublesOffset = vectorOfDoubles == null ? null
+    final int? vectorOfDoublesOffset = vectorOfDoubles == null
+        ? null
         : fbBuilder.writeListFloat64(vectorOfDoubles!);
     final int? parentNamespaceTestOffset = parentNamespaceTest?.pack(fbBuilder);
-    final int? vectorOfReferrablesOffset = vectorOfReferrables == null ? null
-        : fbBuilder.writeList(vectorOfReferrables!.map((b) => b.pack(fbBuilder)).toList());
-    final int? vectorOfWeakReferencesOffset = vectorOfWeakReferences == null ? null
+    final int? vectorOfReferrablesOffset = vectorOfReferrables == null
+        ? null
+        : fbBuilder.writeList(
+            vectorOfReferrables!.map((b) => b.pack(fbBuilder)).toList(),
+          );
+    final int? vectorOfWeakReferencesOffset = vectorOfWeakReferences == null
+        ? null
         : fbBuilder.writeListUint64(vectorOfWeakReferences!);
-    final int? vectorOfStrongReferrablesOffset = vectorOfStrongReferrables == null ? null
-        : fbBuilder.writeList(vectorOfStrongReferrables!.map((b) => b.pack(fbBuilder)).toList());
-    final int? vectorOfCoOwningReferencesOffset = vectorOfCoOwningReferences == null ? null
+    final int? vectorOfStrongReferrablesOffset =
+        vectorOfStrongReferrables == null
+        ? null
+        : fbBuilder.writeList(
+            vectorOfStrongReferrables!.map((b) => b.pack(fbBuilder)).toList(),
+          );
+    final int? vectorOfCoOwningReferencesOffset =
+        vectorOfCoOwningReferences == null
+        ? null
         : fbBuilder.writeListUint64(vectorOfCoOwningReferences!);
-    final int? vectorOfNonOwningReferencesOffset = vectorOfNonOwningReferences == null ? null
+    final int? vectorOfNonOwningReferencesOffset =
+        vectorOfNonOwningReferences == null
+        ? null
         : fbBuilder.writeListUint64(vectorOfNonOwningReferences!);
     final int? anyUniqueOffset = anyUnique?.pack(fbBuilder);
     final int? anyAmbiguousOffset = anyAmbiguous?.pack(fbBuilder);
-    final int? vectorOfEnumsOffset = vectorOfEnums == null ? null
+    final int? vectorOfEnumsOffset = vectorOfEnums == null
+        ? null
         : fbBuilder.writeListUint8(vectorOfEnums!.map((f) => f.value).toList());
-    final int? testrequirednestedflatbufferOffset = testrequirednestedflatbuffer == null ? null
+    final int? testrequirednestedflatbufferOffset =
+        testrequirednestedflatbuffer == null
+        ? null
         : fbBuilder.writeListUint8(testrequirednestedflatbuffer!);
-    final int? scalarKeySortedTablesOffset = scalarKeySortedTables == null ? null
-        : fbBuilder.writeList(scalarKeySortedTables!.map((b) => b.pack(fbBuilder)).toList());
+    final int? scalarKeySortedTablesOffset = scalarKeySortedTables == null
+        ? null
+        : fbBuilder.writeList(
+            scalarKeySortedTables!.map((b) => b.pack(fbBuilder)).toList(),
+          );
     fbBuilder.startTable(62);
     if (pos != null) {
       fbBuilder.addStruct(0, pos!.pack(fbBuilder));
@@ -1541,8 +1747,8 @@
   const _MonsterReader();
 
   @override
-  Monster createObject(fb.BufferContext bc, int offset) => 
-    Monster._(bc, offset);
+  Monster createObject(fb.BufferContext bc, int offset) =>
+      Monster._(bc, offset);
 }
 
 class MonsterBuilder {
@@ -1558,242 +1764,302 @@
     fbBuilder.addStruct(0, offset);
     return fbBuilder.offset;
   }
+
   int addMana(int? mana) {
     fbBuilder.addInt16(1, mana);
     return fbBuilder.offset;
   }
+
   int addHp(int? hp) {
     fbBuilder.addInt16(2, hp);
     return fbBuilder.offset;
   }
+
   int addNameOffset(int? offset) {
     fbBuilder.addOffset(3, offset);
     return fbBuilder.offset;
   }
+
   int addInventoryOffset(int? offset) {
     fbBuilder.addOffset(5, offset);
     return fbBuilder.offset;
   }
+
   int addColor(Color? color) {
     fbBuilder.addUint8(6, color?.value);
     return fbBuilder.offset;
   }
+
   int addTestType(AnyTypeId? testType) {
     fbBuilder.addUint8(7, testType?.value);
     return fbBuilder.offset;
   }
+
   int addTestOffset(int? offset) {
     fbBuilder.addOffset(8, offset);
     return fbBuilder.offset;
   }
+
   int addTest4Offset(int? offset) {
     fbBuilder.addOffset(9, offset);
     return fbBuilder.offset;
   }
+
   int addTestarrayofstringOffset(int? offset) {
     fbBuilder.addOffset(10, offset);
     return fbBuilder.offset;
   }
+
   int addTestarrayoftablesOffset(int? offset) {
     fbBuilder.addOffset(11, offset);
     return fbBuilder.offset;
   }
+
   int addEnemyOffset(int? offset) {
     fbBuilder.addOffset(12, offset);
     return fbBuilder.offset;
   }
+
   int addTestnestedflatbufferOffset(int? offset) {
     fbBuilder.addOffset(13, offset);
     return fbBuilder.offset;
   }
+
   int addTestemptyOffset(int? offset) {
     fbBuilder.addOffset(14, offset);
     return fbBuilder.offset;
   }
+
   int addTestbool(bool? testbool) {
     fbBuilder.addBool(15, testbool);
     return fbBuilder.offset;
   }
+
   int addTesthashs32Fnv1(int? testhashs32Fnv1) {
     fbBuilder.addInt32(16, testhashs32Fnv1);
     return fbBuilder.offset;
   }
+
   int addTesthashu32Fnv1(int? testhashu32Fnv1) {
     fbBuilder.addUint32(17, testhashu32Fnv1);
     return fbBuilder.offset;
   }
+
   int addTesthashs64Fnv1(int? testhashs64Fnv1) {
     fbBuilder.addInt64(18, testhashs64Fnv1);
     return fbBuilder.offset;
   }
+
   int addTesthashu64Fnv1(int? testhashu64Fnv1) {
     fbBuilder.addUint64(19, testhashu64Fnv1);
     return fbBuilder.offset;
   }
+
   int addTesthashs32Fnv1a(int? testhashs32Fnv1a) {
     fbBuilder.addInt32(20, testhashs32Fnv1a);
     return fbBuilder.offset;
   }
+
   int addTesthashu32Fnv1a(int? testhashu32Fnv1a) {
     fbBuilder.addUint32(21, testhashu32Fnv1a);
     return fbBuilder.offset;
   }
+
   int addTesthashs64Fnv1a(int? testhashs64Fnv1a) {
     fbBuilder.addInt64(22, testhashs64Fnv1a);
     return fbBuilder.offset;
   }
+
   int addTesthashu64Fnv1a(int? testhashu64Fnv1a) {
     fbBuilder.addUint64(23, testhashu64Fnv1a);
     return fbBuilder.offset;
   }
+
   int addTestarrayofboolsOffset(int? offset) {
     fbBuilder.addOffset(24, offset);
     return fbBuilder.offset;
   }
+
   int addTestf(double? testf) {
     fbBuilder.addFloat32(25, testf);
     return fbBuilder.offset;
   }
+
   int addTestf2(double? testf2) {
     fbBuilder.addFloat32(26, testf2);
     return fbBuilder.offset;
   }
+
   int addTestf3(double? testf3) {
     fbBuilder.addFloat32(27, testf3);
     return fbBuilder.offset;
   }
+
   int addTestarrayofstring2Offset(int? offset) {
     fbBuilder.addOffset(28, offset);
     return fbBuilder.offset;
   }
+
   int addTestarrayofsortedstructOffset(int? offset) {
     fbBuilder.addOffset(29, offset);
     return fbBuilder.offset;
   }
+
   int addFlexOffset(int? offset) {
     fbBuilder.addOffset(30, offset);
     return fbBuilder.offset;
   }
+
   int addTest5Offset(int? offset) {
     fbBuilder.addOffset(31, offset);
     return fbBuilder.offset;
   }
+
   int addVectorOfLongsOffset(int? offset) {
     fbBuilder.addOffset(32, offset);
     return fbBuilder.offset;
   }
+
   int addVectorOfDoublesOffset(int? offset) {
     fbBuilder.addOffset(33, offset);
     return fbBuilder.offset;
   }
+
   int addParentNamespaceTestOffset(int? offset) {
     fbBuilder.addOffset(34, offset);
     return fbBuilder.offset;
   }
+
   int addVectorOfReferrablesOffset(int? offset) {
     fbBuilder.addOffset(35, offset);
     return fbBuilder.offset;
   }
+
   int addSingleWeakReference(int? singleWeakReference) {
     fbBuilder.addUint64(36, singleWeakReference);
     return fbBuilder.offset;
   }
+
   int addVectorOfWeakReferencesOffset(int? offset) {
     fbBuilder.addOffset(37, offset);
     return fbBuilder.offset;
   }
+
   int addVectorOfStrongReferrablesOffset(int? offset) {
     fbBuilder.addOffset(38, offset);
     return fbBuilder.offset;
   }
+
   int addCoOwningReference(int? coOwningReference) {
     fbBuilder.addUint64(39, coOwningReference);
     return fbBuilder.offset;
   }
+
   int addVectorOfCoOwningReferencesOffset(int? offset) {
     fbBuilder.addOffset(40, offset);
     return fbBuilder.offset;
   }
+
   int addNonOwningReference(int? nonOwningReference) {
     fbBuilder.addUint64(41, nonOwningReference);
     return fbBuilder.offset;
   }
+
   int addVectorOfNonOwningReferencesOffset(int? offset) {
     fbBuilder.addOffset(42, offset);
     return fbBuilder.offset;
   }
+
   int addAnyUniqueType(AnyUniqueAliasesTypeId? anyUniqueType) {
     fbBuilder.addUint8(43, anyUniqueType?.value);
     return fbBuilder.offset;
   }
+
   int addAnyUniqueOffset(int? offset) {
     fbBuilder.addOffset(44, offset);
     return fbBuilder.offset;
   }
+
   int addAnyAmbiguousType(AnyAmbiguousAliasesTypeId? anyAmbiguousType) {
     fbBuilder.addUint8(45, anyAmbiguousType?.value);
     return fbBuilder.offset;
   }
+
   int addAnyAmbiguousOffset(int? offset) {
     fbBuilder.addOffset(46, offset);
     return fbBuilder.offset;
   }
+
   int addVectorOfEnumsOffset(int? offset) {
     fbBuilder.addOffset(47, offset);
     return fbBuilder.offset;
   }
+
   int addSignedEnum(Race? signedEnum) {
     fbBuilder.addInt8(48, signedEnum?.value);
     return fbBuilder.offset;
   }
+
   int addTestrequirednestedflatbufferOffset(int? offset) {
     fbBuilder.addOffset(49, offset);
     return fbBuilder.offset;
   }
+
   int addScalarKeySortedTablesOffset(int? offset) {
     fbBuilder.addOffset(50, offset);
     return fbBuilder.offset;
   }
+
   int addNativeInline(int offset) {
     fbBuilder.addStruct(51, offset);
     return fbBuilder.offset;
   }
+
   int addLongEnumNonEnumDefault(LongEnum? longEnumNonEnumDefault) {
     fbBuilder.addUint64(52, longEnumNonEnumDefault?.value);
     return fbBuilder.offset;
   }
+
   int addLongEnumNormalDefault(LongEnum? longEnumNormalDefault) {
     fbBuilder.addUint64(53, longEnumNormalDefault?.value);
     return fbBuilder.offset;
   }
+
   int addNanDefault(double? nanDefault) {
     fbBuilder.addFloat32(54, nanDefault);
     return fbBuilder.offset;
   }
+
   int addInfDefault(double? infDefault) {
     fbBuilder.addFloat32(55, infDefault);
     return fbBuilder.offset;
   }
+
   int addPositiveInfDefault(double? positiveInfDefault) {
     fbBuilder.addFloat32(56, positiveInfDefault);
     return fbBuilder.offset;
   }
+
   int addInfinityDefault(double? infinityDefault) {
     fbBuilder.addFloat32(57, infinityDefault);
     return fbBuilder.offset;
   }
+
   int addPositiveInfinityDefault(double? positiveInfinityDefault) {
     fbBuilder.addFloat32(58, positiveInfinityDefault);
     return fbBuilder.offset;
   }
+
   int addNegativeInfDefault(double? negativeInfDefault) {
     fbBuilder.addFloat32(59, negativeInfDefault);
     return fbBuilder.offset;
   }
+
   int addNegativeInfinityDefault(double? negativeInfinityDefault) {
     fbBuilder.addFloat32(60, negativeInfinityDefault);
     return fbBuilder.offset;
   }
+
   int addDoubleInfDefault(double? doubleInfDefault) {
     fbBuilder.addFloat64(61, doubleInfDefault);
     return fbBuilder.offset;
@@ -1929,120 +2195,167 @@
     double? negativeInfDefault,
     double? negativeInfinityDefault,
     double? doubleInfDefault,
-  })
-      : _pos = pos,
-        _mana = mana,
-        _hp = hp,
-        _name = name,
-        _inventory = inventory,
-        _color = color,
-        _testType = testType,
-        _test = test,
-        _test4 = test4,
-        _testarrayofstring = testarrayofstring,
-        _testarrayoftables = testarrayoftables,
-        _enemy = enemy,
-        _testnestedflatbuffer = testnestedflatbuffer,
-        _testempty = testempty,
-        _testbool = testbool,
-        _testhashs32Fnv1 = testhashs32Fnv1,
-        _testhashu32Fnv1 = testhashu32Fnv1,
-        _testhashs64Fnv1 = testhashs64Fnv1,
-        _testhashu64Fnv1 = testhashu64Fnv1,
-        _testhashs32Fnv1a = testhashs32Fnv1a,
-        _testhashu32Fnv1a = testhashu32Fnv1a,
-        _testhashs64Fnv1a = testhashs64Fnv1a,
-        _testhashu64Fnv1a = testhashu64Fnv1a,
-        _testarrayofbools = testarrayofbools,
-        _testf = testf,
-        _testf2 = testf2,
-        _testf3 = testf3,
-        _testarrayofstring2 = testarrayofstring2,
-        _testarrayofsortedstruct = testarrayofsortedstruct,
-        _flex = flex,
-        _test5 = test5,
-        _vectorOfLongs = vectorOfLongs,
-        _vectorOfDoubles = vectorOfDoubles,
-        _parentNamespaceTest = parentNamespaceTest,
-        _vectorOfReferrables = vectorOfReferrables,
-        _singleWeakReference = singleWeakReference,
-        _vectorOfWeakReferences = vectorOfWeakReferences,
-        _vectorOfStrongReferrables = vectorOfStrongReferrables,
-        _coOwningReference = coOwningReference,
-        _vectorOfCoOwningReferences = vectorOfCoOwningReferences,
-        _nonOwningReference = nonOwningReference,
-        _vectorOfNonOwningReferences = vectorOfNonOwningReferences,
-        _anyUniqueType = anyUniqueType,
-        _anyUnique = anyUnique,
-        _anyAmbiguousType = anyAmbiguousType,
-        _anyAmbiguous = anyAmbiguous,
-        _vectorOfEnums = vectorOfEnums,
-        _signedEnum = signedEnum,
-        _testrequirednestedflatbuffer = testrequirednestedflatbuffer,
-        _scalarKeySortedTables = scalarKeySortedTables,
-        _nativeInline = nativeInline,
-        _longEnumNonEnumDefault = longEnumNonEnumDefault,
-        _longEnumNormalDefault = longEnumNormalDefault,
-        _nanDefault = nanDefault,
-        _infDefault = infDefault,
-        _positiveInfDefault = positiveInfDefault,
-        _infinityDefault = infinityDefault,
-        _positiveInfinityDefault = positiveInfinityDefault,
-        _negativeInfDefault = negativeInfDefault,
-        _negativeInfinityDefault = negativeInfinityDefault,
-        _doubleInfDefault = doubleInfDefault;
+  }) : _pos = pos,
+       _mana = mana,
+       _hp = hp,
+       _name = name,
+       _inventory = inventory,
+       _color = color,
+       _testType = testType,
+       _test = test,
+       _test4 = test4,
+       _testarrayofstring = testarrayofstring,
+       _testarrayoftables = testarrayoftables,
+       _enemy = enemy,
+       _testnestedflatbuffer = testnestedflatbuffer,
+       _testempty = testempty,
+       _testbool = testbool,
+       _testhashs32Fnv1 = testhashs32Fnv1,
+       _testhashu32Fnv1 = testhashu32Fnv1,
+       _testhashs64Fnv1 = testhashs64Fnv1,
+       _testhashu64Fnv1 = testhashu64Fnv1,
+       _testhashs32Fnv1a = testhashs32Fnv1a,
+       _testhashu32Fnv1a = testhashu32Fnv1a,
+       _testhashs64Fnv1a = testhashs64Fnv1a,
+       _testhashu64Fnv1a = testhashu64Fnv1a,
+       _testarrayofbools = testarrayofbools,
+       _testf = testf,
+       _testf2 = testf2,
+       _testf3 = testf3,
+       _testarrayofstring2 = testarrayofstring2,
+       _testarrayofsortedstruct = testarrayofsortedstruct,
+       _flex = flex,
+       _test5 = test5,
+       _vectorOfLongs = vectorOfLongs,
+       _vectorOfDoubles = vectorOfDoubles,
+       _parentNamespaceTest = parentNamespaceTest,
+       _vectorOfReferrables = vectorOfReferrables,
+       _singleWeakReference = singleWeakReference,
+       _vectorOfWeakReferences = vectorOfWeakReferences,
+       _vectorOfStrongReferrables = vectorOfStrongReferrables,
+       _coOwningReference = coOwningReference,
+       _vectorOfCoOwningReferences = vectorOfCoOwningReferences,
+       _nonOwningReference = nonOwningReference,
+       _vectorOfNonOwningReferences = vectorOfNonOwningReferences,
+       _anyUniqueType = anyUniqueType,
+       _anyUnique = anyUnique,
+       _anyAmbiguousType = anyAmbiguousType,
+       _anyAmbiguous = anyAmbiguous,
+       _vectorOfEnums = vectorOfEnums,
+       _signedEnum = signedEnum,
+       _testrequirednestedflatbuffer = testrequirednestedflatbuffer,
+       _scalarKeySortedTables = scalarKeySortedTables,
+       _nativeInline = nativeInline,
+       _longEnumNonEnumDefault = longEnumNonEnumDefault,
+       _longEnumNormalDefault = longEnumNormalDefault,
+       _nanDefault = nanDefault,
+       _infDefault = infDefault,
+       _positiveInfDefault = positiveInfDefault,
+       _infinityDefault = infinityDefault,
+       _positiveInfinityDefault = positiveInfinityDefault,
+       _negativeInfDefault = negativeInfDefault,
+       _negativeInfinityDefault = negativeInfinityDefault,
+       _doubleInfDefault = doubleInfDefault;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? nameOffset = _name == null ? null
+    final int? nameOffset = _name == null
+        ? null
         : fbBuilder.writeString(_name!);
-    final int? inventoryOffset = _inventory == null ? null
+    final int? inventoryOffset = _inventory == null
+        ? null
         : fbBuilder.writeListUint8(_inventory!);
     final int? testOffset = _test?.getOrCreateOffset(fbBuilder);
-    final int? test4Offset = _test4 == null ? null
+    final int? test4Offset = _test4 == null
+        ? null
         : fbBuilder.writeListOfStructs(_test4!);
-    final int? testarrayofstringOffset = _testarrayofstring == null ? null
-        : fbBuilder.writeList(_testarrayofstring!.map(fbBuilder.writeString).toList());
-    final int? testarrayoftablesOffset = _testarrayoftables == null ? null
-        : fbBuilder.writeList(_testarrayoftables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
+    final int? testarrayofstringOffset = _testarrayofstring == null
+        ? null
+        : fbBuilder.writeList(
+            _testarrayofstring!.map(fbBuilder.writeString).toList(),
+          );
+    final int? testarrayoftablesOffset = _testarrayoftables == null
+        ? null
+        : fbBuilder.writeList(
+            _testarrayoftables!
+                .map((b) => b.getOrCreateOffset(fbBuilder))
+                .toList(),
+          );
     final int? enemyOffset = _enemy?.getOrCreateOffset(fbBuilder);
-    final int? testnestedflatbufferOffset = _testnestedflatbuffer == null ? null
+    final int? testnestedflatbufferOffset = _testnestedflatbuffer == null
+        ? null
         : fbBuilder.writeListUint8(_testnestedflatbuffer!);
     final int? testemptyOffset = _testempty?.getOrCreateOffset(fbBuilder);
-    final int? testarrayofboolsOffset = _testarrayofbools == null ? null
+    final int? testarrayofboolsOffset = _testarrayofbools == null
+        ? null
         : fbBuilder.writeListBool(_testarrayofbools!);
-    final int? testarrayofstring2Offset = _testarrayofstring2 == null ? null
-        : fbBuilder.writeList(_testarrayofstring2!.map(fbBuilder.writeString).toList());
-    final int? testarrayofsortedstructOffset = _testarrayofsortedstruct == null ? null
+    final int? testarrayofstring2Offset = _testarrayofstring2 == null
+        ? null
+        : fbBuilder.writeList(
+            _testarrayofstring2!.map(fbBuilder.writeString).toList(),
+          );
+    final int? testarrayofsortedstructOffset = _testarrayofsortedstruct == null
+        ? null
         : fbBuilder.writeListOfStructs(_testarrayofsortedstruct!);
-    final int? flexOffset = _flex == null ? null
+    final int? flexOffset = _flex == null
+        ? null
         : fbBuilder.writeListUint8(_flex!);
-    final int? test5Offset = _test5 == null ? null
+    final int? test5Offset = _test5 == null
+        ? null
         : fbBuilder.writeListOfStructs(_test5!);
-    final int? vectorOfLongsOffset = _vectorOfLongs == null ? null
+    final int? vectorOfLongsOffset = _vectorOfLongs == null
+        ? null
         : fbBuilder.writeListInt64(_vectorOfLongs!);
-    final int? vectorOfDoublesOffset = _vectorOfDoubles == null ? null
+    final int? vectorOfDoublesOffset = _vectorOfDoubles == null
+        ? null
         : fbBuilder.writeListFloat64(_vectorOfDoubles!);
-    final int? parentNamespaceTestOffset = _parentNamespaceTest?.getOrCreateOffset(fbBuilder);
-    final int? vectorOfReferrablesOffset = _vectorOfReferrables == null ? null
-        : fbBuilder.writeList(_vectorOfReferrables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
-    final int? vectorOfWeakReferencesOffset = _vectorOfWeakReferences == null ? null
+    final int? parentNamespaceTestOffset = _parentNamespaceTest
+        ?.getOrCreateOffset(fbBuilder);
+    final int? vectorOfReferrablesOffset = _vectorOfReferrables == null
+        ? null
+        : fbBuilder.writeList(
+            _vectorOfReferrables!
+                .map((b) => b.getOrCreateOffset(fbBuilder))
+                .toList(),
+          );
+    final int? vectorOfWeakReferencesOffset = _vectorOfWeakReferences == null
+        ? null
         : fbBuilder.writeListUint64(_vectorOfWeakReferences!);
-    final int? vectorOfStrongReferrablesOffset = _vectorOfStrongReferrables == null ? null
-        : fbBuilder.writeList(_vectorOfStrongReferrables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
-    final int? vectorOfCoOwningReferencesOffset = _vectorOfCoOwningReferences == null ? null
+    final int? vectorOfStrongReferrablesOffset =
+        _vectorOfStrongReferrables == null
+        ? null
+        : fbBuilder.writeList(
+            _vectorOfStrongReferrables!
+                .map((b) => b.getOrCreateOffset(fbBuilder))
+                .toList(),
+          );
+    final int? vectorOfCoOwningReferencesOffset =
+        _vectorOfCoOwningReferences == null
+        ? null
         : fbBuilder.writeListUint64(_vectorOfCoOwningReferences!);
-    final int? vectorOfNonOwningReferencesOffset = _vectorOfNonOwningReferences == null ? null
+    final int? vectorOfNonOwningReferencesOffset =
+        _vectorOfNonOwningReferences == null
+        ? null
         : fbBuilder.writeListUint64(_vectorOfNonOwningReferences!);
     final int? anyUniqueOffset = _anyUnique?.getOrCreateOffset(fbBuilder);
     final int? anyAmbiguousOffset = _anyAmbiguous?.getOrCreateOffset(fbBuilder);
-    final int? vectorOfEnumsOffset = _vectorOfEnums == null ? null
-        : fbBuilder.writeListUint8(_vectorOfEnums!.map((f) => f.value).toList());
-    final int? testrequirednestedflatbufferOffset = _testrequirednestedflatbuffer == null ? null
+    final int? vectorOfEnumsOffset = _vectorOfEnums == null
+        ? null
+        : fbBuilder.writeListUint8(
+            _vectorOfEnums!.map((f) => f.value).toList(),
+          );
+    final int? testrequirednestedflatbufferOffset =
+        _testrequirednestedflatbuffer == null
+        ? null
         : fbBuilder.writeListUint8(_testrequirednestedflatbuffer!);
-    final int? scalarKeySortedTablesOffset = _scalarKeySortedTables == null ? null
-        : fbBuilder.writeList(_scalarKeySortedTables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
+    final int? scalarKeySortedTablesOffset = _scalarKeySortedTables == null
+        ? null
+        : fbBuilder.writeList(
+            _scalarKeySortedTables!
+                .map((b) => b.getOrCreateOffset(fbBuilder))
+                .toList(),
+          );
     fbBuilder.startTable(62);
     if (_pos != null) {
       fbBuilder.addStruct(0, _pos!.finish(fbBuilder));
@@ -2120,6 +2433,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class TypeAliases {
   TypeAliases._(this._bc, this._bcOffset);
   factory TypeAliases(List<int> bytes) {
@@ -2142,8 +2456,11 @@
   int get u64 => const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 18, 0);
   double get f32 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 20, 0.0);
   double get f64 => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 22, 0.0);
-  List<int>? get v8 => const fb.Int8ListReader().vTableGetNullable(_bc, _bcOffset, 24);
-  List<double>? get vf64 => const fb.ListReader<double>(fb.Float64Reader()).vTableGetNullable(_bc, _bcOffset, 26);
+  List<int>? get v8 =>
+      const fb.Int8ListReader().vTableGetNullable(_bc, _bcOffset, 24);
+  List<double>? get vf64 => const fb.ListReader<double>(
+    fb.Float64Reader(),
+  ).vTableGetNullable(_bc, _bcOffset, 26);
 
   @override
   String toString() {
@@ -2151,18 +2468,24 @@
   }
 
   TypeAliasesT unpack() => TypeAliasesT(
-      i8: i8,
-      u8: u8,
-      i16: i16,
-      u16: u16,
-      i32: i32,
-      u32: u32,
-      i64: i64,
-      u64: u64,
-      f32: f32,
-      f64: f64,
-      v8: const fb.Int8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 24),
-      vf64: const fb.ListReader<double>(fb.Float64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 26));
+    i8: i8,
+    u8: u8,
+    i16: i16,
+    u16: u16,
+    i32: i32,
+    u32: u32,
+    i64: i64,
+    u64: u64,
+    f32: f32,
+    f64: f64,
+    v8: const fb.Int8ListReader(
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 24),
+    vf64: const fb.ListReader<double>(
+      fb.Float64Reader(),
+      lazy: false,
+    ).vTableGetNullable(_bc, _bcOffset, 26),
+  );
 
   static int pack(fb.Builder fbBuilder, TypeAliasesT? object) {
     if (object == null) return 0;
@@ -2185,24 +2508,25 @@
   List<double>? vf64;
 
   TypeAliasesT({
-      this.i8 = 0,
-      this.u8 = 0,
-      this.i16 = 0,
-      this.u16 = 0,
-      this.i32 = 0,
-      this.u32 = 0,
-      this.i64 = 0,
-      this.u64 = 0,
-      this.f32 = 0.0,
-      this.f64 = 0.0,
-      this.v8,
-      this.vf64});
+    this.i8 = 0,
+    this.u8 = 0,
+    this.i16 = 0,
+    this.u16 = 0,
+    this.i32 = 0,
+    this.u32 = 0,
+    this.i64 = 0,
+    this.u64 = 0,
+    this.f32 = 0.0,
+    this.f64 = 0.0,
+    this.v8,
+    this.vf64,
+  });
 
   @override
   int pack(fb.Builder fbBuilder) {
-    final int? v8Offset = v8 == null ? null
-        : fbBuilder.writeListInt8(v8!);
-    final int? vf64Offset = vf64 == null ? null
+    final int? v8Offset = v8 == null ? null : fbBuilder.writeListInt8(v8!);
+    final int? vf64Offset = vf64 == null
+        ? null
         : fbBuilder.writeListFloat64(vf64!);
     fbBuilder.startTable(12);
     fbBuilder.addInt8(0, i8);
@@ -2230,8 +2554,8 @@
   const _TypeAliasesReader();
 
   @override
-  TypeAliases createObject(fb.BufferContext bc, int offset) => 
-    TypeAliases._(bc, offset);
+  TypeAliases createObject(fb.BufferContext bc, int offset) =>
+      TypeAliases._(bc, offset);
 }
 
 class TypeAliasesBuilder {
@@ -2247,46 +2571,57 @@
     fbBuilder.addInt8(0, i8);
     return fbBuilder.offset;
   }
+
   int addU8(int? u8) {
     fbBuilder.addUint8(1, u8);
     return fbBuilder.offset;
   }
+
   int addI16(int? i16) {
     fbBuilder.addInt16(2, i16);
     return fbBuilder.offset;
   }
+
   int addU16(int? u16) {
     fbBuilder.addUint16(3, u16);
     return fbBuilder.offset;
   }
+
   int addI32(int? i32) {
     fbBuilder.addInt32(4, i32);
     return fbBuilder.offset;
   }
+
   int addU32(int? u32) {
     fbBuilder.addUint32(5, u32);
     return fbBuilder.offset;
   }
+
   int addI64(int? i64) {
     fbBuilder.addInt64(6, i64);
     return fbBuilder.offset;
   }
+
   int addU64(int? u64) {
     fbBuilder.addUint64(7, u64);
     return fbBuilder.offset;
   }
+
   int addF32(double? f32) {
     fbBuilder.addFloat32(8, f32);
     return fbBuilder.offset;
   }
+
   int addF64(double? f64) {
     fbBuilder.addFloat64(9, f64);
     return fbBuilder.offset;
   }
+
   int addV8Offset(int? offset) {
     fbBuilder.addOffset(10, offset);
     return fbBuilder.offset;
   }
+
   int addVf64Offset(int? offset) {
     fbBuilder.addOffset(11, offset);
     return fbBuilder.offset;
@@ -2324,26 +2659,25 @@
     double? f64,
     List<int>? v8,
     List<double>? vf64,
-  })
-      : _i8 = i8,
-        _u8 = u8,
-        _i16 = i16,
-        _u16 = u16,
-        _i32 = i32,
-        _u32 = u32,
-        _i64 = i64,
-        _u64 = u64,
-        _f32 = f32,
-        _f64 = f64,
-        _v8 = v8,
-        _vf64 = vf64;
+  }) : _i8 = i8,
+       _u8 = u8,
+       _i16 = i16,
+       _u16 = u16,
+       _i32 = i32,
+       _u32 = u32,
+       _i64 = i64,
+       _u64 = u64,
+       _f32 = f32,
+       _f64 = f64,
+       _v8 = v8,
+       _vf64 = vf64;
 
   /// Finish building, and store into the [fbBuilder].
   @override
   int finish(fb.Builder fbBuilder) {
-    final int? v8Offset = _v8 == null ? null
-        : fbBuilder.writeListInt8(_v8!);
-    final int? vf64Offset = _vf64 == null ? null
+    final int? v8Offset = _v8 == null ? null : fbBuilder.writeListInt8(_v8!);
+    final int? vf64Offset = _vf64 == null
+        ? null
         : fbBuilder.writeListFloat64(_vf64!);
     fbBuilder.startTable(12);
     fbBuilder.addInt8(0, _i8);
diff --git a/dart/test/monster_test_my_game_generated.dart b/dart/test/monster_test_my_game_generated.dart
index 461d06d..7b856bf 100644
--- a/dart/test/monster_test_my_game_generated.dart
+++ b/dart/test/monster_test_my_game_generated.dart
@@ -4,12 +4,12 @@
 library my_game;
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
-import './monster_test_my_game.example_generated.dart' as my_game_example;
-import './monster_test_my_game.example2_generated.dart' as my_game_example2;
-
 import './include_test1_generated.dart';
+import './monster_test_my_game.example2_generated.dart' as my_game_example2;
+import './monster_test_my_game.example_generated.dart' as my_game_example;
 
 class InParentNamespace {
   InParentNamespace._(this._bc, this._bcOffset);
@@ -23,7 +23,6 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-
   @override
   String toString() {
     return 'InParentNamespace{}';
@@ -54,12 +53,11 @@
   const _InParentNamespaceReader();
 
   @override
-  InParentNamespace createObject(fb.BufferContext bc, int offset) => 
-    InParentNamespace._(bc, offset);
+  InParentNamespace createObject(fb.BufferContext bc, int offset) =>
+      InParentNamespace._(bc, offset);
 }
 
 class InParentNamespaceObjectBuilder extends fb.ObjectBuilder {
-
   InParentNamespaceObjectBuilder();
 
   /// Finish building, and store into the [fbBuilder].
diff --git a/examples/go-echo/client/client.go b/examples/go-echo/client/client.go
index be8fd7e..c6c1a39 100644
--- a/examples/go-echo/client/client.go
+++ b/examples/go-echo/client/client.go
@@ -28,12 +28,12 @@
 
 	res := net.GetRootAsResponse(body, 0)
 	player := res.Player(nil)
-	
+
 	fmt.Printf("Got response (name: %v, hp: %v)\n", string(player.Name()), player.Hp())
 }
 
 func main() {
-	body := RequestBody()	
+	body := RequestBody()
 	req, err := http.NewRequest("POST", "http://localhost:8080/echo", body)
 	if err != nil {
 		fmt.Println(err)
diff --git a/examples/go-echo/hero/Warrior.go b/examples/go-echo/hero/Warrior.go
index 0e9802c..a369043 100644
--- a/examples/go-echo/hero/Warrior.go
+++ b/examples/go-echo/hero/Warrior.go
@@ -8,7 +8,7 @@
 
 type WarriorT struct {
 	Name string `json:"name"`
-	Hp uint32 `json:"hp"`
+	Hp   uint32 `json:"hp"`
 }
 
 func (t *WarriorT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
diff --git a/go/builder.go b/go/builder.go
index 5d90e8e..b76e8f9 100644
--- a/go/builder.go
+++ b/go/builder.go
@@ -104,15 +104,18 @@
 // logically-equal vtables will be deduplicated.
 //
 // A vtable has the following format:
-//   <VOffsetT: size of the vtable in bytes, including this value>
-//   <VOffsetT: size of the object in bytes, including the vtable offset>
-//   <VOffsetT: offset for a field> * N, where N is the number of fields in
-//	        the schema for this type. Includes deprecated fields.
+//
+//	  <VOffsetT: size of the vtable in bytes, including this value>
+//	  <VOffsetT: size of the object in bytes, including the vtable offset>
+//	  <VOffsetT: offset for a field> * N, where N is the number of fields in
+//		        the schema for this type. Includes deprecated fields.
+//
 // Thus, a vtable is made of 2 + N elements, each SizeVOffsetT bytes wide.
 //
 // An object has the following format:
-//   <SOffsetT: offset to this object's vtable (may be negative)>
-//   <byte: data>+
+//
+//	<SOffsetT: offset to this object's vtable (may be negative)>
+//	<byte: data>+
 func (b *Builder) WriteVtable() (n UOffsetT) {
 	// Prepend a zero scalar to the object. Later in this function we'll
 	// write an offset here that points to the object's vtable:
@@ -296,8 +299,9 @@
 // StartVector initializes bookkeeping for writing a new vector.
 //
 // A vector has the following format:
-//   <UOffsetT: number of elements in this vector>
-//   <T: data>+, where T is the type of elements of this vector.
+//
+//	<UOffsetT: number of elements in this vector>
+//	<T: data>+, where T is the type of elements of this vector.
 func (b *Builder) StartVector(elemSize, numElems, alignment int) UOffsetT {
 	b.assertNotNested()
 	b.nested = true
diff --git a/goldens/cpp/generate.py b/goldens/cpp/generate.py
index cdc7e8c..c71dbc6 100644
--- a/goldens/cpp/generate.py
+++ b/goldens/cpp/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with C++ specifics
-    flatc_golden(options=["--cpp"] + options, schema=schema, prefix="cpp")
+  # Wrap the golden flatc generator with C++ specifics
+  flatc_golden(options=["--cpp"] + options, schema=schema, prefix="cpp")
 
 
 def GenerateCpp():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/csharp/generate.py b/goldens/csharp/generate.py
index 86a3a80..11f5b05 100644
--- a/goldens/csharp/generate.py
+++ b/goldens/csharp/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with C# specifics
-    flatc_golden(options=["--csharp"] + options, schema=schema, prefix="csharp")
+  # Wrap the golden flatc generator with C# specifics
+  flatc_golden(options=["--csharp"] + options, schema=schema, prefix="csharp")
 
 
 def GenerateCSharp():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/dart/generate.py b/goldens/dart/generate.py
index a92070c..4d667c0 100644
--- a/goldens/dart/generate.py
+++ b/goldens/dart/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Dart specifics
-    flatc_golden(options=["--dart"] + options, schema=schema, prefix="dart")
+  # Wrap the golden flatc generator with Dart specifics
+  flatc_golden(options=["--dart"] + options, schema=schema, prefix="dart")
 
 
 def GenerateDart():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/go/generate.py b/goldens/go/generate.py
index 358c42c..1f809aa 100644
--- a/goldens/go/generate.py
+++ b/goldens/go/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Go specifics
-    flatc_golden(options=["--go"] + options, schema=schema, prefix="go")
+  # Wrap the golden flatc generator with Go specifics
+  flatc_golden(options=["--go"] + options, schema=schema, prefix="go")
 
 
 def GenerateGo():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/golden_utils.py b/goldens/golden_utils.py
index d2aab13..576178e 100644
--- a/goldens/golden_utils.py
+++ b/goldens/golden_utils.py
@@ -1,5 +1,5 @@
-import sys
 from pathlib import Path
+import sys
 
 # Get the path where this script is located so we can invoke the script from
 # any directory and have the paths work correctly.
@@ -18,13 +18,13 @@
 
 
 def flatc_golden(options, schema, prefix):
-    # wrap the generic flatc call with specifis for these goldens.
-    flatc(
-        options=options,
-        # where the files are generated, typically the language (e.g. "cpp").
-        prefix=prefix,
-        # The schema are relative to the schema directory.
-        schema=str(Path(schema_path, schema)),
-        # Run flatc from this location.
-        cwd=script_path,
-    )
+  # wrap the generic flatc call with specifis for these goldens.
+  flatc(
+      options=options,
+      # where the files are generated, typically the language (e.g. "cpp").
+      prefix=prefix,
+      # The schema are relative to the schema directory.
+      schema=str(Path(schema_path, schema)),
+      # Run flatc from this location.
+      cwd=script_path,
+  )
diff --git a/goldens/java/generate.py b/goldens/java/generate.py
index cc1a8b2..369ceb0 100644
--- a/goldens/java/generate.py
+++ b/goldens/java/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Java specifics
-    flatc_golden(options=["--java"] + options, schema=schema, prefix="java")
+  # Wrap the golden flatc generator with Java specifics
+  flatc_golden(options=["--java"] + options, schema=schema, prefix="java")
 
 
 def GenerateJava():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/kotlin/generate.py b/goldens/kotlin/generate.py
index ac8b551..bab81ae 100644
--- a/goldens/kotlin/generate.py
+++ b/goldens/kotlin/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Kotlin specifics
-    flatc_golden(options=["--kotlin"] + options, schema=schema, prefix="kotlin")
+  # Wrap the golden flatc generator with Kotlin specifics
+  flatc_golden(options=["--kotlin"] + options, schema=schema, prefix="kotlin")
 
 
 def GenerateKotlin():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/lobster/generate.py b/goldens/lobster/generate.py
index cb75fda..bcd5150 100644
--- a/goldens/lobster/generate.py
+++ b/goldens/lobster/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Lobster specifics
-    flatc_golden(options=["--lobster"] + options, schema=schema, prefix="lobster")
+  # Wrap the golden flatc generator with Lobster specifics
+  flatc_golden(options=["--lobster"] + options, schema=schema, prefix="lobster")
 
 
 def GenerateLobster():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/lua/generate.py b/goldens/lua/generate.py
index d099118..108a4d5 100644
--- a/goldens/lua/generate.py
+++ b/goldens/lua/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Lua specifics
-    flatc_golden(options=["--lua"] + options, schema=schema, prefix="lua")
+  # Wrap the golden flatc generator with Lua specifics
+  flatc_golden(options=["--lua"] + options, schema=schema, prefix="lua")
 
 
 def GenerateLua():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/nim/generate.py b/goldens/nim/generate.py
index 16c0d3b..5aef75b 100644
--- a/goldens/nim/generate.py
+++ b/goldens/nim/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Nim specifics
-    flatc_golden(options=["--nim"] + options, schema=schema, prefix="nim")
+  # Wrap the golden flatc generator with Nim specifics
+  flatc_golden(options=["--nim"] + options, schema=schema, prefix="nim")
 
 
 def GenerateNim():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/php/generate.py b/goldens/php/generate.py
index 6e9144c..e167b7c 100644
--- a/goldens/php/generate.py
+++ b/goldens/php/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with PHP specifics
-    flatc_golden(options=["--php"] + options, schema=schema, prefix="php")
+  # Wrap the golden flatc generator with PHP specifics
+  flatc_golden(options=["--php"] + options, schema=schema, prefix="php")
 
 
 def GeneratePhp():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/py/generate.py b/goldens/py/generate.py
index ceff5d2..9ba58ea 100644
--- a/goldens/py/generate.py
+++ b/goldens/py/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Python specifics
-    flatc_golden(options=["--python"] + options, schema=schema, prefix="py")
+  # Wrap the golden flatc generator with Python specifics
+  flatc_golden(options=["--python"] + options, schema=schema, prefix="py")
 
 
 def GeneratePython():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/rust/generate.py b/goldens/rust/generate.py
index f3a568f..9d3d874 100644
--- a/goldens/rust/generate.py
+++ b/goldens/rust/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Rust specifics
-    flatc_golden(options=["--rust"] + options, schema=schema, prefix="rust")
+  # Wrap the golden flatc generator with Rust specifics
+  flatc_golden(options=["--rust"] + options, schema=schema, prefix="rust")
 
 
 def GenerateRust():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/swift/generate.py b/goldens/swift/generate.py
index ccdb97e..b16d83d 100644
--- a/goldens/swift/generate.py
+++ b/goldens/swift/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Swift specifics
-    flatc_golden(options=["--swift"] + options, schema=schema, prefix="swift")
+  # Wrap the golden flatc generator with Swift specifics
+  flatc_golden(options=["--swift"] + options, schema=schema, prefix="swift")
 
 
 def GenerateSwift():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/goldens/ts/basic.ts b/goldens/ts/basic.ts
index bf563a0..ee62cf2 100644
--- a/goldens/ts/basic.ts
+++ b/goldens/ts/basic.ts
@@ -2,5 +2,5 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { Galaxy } from './galaxy.js';
-export { Universe } from './universe.js';
+export {Galaxy} from './galaxy.js';
+export {Universe} from './universe.js';
diff --git a/goldens/ts/generate.py b/goldens/ts/generate.py
index ee072fd..6410638 100644
--- a/goldens/ts/generate.py
+++ b/goldens/ts/generate.py
@@ -2,9 +2,9 @@
 
 
 def flatc(options, schema):
-    # Wrap the golden flatc generator with Swift specifics
-    flatc_golden(options=["--ts"] + options, schema=schema, prefix="ts")
+  # Wrap the golden flatc generator with Swift specifics
+  flatc_golden(options=["--ts"] + options, schema=schema, prefix="ts")
 
 
 def GenerateTs():
-    flatc([], "basic.fbs")
+  flatc([], "basic.fbs")
diff --git a/grpc/examples/python/greeter/client.py b/grpc/examples/python/greeter/client.py
index d2d7184..a373c5a 100644
--- a/grpc/examples/python/greeter/client.py
+++ b/grpc/examples/python/greeter/client.py
@@ -1,40 +1,46 @@
-import sys		
 import argparse
+import sys
 import grpc
 
-sys.path.insert(0, '../../../../../flatbuffers/python')
+sys.path.insert(0, "../../../../../flatbuffers/python")
 
 import flatbuffers
 from models import HelloReply, HelloRequest, greeter_grpc_fb
 
 parser = argparse.ArgumentParser()
 parser.add_argument("port", help="server port to connect to", default=3000)
-parser.add_argument("name", help="name to be sent to server", default="flatbuffers")
+parser.add_argument(
+    "name", help="name to be sent to server", default="flatbuffers"
+)
+
 
 def say_hello(stub, hello_request):
-    reply = stub.SayHello(hello_request)
-    r = HelloReply.HelloReply.GetRootAs(reply)
-    print(r.Message())
+  reply = stub.SayHello(hello_request)
+  r = HelloReply.HelloReply.GetRootAs(reply)
+  print(r.Message())
+
 
 def say_many_hellos(stub, hello_request):
-    greetings = stub.SayManyHellos(hello_request)
-    for greeting in greetings:
-        r = HelloReply.HelloReply.GetRootAs(greeting)
-        print(r.Message())
+  greetings = stub.SayManyHellos(hello_request)
+  for greeting in greetings:
+    r = HelloReply.HelloReply.GetRootAs(greeting)
+    print(r.Message())
+
 
 def main():
-    args = parser.parse_args()
+  args = parser.parse_args()
 
-    with grpc.insecure_channel('localhost:' + args.port) as channel:
-        builder = flatbuffers.Builder()		
-        ind = builder.CreateString(args.name)
-        HelloRequest.HelloRequestStart(builder)
-        HelloRequest.HelloRequestAddName(builder, ind)
-        root = HelloRequest.HelloRequestEnd(builder)
-        builder.Finish(root)
-        output = bytes(builder.Output())
-        stub = greeter_grpc_fb.GreeterStub(channel)
-        say_hello(stub, output)
-        say_many_hellos(stub, output)
+  with grpc.insecure_channel("localhost:" + args.port) as channel:
+    builder = flatbuffers.Builder()
+    ind = builder.CreateString(args.name)
+    HelloRequest.HelloRequestStart(builder)
+    HelloRequest.HelloRequestAddName(builder, ind)
+    root = HelloRequest.HelloRequestEnd(builder)
+    builder.Finish(root)
+    output = bytes(builder.Output())
+    stub = greeter_grpc_fb.GreeterStub(channel)
+    say_hello(stub, output)
+    say_many_hellos(stub, output)
 
-main()
\ No newline at end of file
+
+main()
diff --git a/grpc/examples/python/greeter/greeter_grpc.fb.py b/grpc/examples/python/greeter/greeter_grpc.fb.py
index 7d1fec4..8c9f13a 100644
--- a/grpc/examples/python/greeter/greeter_grpc.fb.py
+++ b/grpc/examples/python/greeter/greeter_grpc.fb.py
@@ -2,30 +2,29 @@
 
 import flatbuffers
 import grpc
-
 from models.HelloReply import HelloReply
 from models.HelloRequest import HelloRequest
 
 
 class GreeterStub(object):
-  '''Interface exported by the server.'''
+  """Interface exported by the server."""
 
   def __init__(self, channel):
-    '''Constructor.
+    """Constructor.
 
     Args:
       channel: A grpc.Channel.
-    '''
+    """
 
-    self.SayHello = channel.unary_unary(
-      method='/models.Greeter/SayHello')
+    self.SayHello = channel.unary_unary(method='/models.Greeter/SayHello')
 
     self.SayManyHellos = channel.unary_stream(
-      method='/models.Greeter/SayManyHellos')
+        method='/models.Greeter/SayManyHellos'
+    )
 
 
 class GreeterServicer(object):
-  '''Interface exported by the server.'''
+  """Interface exported by the server."""
 
   def SayHello(self, request, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -40,15 +39,14 @@
 
 def add_GreeterServicer_to_server(servicer, server):
   rpc_method_handlers = {
-    'SayHello': grpc.unary_unary_rpc_method_handler(
-      servicer.SayHello),
-    'SayManyHellos': grpc.unary_stream_rpc_method_handler(
-      servicer.SayManyHellos),
+      'SayHello': grpc.unary_unary_rpc_method_handler(servicer.SayHello),
+      'SayManyHellos': grpc.unary_stream_rpc_method_handler(
+          servicer.SayManyHellos
+      ),
   }
 
   generic_handler = grpc.method_handlers_generic_handler(
-    'models.Greeter', rpc_method_handlers)
+      'models.Greeter', rpc_method_handlers
+  )
 
   server.add_generic_rpc_handlers((generic_handler,))
-
-
diff --git a/grpc/examples/python/greeter/server.py b/grpc/examples/python/greeter/server.py
index acca880..55b0789 100644
--- a/grpc/examples/python/greeter/server.py
+++ b/grpc/examples/python/greeter/server.py
@@ -1,9 +1,9 @@
-from concurrent import futures
-import sys		
 import argparse
+from concurrent import futures
+import sys
 import grpc
 
-sys.path.insert(0, '../../../../../flatbuffers/python')
+sys.path.insert(0, "../../../../../flatbuffers/python")
 
 import flatbuffers
 from models import HelloReply, HelloRequest, greeter_grpc_fb
@@ -11,47 +11,48 @@
 parser = argparse.ArgumentParser()
 parser.add_argument("port", help="server on port", default=3000)
 
+
 def build_reply(message):
-    builder = flatbuffers.Builder()		
-    ind = builder.CreateString(message)
-    HelloReply.HelloReplyStart(builder)
-    HelloReply.HelloReplyAddMessage(builder, ind)
-    root = HelloReply.HelloReplyEnd(builder)
-    builder.Finish(root)
-    return bytes(builder.Output())
+  builder = flatbuffers.Builder()
+  ind = builder.CreateString(message)
+  HelloReply.HelloReplyStart(builder)
+  HelloReply.HelloReplyAddMessage(builder, ind)
+  root = HelloReply.HelloReplyEnd(builder)
+  builder.Finish(root)
+  return bytes(builder.Output())
+
 
 class GreeterServicer(greeter_grpc_fb.GreeterServicer):
 
-    def __init__(self):
-        self.greetings = ["Hi", "Hallo", "Ciao"]
+  def __init__(self):
+    self.greetings = ["Hi", "Hallo", "Ciao"]
 
-    def SayHello(self, request, context):
-        r = HelloRequest.HelloRequest().GetRootAs(request, 0)
-        reply = "Unknown"
-        if r.Name():
-            reply = r.Name()
-        return build_reply("welcome " + reply.decode('UTF-8'))
+  def SayHello(self, request, context):
+    r = HelloRequest.HelloRequest().GetRootAs(request, 0)
+    reply = "Unknown"
+    if r.Name():
+      reply = r.Name()
+    return build_reply("welcome " + reply.decode("UTF-8"))
 
-    def SayManyHellos(self, request, context):
-        r = HelloRequest.HelloRequest().GetRootAs(request, 0)
-        reply = "Unknown"
-        if r.Name():
-            reply = r.Name()
+  def SayManyHellos(self, request, context):
+    r = HelloRequest.HelloRequest().GetRootAs(request, 0)
+    reply = "Unknown"
+    if r.Name():
+      reply = r.Name()
 
-        for greeting in self.greetings:
-            print(type(reply))
-            yield build_reply(greeting + " " + reply.decode('UTF-8'))
-        
+    for greeting in self.greetings:
+      print(type(reply))
+      yield build_reply(greeting + " " + reply.decode("UTF-8"))
+
 
 def serve():
-    args = parser.parse_args()
-    server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
-    greeter_grpc_fb.add_GreeterServicer_to_server(
-        GreeterServicer(), server
-    )
-    server.add_insecure_port('[::]:' + args.port)
-    server.start()
-    server.wait_for_termination()
+  args = parser.parse_args()
+  server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+  greeter_grpc_fb.add_GreeterServicer_to_server(GreeterServicer(), server)
+  server.add_insecure_port("[::]:" + args.port)
+  server.start()
+  server.wait_for_termination()
 
-if __name__ == '__main__':
-    serve()
\ No newline at end of file
+
+if __name__ == "__main__":
+  serve()
diff --git a/grpc/examples/swift/Greeter/Sources/client/main.swift b/grpc/examples/swift/Greeter/Sources/client/main.swift
index e7065ac..61c809a 100644
--- a/grpc/examples/swift/Greeter/Sources/client/main.swift
+++ b/grpc/examples/swift/Greeter/Sources/client/main.swift
@@ -37,7 +37,8 @@
   builder.finish(offset: root)
 
   // Make the RPC call to the server.
-  let sayHello = greeter
+  let sayHello =
+    greeter
     .SayHello(Message<models_HelloRequest>(builder: &builder))
 
   // wait() on the response to stop the program from exiting before the response is received.
@@ -76,7 +77,7 @@
     print("Usage: PORT [NAME]")
     exit(1)
 
-  case let (.some(port), name):
+  case (.some(let port), let name):
     // Setup an `EventLoopGroup` for the connection to run on.
     //
     // See: https://github.com/apple/swift-nio#eventloops-and-eventloopgroups
diff --git a/grpc/examples/swift/Greeter/Sources/server/main.swift b/grpc/examples/swift/Greeter/Sources/server/main.swift
index 60deb54..5eedd95 100644
--- a/grpc/examples/swift/Greeter/Sources/server/main.swift
+++ b/grpc/examples/swift/Greeter/Sources/server/main.swift
@@ -32,7 +32,8 @@
 
   func SayHello(
     request: Message<models_HelloRequest>,
-    context: StatusOnlyCallContext)
+    context: StatusOnlyCallContext
+  )
     -> EventLoopFuture<Message<models_HelloReply>>
   {
     let recipient = request.object.name ?? "Stranger"
@@ -47,12 +48,14 @@
 
   func SayManyHellos(
     request: Message<models_HelloRequest>,
-    context: StreamingResponseCallContext<Message<models_HelloReply>>)
+    context: StreamingResponseCallContext<Message<models_HelloReply>>
+  )
     -> EventLoopFuture<GRPCStatus>
   {
     for name in greetings {
       var builder = FlatBufferBuilder()
-      let off = builder
+      let off =
+        builder
         .create(string: "\(name) \(request.object.name ?? "Unknown")")
       let root = models_HelloReply.createHelloReply(
         &builder,
diff --git a/grpc/examples/ts/greeter/src/client.ts b/grpc/examples/ts/greeter/src/client.ts
index 62444f1..c1bc5bc 100644
--- a/grpc/examples/ts/greeter/src/client.ts
+++ b/grpc/examples/ts/greeter/src/client.ts
@@ -1,34 +1,39 @@
 import * as grpc from '@grpc/grpc-js';
 import * as flatbuffers from 'flatbuffers';
-import { HelloReply } from './models/hello-reply';
-import { HelloRequest } from './models/hello-request';
-import { GreeterClient } from './greeter_grpc';
+import {GreeterClient} from './greeter_grpc';
+import {HelloReply} from './models/hello-reply';
+import {HelloRequest} from './models/hello-request';
 
 async function main(PORT: Number, name: string) {
-    const client = new GreeterClient(`localhost:${PORT}`, grpc.credentials.createInsecure());
-    const builder = new flatbuffers.Builder();
-    const offset = builder.createString(name);
-    const root = HelloRequest.createHelloRequest(builder, offset);
-    builder.finish(root);
-    const buffer = HelloRequest.getRootAsHelloRequest(new flatbuffers.ByteBuffer(builder.asUint8Array()));
+  const client = new GreeterClient(
+    `localhost:${PORT}`,
+    grpc.credentials.createInsecure(),
+  );
+  const builder = new flatbuffers.Builder();
+  const offset = builder.createString(name);
+  const root = HelloRequest.createHelloRequest(builder, offset);
+  builder.finish(root);
+  const buffer = HelloRequest.getRootAsHelloRequest(
+    new flatbuffers.ByteBuffer(builder.asUint8Array()),
+  );
 
-    client.SayHello(buffer, (err, response) => {
-        console.log(response.message());
-    });
+  client.SayHello(buffer, (err, response) => {
+    console.log(response.message());
+  });
 
-    const data = client.SayManyHellos(buffer, null);
+  const data = client.SayManyHellos(buffer, null);
 
-    data.on('data', (data) => {
-        console.log(data.message());
-    });
+  data.on('data', (data) => {
+    console.log(data.message());
+  });
 }
 
-const args = process.argv.slice(2)
+const args = process.argv.slice(2);
 const PORT = Number(args[0]);
-const name: string = args[1] ?? "flatbuffers";
+const name: string = args[1] ?? 'flatbuffers';
 
 if (PORT) {
-    main(PORT, name);
+  main(PORT, name);
 } else {
-    throw new Error("Requires a valid port number.")
-}
\ No newline at end of file
+  throw new Error('Requires a valid port number.');
+}
diff --git a/grpc/examples/ts/greeter/src/greeter_generated.ts b/grpc/examples/ts/greeter/src/greeter_generated.ts
index c48afe5..1d54f71 100644
--- a/grpc/examples/ts/greeter/src/greeter_generated.ts
+++ b/grpc/examples/ts/greeter/src/greeter_generated.ts
@@ -1,4 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-export { HelloReply } from './models/hello-reply.js';
-export { HelloRequest } from './models/hello-request.js';
+export {HelloReply} from './models/hello-reply.js';
+export {HelloRequest} from './models/hello-request.js';
diff --git a/grpc/examples/ts/greeter/src/server.ts b/grpc/examples/ts/greeter/src/server.ts
index a3f2eee..b4b360e 100644
--- a/grpc/examples/ts/greeter/src/server.ts
+++ b/grpc/examples/ts/greeter/src/server.ts
@@ -1,49 +1,63 @@
 import * as grpc from '@grpc/grpc-js';
 import * as flatbuffers from 'flatbuffers';
-import { HelloReply } from './models/hello-reply';
-import { HelloRequest } from './models/hello-request';
-import { IGreeterServer, GreeterService } from './greeter_grpc';
+import {GreeterService, IGreeterServer} from './greeter_grpc';
+import {HelloReply} from './models/hello-reply';
+import {HelloRequest} from './models/hello-request';
 
 const greeter: IGreeterServer = {
-    SayHello(call: grpc.ServerUnaryCall<HelloRequest, HelloReply>, callback: grpc.sendUnaryData<HelloReply>): void {
-        console.log(`SayHello ${call.request.name()}`);
-        const builder = new flatbuffers.Builder();
-        const offset = builder.createString(`welcome ${call.request.name()}`);
-        const root = HelloReply.createHelloReply(builder, offset);
-        builder.finish(root);
-        callback(null, HelloReply.getRootAsHelloReply(new flatbuffers.ByteBuffer(builder.asUint8Array())));
-    },
-    async SayManyHellos(call: grpc.ServerWritableStream<HelloRequest, HelloReply>): Promise<void> {
-        const name = call.request.name();
-        console.log(`${call.request.name()} saying hi in different langagues`);
-        ['Hi', 'Hallo', 'Ciao'].forEach(element => {
-            const builder = new flatbuffers.Builder();
-            const offset = builder.createString(`${element} ${name}`);
-            const root = HelloReply.createHelloReply(builder, offset);
-            builder.finish(root);
-            call.write(HelloReply.getRootAsHelloReply(new flatbuffers.ByteBuffer(builder.asUint8Array())))
-        });
-        call.end();
-    }
-}
+  SayHello(
+    call: grpc.ServerUnaryCall<HelloRequest, HelloReply>,
+    callback: grpc.sendUnaryData<HelloReply>,
+  ): void {
+    console.log(`SayHello ${call.request.name()}`);
+    const builder = new flatbuffers.Builder();
+    const offset = builder.createString(`welcome ${call.request.name()}`);
+    const root = HelloReply.createHelloReply(builder, offset);
+    builder.finish(root);
+    callback(
+      null,
+      HelloReply.getRootAsHelloReply(
+        new flatbuffers.ByteBuffer(builder.asUint8Array()),
+      ),
+    );
+  },
+  async SayManyHellos(
+    call: grpc.ServerWritableStream<HelloRequest, HelloReply>,
+  ): Promise<void> {
+    const name = call.request.name();
+    console.log(`${call.request.name()} saying hi in different langagues`);
+    ['Hi', 'Hallo', 'Ciao'].forEach((element) => {
+      const builder = new flatbuffers.Builder();
+      const offset = builder.createString(`${element} ${name}`);
+      const root = HelloReply.createHelloReply(builder, offset);
+      builder.finish(root);
+      call.write(
+        HelloReply.getRootAsHelloReply(
+          new flatbuffers.ByteBuffer(builder.asUint8Array()),
+        ),
+      );
+    });
+    call.end();
+  },
+};
 
 function serve(): void {
-    const PORT = 3000;
-    const server = new grpc.Server();
-    server.addService(GreeterService, greeter);
-    console.log(`Listening on ${PORT}`);
-    server.bindAsync(
-        `localhost:${PORT}`,
-        grpc.ServerCredentials.createInsecure(),
-        (err: Error | null, port: number) => {
-          if (err) {
-            console.error(`Server error: ${err.message}`);
-          } else {
-            console.log(`Server bound on port: ${port}`);
-            server.start();
-          }
-        }
-      );
+  const PORT = 3000;
+  const server = new grpc.Server();
+  server.addService(GreeterService, greeter);
+  console.log(`Listening on ${PORT}`);
+  server.bindAsync(
+    `localhost:${PORT}`,
+    grpc.ServerCredentials.createInsecure(),
+    (err: Error | null, port: number) => {
+      if (err) {
+        console.error(`Server error: ${err.message}`);
+      } else {
+        console.log(`Server bound on port: ${port}`);
+        server.start();
+      }
+    },
+  );
 }
 
-serve();
\ No newline at end of file
+serve();
diff --git a/grpc/flatbuffers-java-grpc/src/main/java/com/google/flatbuffers/grpc/FlatbuffersUtils.java b/grpc/flatbuffers-java-grpc/src/main/java/com/google/flatbuffers/grpc/FlatbuffersUtils.java
index 768708b..bd2b91a 100644
--- a/grpc/flatbuffers-java-grpc/src/main/java/com/google/flatbuffers/grpc/FlatbuffersUtils.java
+++ b/grpc/flatbuffers-java-grpc/src/main/java/com/google/flatbuffers/grpc/FlatbuffersUtils.java
@@ -19,99 +19,99 @@
 import io.grpc.Drainable;
 import io.grpc.KnownLength;
 import io.grpc.MethodDescriptor;
-
-import javax.annotation.Nullable;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
+import javax.annotation.Nullable;
 
 public class FlatbuffersUtils {
-    abstract public static class FBExtactor  <T extends Table> {
-        T extract (InputStream stream) throws IOException {
-            if (stream instanceof KnownLength) {
-                int size = stream.available();
-                ByteBuffer buffer = ByteBuffer.allocate(size);
-                stream.read(buffer.array());
-                return extract(buffer);
-            } else
-                throw new RuntimeException("The class " + stream.getClass().getCanonicalName() + " does not extend from KnownLength ");
-        }
-
-        public abstract T extract(ByteBuffer buffer);
-
+  public abstract static class FBExtactor<T extends Table> {
+    T extract(InputStream stream) throws IOException {
+      if (stream instanceof KnownLength) {
+        int size = stream.available();
+        ByteBuffer buffer = ByteBuffer.allocate(size);
+        stream.read(buffer.array());
+        return extract(buffer);
+      } else
+        throw new RuntimeException(
+            "The class "
+                + stream.getClass().getCanonicalName()
+                + " does not extend from KnownLength ");
     }
 
-    static class FBInputStream extends InputStream implements Drainable, KnownLength {
-        private final ByteBuffer buffer;
-        private final int size;
-        @Nullable private ByteArrayInputStream inputStream;
+    public abstract T extract(ByteBuffer buffer);
+  }
 
-        FBInputStream(ByteBuffer buffer) {
-            this.buffer = buffer;
-            this.size = buffer.remaining();
-        }
+  static class FBInputStream extends InputStream implements Drainable, KnownLength {
+    private final ByteBuffer buffer;
+    private final int size;
+    @Nullable private ByteArrayInputStream inputStream;
 
-        private void makeStreamIfNotAlready() {
-            if (inputStream == null)
-                inputStream = new ByteArrayInputStream(buffer.array(), buffer.position(), size);
-        }
-
-        @Override
-        public int drainTo(OutputStream target) throws IOException {
-            target.write(buffer.array(), buffer.position(), size);
-            return size;
-        }
-
-        @Override
-        public int read() throws IOException {
-            makeStreamIfNotAlready();
-            return inputStream.read();
-        }
-
-        @Override
-        public int read(byte[] b, int off, int len) throws IOException {
-            makeStreamIfNotAlready();
-            if (inputStream == null) {
-                if (len >= size) {
-                    System.arraycopy(buffer.array(), buffer.position(), b, off, size);
-                    return size;
-                } else {
-                    makeStreamIfNotAlready();
-                    return inputStream.read(b, off, len);
-                }
-            } else
-                return inputStream.read(b, off, len);
-        }
-
-        @Override
-        public int available() throws IOException {
-            return inputStream == null ? size : inputStream.available();
-        }
-
+    FBInputStream(ByteBuffer buffer) {
+      this.buffer = buffer;
+      this.size = buffer.remaining();
     }
 
-    public static <T extends Table> MethodDescriptor.Marshaller<T> marshaller(final Class<T> clazz, final FBExtactor<T> extractor) {
-        return new MethodDescriptor.ReflectableMarshaller<T>() {
-            @Override
-            public Class<T> getMessageClass() {
-                return clazz;
-            }
-
-            @Override
-            public InputStream stream(T value) {
-                return new FBInputStream (value.getByteBuffer());
-            }
-
-            @Override
-            public T parse(InputStream stream) {
-                try {
-                    return extractor.extract(stream);
-                } catch (IOException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-        };
+    private void makeStreamIfNotAlready() {
+      if (inputStream == null)
+        inputStream = new ByteArrayInputStream(buffer.array(), buffer.position(), size);
     }
+
+    @Override
+    public int drainTo(OutputStream target) throws IOException {
+      target.write(buffer.array(), buffer.position(), size);
+      return size;
+    }
+
+    @Override
+    public int read() throws IOException {
+      makeStreamIfNotAlready();
+      return inputStream.read();
+    }
+
+    @Override
+    public int read(byte[] b, int off, int len) throws IOException {
+      makeStreamIfNotAlready();
+      if (inputStream == null) {
+        if (len >= size) {
+          System.arraycopy(buffer.array(), buffer.position(), b, off, size);
+          return size;
+        } else {
+          makeStreamIfNotAlready();
+          return inputStream.read(b, off, len);
+        }
+      } else return inputStream.read(b, off, len);
+    }
+
+    @Override
+    public int available() throws IOException {
+      return inputStream == null ? size : inputStream.available();
+    }
+  }
+
+  public static <T extends Table> MethodDescriptor.Marshaller<T> marshaller(
+      final Class<T> clazz, final FBExtactor<T> extractor) {
+    return new MethodDescriptor.ReflectableMarshaller<T>() {
+      @Override
+      public Class<T> getMessageClass() {
+        return clazz;
+      }
+
+      @Override
+      public InputStream stream(T value) {
+        return new FBInputStream(value.getByteBuffer());
+      }
+
+      @Override
+      public T parse(InputStream stream) {
+        try {
+          return extractor.extract(stream);
+        } catch (IOException e) {
+          throw new RuntimeException(e);
+        }
+      }
+    };
+  }
 }
diff --git a/grpc/src/compiler/cpp_generator.cc b/grpc/src/compiler/cpp_generator.cc
index 9736282..58cef4f 100644
--- a/grpc/src/compiler/cpp_generator.cc
+++ b/grpc/src/compiler/cpp_generator.cc
@@ -8,21 +8,22 @@
 namespace grpc_cpp_generator {
 namespace {
 
-template<class T> static grpc::string as_string(T x) {
+template <class T>
+static grpc::string as_string(T x) {
   std::ostringstream out;
   out << x;
   return out.str();
 }
 
-static inline bool ClientOnlyStreaming(const grpc_generator::Method *method) {
+static inline bool ClientOnlyStreaming(const grpc_generator::Method* method) {
   return method->ClientStreaming() && !method->ServerStreaming();
 }
 
-static inline bool ServerOnlyStreaming(const grpc_generator::Method *method) {
+static inline bool ServerOnlyStreaming(const grpc_generator::Method* method) {
   return !method->ClientStreaming() && method->ServerStreaming();
 }
 
-static grpc::string FilenameIdentifier(const grpc::string &filename) {
+static grpc::string FilenameIdentifier(const grpc::string& filename) {
   grpc::string result;
   for (unsigned i = 0; i < filename.size(); i++) {
     char c = filename[i];
@@ -38,22 +39,25 @@
   return result;
 }
 
-template<class T, size_t N> static T *array_end(T (&array)[N]) {
+template <class T, size_t N>
+static T* array_end(T (&array)[N]) {
   return array + N;
 }
 
-static void PrintIncludes(grpc_generator::Printer *printer,
-                          const std::vector<grpc::string> &headers,
-                          const Parameters &params) {
+static void PrintIncludes(grpc_generator::Printer* printer,
+                          const std::vector<grpc::string>& headers,
+                          const Parameters& params) {
   std::map<grpc::string, grpc::string> vars;
 
   vars["l"] = params.use_system_headers ? '<' : '"';
   vars["r"] = params.use_system_headers ? '>' : '"';
 
-  auto &s = params.grpc_search_path;
+  auto& s = params.grpc_search_path;
   if (!s.empty()) {
     vars["l"] += s;
-    if (s[s.size() - 1] != '/') { vars["l"] += '/'; }
+    if (s[s.size() - 1] != '/') {
+      vars["l"] += '/';
+    }
   }
 
   for (auto i = headers.begin(); i != headers.end(); i++) {
@@ -62,12 +66,11 @@
   }
   if (params.generate_callback_api) {
     // Callback API headers (guarded later by feature macro in emitted code).
-    static const char *cb_headers[] = {
-      "grpcpp/impl/codegen/callback_common.h",
-      "grpcpp/impl/codegen/server_callback_handlers.h",
-      "grpcpp/support/client_callback.h"
-    };
-    for (auto &h : cb_headers) {
+    static const char* cb_headers[] = {
+        "grpcpp/impl/codegen/callback_common.h",
+        "grpcpp/impl/codegen/server_callback_handlers.h",
+        "grpcpp/support/client_callback.h"};
+    for (auto& h : cb_headers) {
       vars["h"] = h;
       printer->Print(vars, "#include $l$$h$$r$\n");
     }
@@ -76,8 +79,8 @@
 
 }  // namespace
 
-grpc::string GetHeaderPrologue(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetHeaderPrologue(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -108,25 +111,24 @@
   return output;
 }
 
-grpc::string GetHeaderIncludes(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetHeaderIncludes(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
     auto printer = file->CreatePrinter(&output);
     std::map<grpc::string, grpc::string> vars;
 
-    static const char *headers_strs[] = {
-      "grpcpp/impl/codegen/async_stream.h",
-      "grpcpp/impl/codegen/async_unary_call.h",
-      "grpcpp/impl/codegen/method_handler.h",
-      "grpcpp/impl/codegen/proto_utils.h",
-      "grpcpp/impl/codegen/rpc_method.h",
-      "grpcpp/impl/codegen/service_type.h",
-      "grpcpp/impl/codegen/status.h",
-      "grpcpp/impl/codegen/stub_options.h",
-      "grpcpp/impl/codegen/sync_stream.h"
-    };
+    static const char* headers_strs[] = {
+        "grpcpp/impl/codegen/async_stream.h",
+        "grpcpp/impl/codegen/async_unary_call.h",
+        "grpcpp/impl/codegen/method_handler.h",
+        "grpcpp/impl/codegen/proto_utils.h",
+        "grpcpp/impl/codegen/rpc_method.h",
+        "grpcpp/impl/codegen/service_type.h",
+        "grpcpp/impl/codegen/status.h",
+        "grpcpp/impl/codegen/stub_options.h",
+        "grpcpp/impl/codegen/sync_stream.h"};
     std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
     PrintIncludes(printer.get(), headers, params);
     printer->Print(vars, "\n");
@@ -153,8 +155,8 @@
 namespace {
 
 static void PrintHeaderClientMethodInterfaces(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars, bool is_public) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars, bool is_public) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -163,8 +165,8 @@
     grpc::string prefix;
     grpc::string method_params;  // extra arguments to method
     grpc::string raw_args;       // extra arguments to raw version of method
-  } async_prefixes[] = { { "Async", ", void* tag", ", tag" },
-                         { "PrepareAsync", "", "" } };
+  } async_prefixes[] = {{"Async", ", void* tag", ", tag"},
+                        {"PrepareAsync", "", ""}};
 
   if (is_public) {
     if (method->NoStreaming()) {
@@ -174,7 +176,7 @@
           "const $Request$& request, $Response$* response) = 0;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         printer->Print(
             *vars,
@@ -207,7 +209,7 @@
       printer->Print("}\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -242,7 +244,7 @@
       printer->Print("}\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -276,7 +278,7 @@
       printer->Print("}\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -300,7 +302,7 @@
     if (method->NoStreaming()) {
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         printer->Print(
             *vars,
@@ -317,7 +319,7 @@
           "::grpc::ClientContext* context, $Response$* response) = 0;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         printer->Print(
@@ -335,7 +337,7 @@
           "::grpc::ClientContext* context, const $Request$& request) = 0;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         printer->Print(
@@ -352,7 +354,7 @@
                      "$Method$Raw(::grpc::ClientContext* context) = 0;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         printer->Print(
@@ -366,9 +368,9 @@
   }
 }
 
-static void PrintHeaderClientMethod(grpc_generator::Printer *printer,
-                                    const grpc_generator::Method *method,
-                                    std::map<grpc::string, grpc::string> *vars,
+static void PrintHeaderClientMethod(grpc_generator::Printer* printer,
+                                    const grpc_generator::Method* method,
+                                    std::map<grpc::string, grpc::string>* vars,
                                     bool is_public) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
@@ -377,8 +379,8 @@
     grpc::string prefix;
     grpc::string method_params;  // extra arguments to method
     grpc::string raw_args;       // extra arguments to raw version of method
-  } async_prefixes[] = { { "Async", ", void* tag", ", tag" },
-                         { "PrepareAsync", "", "" } };
+  } async_prefixes[] = {{"Async", ", void* tag", ", tag"},
+                        {"PrepareAsync", "", ""}};
 
   if (is_public) {
     if (method->NoStreaming()) {
@@ -404,7 +406,7 @@
       }
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         printer->Print(
             *vars,
@@ -432,15 +434,16 @@
                      "($Method$Raw(context, response));\n");
       printer->Outdent();
       printer->Print("}\n");
-  if ((*vars)["generate_callback_api"] == "1") {
-    printer->Print(*vars, "// Client streaming callback reactor entry.\n");
-    printer->Print(
-    *vars,
-    "void async_$Method$(::grpc::ClientContext* context, $Response$* response, ::grpc::ClientWriteReactor< $Request$ >* reactor);\n");
-  }
+      if ((*vars)["generate_callback_api"] == "1") {
+        printer->Print(*vars, "// Client streaming callback reactor entry.\n");
+        printer->Print(
+            *vars,
+            "void async_$Method$(::grpc::ClientContext* context, $Response$* "
+            "response, ::grpc::ClientWriteReactor< $Request$ >* reactor);\n");
+      }
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -474,11 +477,13 @@
       if ((*vars)["generate_callback_api"] == "1") {
         printer->Print(*vars, "// Server streaming callback reactor entry.\n");
         printer->Print(*vars,
-                       "void async_$Method$(::grpc::ClientContext* context, const $Request$& request, ::grpc::ClientReadReactor< $Response$ >* reactor);\n");
+                       "void async_$Method$(::grpc::ClientContext* context, "
+                       "const $Request$& request, ::grpc::ClientReadReactor< "
+                       "$Response$ >* reactor);\n");
       }
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -508,15 +513,17 @@
                      "$Method$Raw(context));\n");
       printer->Outdent();
       printer->Print("}\n");
-  if ((*vars)["generate_callback_api"] == "1") {
-    printer->Print(*vars, "// Bidirectional streaming callback reactor entry.\n");
-    printer->Print(
-    *vars,
-    "void async_$Method$(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< $Request$, $Response$ >* reactor);\n");
-  }
+      if ((*vars)["generate_callback_api"] == "1") {
+        printer->Print(*vars,
+                       "// Bidirectional streaming callback reactor entry.\n");
+        printer->Print(
+            *vars,
+            "void async_$Method$(::grpc::ClientContext* context, "
+            "::grpc::ClientBidiReactor< $Request$, $Response$ >* reactor);\n");
+      }
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -539,7 +546,7 @@
     if (method->NoStreaming()) {
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         printer->Print(
             *vars,
@@ -559,7 +566,7 @@
                      "override;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -576,7 +583,7 @@
                      " override;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -592,7 +599,7 @@
                      "$Method$Raw(::grpc::ClientContext* context) override;\n");
       for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
            i++) {
-        auto &async_prefix = async_prefixes[i];
+        auto& async_prefix = async_prefixes[i];
         (*vars)["AsyncPrefix"] = async_prefix.prefix;
         (*vars)["AsyncMethodParams"] = async_prefix.method_params;
         (*vars)["AsyncRawArgs"] = async_prefix.raw_args;
@@ -607,16 +614,16 @@
 }
 
 static void PrintHeaderClientMethodData(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   printer->Print(*vars,
                  "const ::grpc::internal::RpcMethod rpcmethod_$Method$_;\n");
 }
 
 static void PrintHeaderServerMethodSync(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -649,8 +656,8 @@
 }
 
 static void PrintHeaderServerMethodAsync(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -765,8 +772,8 @@
 }
 
 static void PrintHeaderServerMethodStreamedUnary(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -816,8 +823,8 @@
 }
 
 static void PrintHeaderServerMethodSplitStreaming(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -869,8 +876,8 @@
 }
 
 static void PrintHeaderServerMethodGeneric(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -939,9 +946,9 @@
   printer->Print(*vars, "};\n");
 }
 
-static void PrintHeaderService(grpc_generator::Printer *printer,
-                               const grpc_generator::Service *service,
-                               std::map<grpc::string, grpc::string> *vars) {
+static void PrintHeaderService(grpc_generator::Printer* printer,
+                               const grpc_generator::Service* service,
+                               std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Service"] = service->name();
 
   printer->Print(service->GetLeadingComments("//").c_str());
@@ -1036,7 +1043,9 @@
     printer->Print(*vars, "WithAsyncMethod_$method_name$<");
   }
   printer->Print("Service");
-  for (int i = 0; i < service->method_count(); ++i) { printer->Print(" >"); }
+  for (int i = 0; i < service->method_count(); ++i) {
+    printer->Print(" >");
+  }
   printer->Print(" AsyncService;\n");
 
   // Server side - Generic
@@ -1061,7 +1070,9 @@
   }
   printer->Print("Service");
   for (int i = 0; i < service->method_count(); ++i) {
-    if (service->method(i)->NoStreaming()) { printer->Print(" >"); }
+    if (service->method(i)->NoStreaming()) {
+      printer->Print(" >");
+    }
   }
   printer->Print(" StreamedUnaryService;\n");
 
@@ -1083,7 +1094,9 @@
   printer->Print("Service");
   for (int i = 0; i < service->method_count(); ++i) {
     auto method = service->method(i);
-    if (ServerOnlyStreaming(method.get())) { printer->Print(" >"); }
+    if (ServerOnlyStreaming(method.get())) {
+      printer->Print(" >");
+    }
   }
   printer->Print(" SplitStreamedService;\n");
 
@@ -1117,10 +1130,10 @@
   if ((*vars)["generate_callback_api"] == "1") {
     (*vars)["Service"] = service->name();
     printer->Print("\n#if defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)\n");
-  printer->Print(*vars,
-           "class $Service$::CallbackService : public ::grpc::Service "
-           "{\n public:\n  CallbackService();\n  virtual "
-           "~CallbackService();\n");
+    printer->Print(*vars,
+                   "class $Service$::CallbackService : public ::grpc::Service "
+                   "{\n public:\n  CallbackService();\n  virtual "
+                   "~CallbackService();\n");
     printer->Indent();
     for (int i = 0; i < service->method_count(); ++i) {
       auto m = service->method(i);
@@ -1158,8 +1171,8 @@
 
 }  // namespace
 
-grpc::string GetHeaderServices(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetHeaderServices(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1168,7 +1181,9 @@
     // Package string is empty or ends with a dot. It is used to fully qualify
     // method names.
     vars["Package"] = file->package();
-    if (!file->package().empty()) { vars["Package"].append("."); }
+    if (!file->package().empty()) {
+      vars["Package"].append(".");
+    }
 
     if (!params.services_namespace.empty()) {
       vars["services_namespace"] = params.services_namespace;
@@ -1192,8 +1207,8 @@
   return output;
 }
 
-grpc::string GetHeaderEpilogue(grpc_generator::File *file,
-                               const Parameters & /*params*/) {
+grpc::string GetHeaderEpilogue(grpc_generator::File* file,
+                               const Parameters& /*params*/) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1221,8 +1236,8 @@
   return output;
 }
 
-grpc::string GetSourcePrologue(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetSourcePrologue(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1247,24 +1262,23 @@
   return output;
 }
 
-grpc::string GetSourceIncludes(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetSourceIncludes(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
     auto printer = file->CreatePrinter(&output);
     std::map<grpc::string, grpc::string> vars;
 
-    static const char *headers_strs[] = {
-      "grpcpp/impl/codegen/async_stream.h",
-      "grpcpp/impl/codegen/async_unary_call.h",
-      "grpcpp/impl/codegen/channel_interface.h",
-      "grpcpp/impl/codegen/client_unary_call.h",
-      "grpcpp/impl/codegen/method_handler.h",
-      "grpcpp/impl/codegen/rpc_service_method.h",
-      "grpcpp/impl/codegen/service_type.h",
-      "grpcpp/impl/codegen/sync_stream.h"
-    };
+    static const char* headers_strs[] = {
+        "grpcpp/impl/codegen/async_stream.h",
+        "grpcpp/impl/codegen/async_unary_call.h",
+        "grpcpp/impl/codegen/channel_interface.h",
+        "grpcpp/impl/codegen/client_unary_call.h",
+        "grpcpp/impl/codegen/method_handler.h",
+        "grpcpp/impl/codegen/rpc_service_method.h",
+        "grpcpp/impl/codegen/service_type.h",
+        "grpcpp/impl/codegen/sync_stream.h"};
     std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
     PrintIncludes(printer.get(), headers, params);
 
@@ -1285,8 +1299,8 @@
 namespace {
 
 static void PrintSourceClientMethod(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -1295,8 +1309,8 @@
     grpc::string start;          // bool literal expressed as string
     grpc::string method_params;  // extra arguments to method
     grpc::string create_args;    // extra arguments to creator
-  } async_prefixes[] = { { "Async", "true", ", void* tag", ", tag" },
-                         { "PrepareAsync", "false", "", ", nullptr" } };
+  } async_prefixes[] = {{"Async", "true", ", void* tag", ", tag"},
+                        {"PrepareAsync", "false", "", ", nullptr"}};
   if (method->NoStreaming()) {
     printer->Print(*vars,
                    "::grpc::Status $ns$$Service$::Stub::$Method$("
@@ -1312,24 +1326,25 @@
           "void $ns$$Service$::Stub::async_$Method$(::grpc::ClientContext* "
           "context, const $Request$& request, $Response$* response, "
           "std::function<void(::grpc::Status)> on_done) {\n");
-  printer->Print(*vars,
-         "  ::grpc::internal::CallbackUnaryCall(channel_.get(), "
-         "rpcmethod_$Method$_, context, &request, response, "
-         "std::move(on_done));\n}\n\n");
+      printer->Print(*vars,
+                     "  ::grpc::internal::CallbackUnaryCall(channel_.get(), "
+                     "rpcmethod_$Method$_, context, &request, response, "
+                     "std::move(on_done));\n}\n\n");
       printer->Print(
           *vars,
           "void $ns$$Service$::Stub::async_$Method$(::grpc::ClientContext* "
           "context, const $Request$& request, $Response$* response, "
           "::grpc::ClientUnaryReactor* reactor) {\n");
-    printer->Print(
-      *vars,
-      "  "
-      "::grpc::internal::ClientCallbackUnaryFactory::Create(channel_.get(),"
-      " rpcmethod_$Method$_, context, &request, response, reactor);\n}\n\n");
+      printer->Print(
+          *vars,
+          "  "
+          "::grpc::internal::ClientCallbackUnaryFactory::Create(channel_.get(),"
+          " rpcmethod_$Method$_, context, &request, response, "
+          "reactor);\n}\n\n");
     }
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncStart"] = async_prefix.start;
       printer->Print(*vars,
@@ -1372,7 +1387,7 @@
     }
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncStart"] = async_prefix.start;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
@@ -1409,14 +1424,15 @@
           "void $ns$$Service$::Stub::async_$Method$(::grpc::ClientContext* "
           "context, const $Request$& request, ::grpc::ClientReadReactor< "
           "$Response$ >* reactor) {\n");
-  printer->Print(*vars,
-         "  ::grpc::internal::ClientCallbackReaderFactory< "
-         "$Response$ >::Create(channel_.get(), "
-         "rpcmethod_$Method$_, context, &request, reactor);\n}\n\n");
+      printer->Print(
+          *vars,
+          "  ::grpc::internal::ClientCallbackReaderFactory< "
+          "$Response$ >::Create(channel_.get(), "
+          "rpcmethod_$Method$_, context, &request, reactor);\n}\n\n");
     }
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncStart"] = async_prefix.start;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
@@ -1460,7 +1476,7 @@
     }
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncStart"] = async_prefix.start;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
@@ -1483,8 +1499,8 @@
 }
 
 static void PrintSourceServerMethod(
-    grpc_generator::Printer *printer, const grpc_generator::Method *method,
-    std::map<grpc::string, grpc::string> *vars) {
+    grpc_generator::Printer* printer, const grpc_generator::Method* method,
+    std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -1531,9 +1547,9 @@
   }
 }
 
-static void PrintSourceService(grpc_generator::Printer *printer,
-                               const grpc_generator::Service *service,
-                               std::map<grpc::string, grpc::string> *vars) {
+static void PrintSourceService(grpc_generator::Printer* printer,
+                               const grpc_generator::Service* service,
+                               std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Service"] = service->name();
 
   if (service->method_count() > 0) {
@@ -1660,47 +1676,54 @@
       (*vars)["Method"] = method->name();
       (*vars)["Request"] = method->input_type_name();
       (*vars)["Response"] = method->output_type_name();
-  if (method->NoStreaming()) {
-    printer->Print(
-    *vars,
-    "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
-    "    $prefix$$Service$_method_names[$Idx$],\n"
-    "    ::grpc::internal::RpcMethod::NORMAL_RPC,\n"
-    "    new ::grpc::internal::CallbackUnaryHandler<$Request$, $Response$>(\n"
-    "      [this](::grpc::CallbackServerContext* ctx, const $Request$* req, $Response$* resp) {\n"
-    "        return this->$Method$(ctx, req, resp);\n"
-    "      })));\n");
-  } else if (ClientOnlyStreaming(method.get())) {
-    printer->Print(
-    *vars,
-    "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
-    "    $prefix$$Service$_method_names[$Idx$],\n"
-    "    ::grpc::internal::RpcMethod::CLIENT_STREAMING,\n"
-    "    new ::grpc::internal::CallbackClientStreamingHandler<$Request$, $Response$>(\n"
-    "      [this](::grpc::CallbackServerContext* ctx, $Response$* resp) {\n"
-    "        return this->$Method$(ctx, resp);\n"
-    "      })));\n");
-  } else if (ServerOnlyStreaming(method.get())) {
-    printer->Print(
-    *vars,
-    "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
-    "    $prefix$$Service$_method_names[$Idx$],\n"
-    "    ::grpc::internal::RpcMethod::SERVER_STREAMING,\n"
-    "    new ::grpc::internal::CallbackServerStreamingHandler<$Request$, $Response$>(\n"
-    "      [this](::grpc::CallbackServerContext* ctx, const $Request$* req) {\n"
-    "        return this->$Method$(ctx, req);\n"
-    "      })));\n");
-  } else if (method->BidiStreaming()) {
-    printer->Print(
-    *vars,
-    "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
-    "    $prefix$$Service$_method_names[$Idx$],\n"
-    "    ::grpc::internal::RpcMethod::BIDI_STREAMING,\n"
-    "    new ::grpc::internal::CallbackBidiHandler<$Request$, $Response$>(\n"
-    "      [this](::grpc::CallbackServerContext* ctx) {\n"
-    "        return this->$Method$(ctx);\n"
-    "      })));\n");
-  }
+      if (method->NoStreaming()) {
+        printer->Print(
+            *vars,
+            "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
+            "    $prefix$$Service$_method_names[$Idx$],\n"
+            "    ::grpc::internal::RpcMethod::NORMAL_RPC,\n"
+            "    new ::grpc::internal::CallbackUnaryHandler<$Request$, "
+            "$Response$>(\n"
+            "      [this](::grpc::CallbackServerContext* ctx, const $Request$* "
+            "req, $Response$* resp) {\n"
+            "        return this->$Method$(ctx, req, resp);\n"
+            "      })));\n");
+      } else if (ClientOnlyStreaming(method.get())) {
+        printer->Print(*vars,
+                       "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
+                       "    $prefix$$Service$_method_names[$Idx$],\n"
+                       "    ::grpc::internal::RpcMethod::CLIENT_STREAMING,\n"
+                       "    new "
+                       "::grpc::internal::CallbackClientStreamingHandler<$"
+                       "Request$, $Response$>(\n"
+                       "      [this](::grpc::CallbackServerContext* ctx, "
+                       "$Response$* resp) {\n"
+                       "        return this->$Method$(ctx, resp);\n"
+                       "      })));\n");
+      } else if (ServerOnlyStreaming(method.get())) {
+        printer->Print(*vars,
+                       "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
+                       "    $prefix$$Service$_method_names[$Idx$],\n"
+                       "    ::grpc::internal::RpcMethod::SERVER_STREAMING,\n"
+                       "    new "
+                       "::grpc::internal::CallbackServerStreamingHandler<$"
+                       "Request$, $Response$>(\n"
+                       "      [this](::grpc::CallbackServerContext* ctx, const "
+                       "$Request$* req) {\n"
+                       "        return this->$Method$(ctx, req);\n"
+                       "      })));\n");
+      } else if (method->BidiStreaming()) {
+        printer->Print(
+            *vars,
+            "AddMethod(new ::grpc::internal::RpcServiceMethod(\n"
+            "    $prefix$$Service$_method_names[$Idx$],\n"
+            "    ::grpc::internal::RpcMethod::BIDI_STREAMING,\n"
+            "    new ::grpc::internal::CallbackBidiHandler<$Request$, "
+            "$Response$>(\n"
+            "      [this](::grpc::CallbackServerContext* ctx) {\n"
+            "        return this->$Method$(ctx);\n"
+            "      })));\n");
+      }
     }
     printer->Outdent();
     printer->Print("}\n\n");
@@ -1751,8 +1774,8 @@
 
 }  // namespace
 
-grpc::string GetSourceServices(grpc_generator::File *file,
-                               const Parameters &params) {
+grpc::string GetSourceServices(grpc_generator::File* file,
+                               const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1761,7 +1784,9 @@
     // Package string is empty or ends with a dot. It is used to fully qualify
     // method names.
     vars["Package"] = file->package();
-    if (!file->package().empty()) { vars["Package"].append("."); }
+    if (!file->package().empty()) {
+      vars["Package"].append(".");
+    }
     if (!params.services_namespace.empty()) {
       vars["ns"] = params.services_namespace + "::";
       vars["prefix"] = params.services_namespace;
@@ -1779,8 +1804,8 @@
   return output;
 }
 
-grpc::string GetSourceEpilogue(grpc_generator::File *file,
-                               const Parameters & /*params*/) {
+grpc::string GetSourceEpilogue(grpc_generator::File* file,
+                               const Parameters& /*params*/) {
   grpc::string temp;
 
   if (!file->package().empty()) {
@@ -1797,8 +1822,8 @@
   return temp;
 }
 
-grpc::string GetMockPrologue(grpc_generator::File *file,
-                             const Parameters &params) {
+grpc::string GetMockPrologue(grpc_generator::File* file,
+                             const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1824,18 +1849,18 @@
 }
 
 // TODO(mmukhi): Add client-stream and completion-queue headers.
-grpc::string GetMockIncludes(grpc_generator::File *file,
-                             const Parameters &params) {
+grpc::string GetMockIncludes(grpc_generator::File* file,
+                             const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
     auto printer = file->CreatePrinter(&output);
     std::map<grpc::string, grpc::string> vars;
 
-    static const char *headers_strs[] = {
-      "grpcpp/impl/codegen/async_stream.h",
-      "grpcpp/impl/codegen/sync_stream.h",
-      "gmock/gmock.h",
+    static const char* headers_strs[] = {
+        "grpcpp/impl/codegen/async_stream.h",
+        "grpcpp/impl/codegen/sync_stream.h",
+        "gmock/gmock.h",
     };
     std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
     PrintIncludes(printer.get(), headers, params);
@@ -1856,9 +1881,9 @@
 
 namespace {
 
-static void PrintMockClientMethods(grpc_generator::Printer *printer,
-                                   const grpc_generator::Method *method,
-                                   std::map<grpc::string, grpc::string> *vars) {
+static void PrintMockClientMethods(grpc_generator::Printer* printer,
+                                   const grpc_generator::Method* method,
+                                   std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Method"] = method->name();
   (*vars)["Request"] = method->input_type_name();
   (*vars)["Response"] = method->output_type_name();
@@ -1867,8 +1892,7 @@
     grpc::string prefix;
     grpc::string method_params;  // extra arguments to method
     int extra_method_param_count;
-  } async_prefixes[] = { { "Async", ", void* tag", 1 },
-                         { "PrepareAsync", "", 0 } };
+  } async_prefixes[] = {{"Async", ", void* tag", 1}, {"PrepareAsync", "", 0}};
 
   if (method->NoStreaming()) {
     printer->Print(
@@ -1877,7 +1901,7 @@
         "const $Request$& request, $Response$* response));\n");
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       printer->Print(
           *vars,
@@ -1894,7 +1918,7 @@
         "(::grpc::ClientContext* context, $Response$* response));\n");
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
       (*vars)["MockArgs"] =
@@ -1913,7 +1937,7 @@
         "(::grpc::ClientContext* context, const $Request$& request));\n");
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
       (*vars)["MockArgs"] =
@@ -1933,7 +1957,7 @@
         "(::grpc::ClientContext* context));\n");
     for (size_t i = 0; i < sizeof(async_prefixes) / sizeof(async_prefixes[0]);
          i++) {
-      auto &async_prefix = async_prefixes[i];
+      auto& async_prefix = async_prefixes[i];
       (*vars)["AsyncPrefix"] = async_prefix.prefix;
       (*vars)["AsyncMethodParams"] = async_prefix.method_params;
       (*vars)["MockArgs"] =
@@ -1948,9 +1972,9 @@
   }
 }
 
-static void PrintMockService(grpc_generator::Printer *printer,
-                             const grpc_generator::Service *service,
-                             std::map<grpc::string, grpc::string> *vars) {
+static void PrintMockService(grpc_generator::Printer* printer,
+                             const grpc_generator::Service* service,
+                             std::map<grpc::string, grpc::string>* vars) {
   (*vars)["Service"] = service->name();
 
   printer->Print(*vars,
@@ -1966,8 +1990,8 @@
 
 }  // namespace
 
-grpc::string GetMockServices(grpc_generator::File *file,
-                             const Parameters &params) {
+grpc::string GetMockServices(grpc_generator::File* file,
+                             const Parameters& params) {
   grpc::string output;
   {
     // Scope the output stream so it closes and finalizes output to the string.
@@ -1976,7 +2000,9 @@
     // Package string is empty or ends with a dot. It is used to fully qualify
     // method names.
     vars["Package"] = file->package();
-    if (!file->package().empty()) { vars["Package"].append("."); }
+    if (!file->package().empty()) {
+      vars["Package"].append(".");
+    }
 
     if (!params.services_namespace.empty()) {
       vars["services_namespace"] = params.services_namespace;
@@ -1995,8 +2021,8 @@
   return output;
 }
 
-grpc::string GetMockEpilogue(grpc_generator::File *file,
-                             const Parameters & /*params*/) {
+grpc::string GetMockEpilogue(grpc_generator::File* file,
+                             const Parameters& /*params*/) {
   grpc::string temp;
 
   if (!file->package().empty()) {
diff --git a/grpc/src/compiler/cpp_generator.h b/grpc/src/compiler/cpp_generator.h
index 3e3e859..c7bfbe8 100644
--- a/grpc/src/compiler/cpp_generator.h
+++ b/grpc/src/compiler/cpp_generator.h
@@ -11,8 +11,8 @@
 #include "src/compiler/schema_interface.h"
 
 #ifndef GRPC_CUSTOM_STRING
-#  include <string>
-#  define GRPC_CUSTOM_STRING std::string
+#include <string>
+#define GRPC_CUSTOM_STRING std::string
 #endif
 
 namespace grpc {
@@ -42,68 +42,68 @@
 };
 
 // Return the prologue of the generated header file.
-grpc::string GetHeaderPrologue(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetHeaderPrologue(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the includes needed for generated header file.
-grpc::string GetHeaderIncludes(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetHeaderIncludes(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the includes needed for generated source file.
-grpc::string GetSourceIncludes(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetSourceIncludes(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the epilogue of the generated header file.
-grpc::string GetHeaderEpilogue(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetHeaderEpilogue(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the prologue of the generated source file.
-grpc::string GetSourcePrologue(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetSourcePrologue(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the services for generated header file.
-grpc::string GetHeaderServices(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetHeaderServices(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the services for generated source file.
-grpc::string GetSourceServices(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetSourceServices(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the epilogue of the generated source file.
-grpc::string GetSourceEpilogue(grpc_generator::File *file,
-                               const Parameters &params);
+grpc::string GetSourceEpilogue(grpc_generator::File* file,
+                               const Parameters& params);
 
 // Return the prologue of the generated mock file.
-grpc::string GetMockPrologue(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockPrologue(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the includes needed for generated mock file.
-grpc::string GetMockIncludes(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockIncludes(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the services for generated mock file.
-grpc::string GetMockServices(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockServices(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the epilogue of generated mock file.
-grpc::string GetMockEpilogue(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockEpilogue(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the prologue of the generated mock file.
-grpc::string GetMockPrologue(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockPrologue(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the includes needed for generated mock file.
-grpc::string GetMockIncludes(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockIncludes(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the services for generated mock file.
-grpc::string GetMockServices(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockServices(grpc_generator::File* file,
+                             const Parameters& params);
 
 // Return the epilogue of generated mock file.
-grpc::string GetMockEpilogue(grpc_generator::File *file,
-                             const Parameters &params);
+grpc::string GetMockEpilogue(grpc_generator::File* file,
+                             const Parameters& params);
 
 }  // namespace grpc_cpp_generator
 
diff --git a/grpc/src/compiler/go_generator.cc b/grpc/src/compiler/go_generator.cc
index ad4694b..8cc8951 100644
--- a/grpc/src/compiler/go_generator.cc
+++ b/grpc/src/compiler/go_generator.cc
@@ -4,17 +4,18 @@
 #include <map>
 #include <sstream>
 
-template<class T> grpc::string as_string(T x) {
+template <class T>
+grpc::string as_string(T x) {
   std::ostringstream out;
   out << x;
   return out.str();
 }
 
-inline bool ClientOnlyStreaming(const grpc_generator::Method *method) {
+inline bool ClientOnlyStreaming(const grpc_generator::Method* method) {
   return method->ClientStreaming() && !method->ServerStreaming();
 }
 
-inline bool ServerOnlyStreaming(const grpc_generator::Method *method) {
+inline bool ServerOnlyStreaming(const grpc_generator::Method* method) {
   return !method->ClientStreaming() && method->ServerStreaming();
 }
 
@@ -35,9 +36,9 @@
   return s;
 }
 
-static void GenerateError(grpc_generator::Printer *printer,
-                   std::map<grpc::string, grpc::string> vars,
-                   const bool multiple_return = true) {
+static void GenerateError(grpc_generator::Printer* printer,
+                          std::map<grpc::string, grpc::string> vars,
+                          const bool multiple_return = true) {
   printer->Print(vars, "if $Error_Check$ {\n");
   printer->Indent();
   vars["Return"] = multiple_return ? "nil, err" : "err";
@@ -47,9 +48,9 @@
 }
 
 // Generates imports for the service
-static void GenerateImports(grpc_generator::File *file,
-                     grpc_generator::Printer *printer,
-                     std::map<grpc::string, grpc::string> vars) {
+static void GenerateImports(grpc_generator::File* file,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string> vars) {
   vars["filename"] = file->filename();
   printer->Print("//Generated by gRPC Go plugin\n");
   printer->Print("//If you make any local changes, they will be lost\n");
@@ -67,9 +68,9 @@
 }
 
 // Generates Server method signature source
-static void GenerateServerMethodSignature(const grpc_generator::Method *method,
-                                   grpc_generator::Printer *printer,
-                                   std::map<grpc::string, grpc::string> vars) {
+static void GenerateServerMethodSignature(
+    const grpc_generator::Method* method, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string> vars) {
   vars["Method"] = exportName(method->name());
   vars["Request"] = method->get_input_type_name();
   vars["Response"] = (vars["CustomMethodIO"] == "")
@@ -87,9 +88,9 @@
   }
 }
 
-static void GenerateServerMethod(const grpc_generator::Method *method,
-                          grpc_generator::Printer *printer,
-                          std::map<grpc::string, grpc::string> vars) {
+static void GenerateServerMethod(const grpc_generator::Method* method,
+                                 grpc_generator::Printer* printer,
+                                 std::map<grpc::string, grpc::string> vars) {
   vars["Method"] = exportName(method->name());
   vars["Request"] = method->get_input_type_name();
   vars["Response"] = (vars["CustomMethodIO"] == "")
@@ -160,8 +161,12 @@
 
   printer->Print(vars, "type $Service$_$Method$Server interface {\n");
   printer->Indent();
-  if (genSend) { printer->Print(vars, "Send(*$Response$) error\n"); }
-  if (genRecv) { printer->Print(vars, "Recv() (*$Request$, error)\n"); }
+  if (genSend) {
+    printer->Print(vars, "Send(*$Response$) error\n");
+  }
+  if (genRecv) {
+    printer->Print(vars, "Recv() (*$Request$, error)\n");
+  }
   if (genSendAndClose) {
     printer->Print(vars, "SendAndClose(*$Response$) error\n");
   }
@@ -205,9 +210,9 @@
 }
 
 // Generates Client method signature source
-static void GenerateClientMethodSignature(const grpc_generator::Method *method,
-                                   grpc_generator::Printer *printer,
-                                   std::map<grpc::string, grpc::string> vars) {
+static void GenerateClientMethodSignature(
+    const grpc_generator::Method* method, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string> vars) {
   vars["Method"] = exportName(method->name());
   vars["Request"] =
       ", in *" + ((vars["CustomMethodIO"] == "") ? method->get_input_type_name()
@@ -226,9 +231,9 @@
 }
 
 // Generates Client method source
-static void GenerateClientMethod(const grpc_generator::Method *method,
-                          grpc_generator::Printer *printer,
-                          std::map<grpc::string, grpc::string> vars) {
+static void GenerateClientMethod(const grpc_generator::Method* method,
+                                 grpc_generator::Printer* printer,
+                                 std::map<grpc::string, grpc::string> vars) {
   printer->Print(vars, "func (c *$ServiceUnexported$Client) ");
   vars["Ending"] = " {\n";
   GenerateClientMethodSignature(method, printer, vars);
@@ -277,8 +282,12 @@
   // Stream interface
   printer->Print(vars, "type $Service$_$Method$Client interface {\n");
   printer->Indent();
-  if (genSend) { printer->Print(vars, "Send(*$Request$) error\n"); }
-  if (genRecv) { printer->Print(vars, "Recv() (*$Response$, error)\n"); }
+  if (genSend) {
+    printer->Print(vars, "Send(*$Request$) error\n");
+  }
+  if (genRecv) {
+    printer->Print(vars, "Recv() (*$Response$, error)\n");
+  }
   if (genCloseAndRecv) {
     printer->Print(vars, "CloseAndRecv() (*$Response$, error)\n");
   }
@@ -329,8 +338,8 @@
 }
 
 // Generates client API for the service
-void GenerateService(const grpc_generator::Service *service,
-                     grpc_generator::Printer *printer,
+void GenerateService(const grpc_generator::Service* service,
+                     grpc_generator::Printer* printer,
                      std::map<grpc::string, grpc::string> vars) {
   vars["Service"] = exportName(service->name());
   // Client Interface
@@ -484,9 +493,9 @@
 }  // namespace
 
 // Returns source for the service
-grpc::string GenerateServiceSource(grpc_generator::File *file,
-                                   const grpc_generator::Service *service,
-                                   grpc_go_generator::Parameters *parameters) {
+grpc::string GenerateServiceSource(grpc_generator::File* file,
+                                   const grpc_generator::Service* service,
+                                   grpc_go_generator::Parameters* parameters) {
   grpc::string out;
   auto p = file->CreatePrinter(&out, '\t');
   p->SetIndentationSize(1);
diff --git a/grpc/src/compiler/go_generator.h b/grpc/src/compiler/go_generator.h
index 766e100..f1ced28 100644
--- a/grpc/src/compiler/go_generator.h
+++ b/grpc/src/compiler/go_generator.h
@@ -24,9 +24,9 @@
 };
 
 // Return the source of the generated service file.
-grpc::string GenerateServiceSource(grpc_generator::File *file,
-                                   const grpc_generator::Service *service,
-                                   grpc_go_generator::Parameters *parameters);
+grpc::string GenerateServiceSource(grpc_generator::File* file,
+                                   const grpc_generator::Service* service,
+                                   grpc_go_generator::Parameters* parameters);
 
 }  // namespace grpc_go_generator
 
diff --git a/grpc/src/compiler/java_generator.cc b/grpc/src/compiler/java_generator.cc
index bfe2b11..00d3350 100644
--- a/grpc/src/compiler/java_generator.cc
+++ b/grpc/src/compiler/java_generator.cc
@@ -28,11 +28,11 @@
 
 // Stringify helpers used solely to cast GRPC_VERSION
 #ifndef STR
-#  define STR(s) #  s
+#define STR(s) #s
 #endif
 
 #ifndef XSTR
-#  define XSTR(s) STR(s)
+#define XSTR(s) STR(s)
 #endif
 
 typedef grpc_generator::Printer Printer;
@@ -46,8 +46,8 @@
 typedef std::string string;
 namespace {
 // Generates imports for the service
-static void GenerateImports(grpc_generator::File *file,
-                     grpc_generator::Printer *printer, VARS &vars) {
+static void GenerateImports(grpc_generator::File* file,
+                            grpc_generator::Printer* printer, VARS& vars) {
   vars["filename"] = file->filename();
   printer->Print(vars,
                  "//Generated by flatc compiler (version $flatc_version$)\n");
@@ -64,7 +64,7 @@
 // Adjust a method name prefix identifier to follow the JavaBean spec:
 //   - decapitalize the first letter
 //   - remove embedded underscores & capitalize the following letter
-static string MixedLower(const string &word) {
+static string MixedLower(const string& word) {
   string w;
   w += static_cast<string::value_type>(tolower(word[0]));
   bool after_underscore = false;
@@ -84,7 +84,7 @@
 //   - An underscore is inserted where a lower case letter is followed by an
 //     upper case letter.
 //   - All letters are converted to upper case
-static string ToAllUpperCase(const string &word) {
+static string ToAllUpperCase(const string& word) {
   string w;
   for (size_t i = 0; i < word.length(); ++i) {
     w += static_cast<string::value_type>(toupper(word[i]));
@@ -95,49 +95,48 @@
   return w;
 }
 
-static inline string LowerMethodName(const MethodDescriptor *method) {
+static inline string LowerMethodName(const MethodDescriptor* method) {
   return MixedLower(method->name());
 }
 
-static inline string MethodPropertiesFieldName(const MethodDescriptor *method) {
+static inline string MethodPropertiesFieldName(const MethodDescriptor* method) {
   return "METHOD_" + ToAllUpperCase(method->name());
 }
 
 static inline string MethodPropertiesGetterName(
-    const MethodDescriptor *method) {
+    const MethodDescriptor* method) {
   return MixedLower("get_" + method->name() + "_method");
 }
 
-static inline string MethodIdFieldName(const MethodDescriptor *method) {
+static inline string MethodIdFieldName(const MethodDescriptor* method) {
   return "METHODID_" + ToAllUpperCase(method->name());
 }
 
-static inline string JavaClassName(VARS &vars, const string &name) {
+static inline string JavaClassName(VARS& vars, const string& name) {
   // string name = google::protobuf::compiler::java::ClassName(desc);
   return vars["Package"] + name;
 }
 
-static inline string ServiceClassName(const string &service_name) {
+static inline string ServiceClassName(const string& service_name) {
   return service_name + "Grpc";
 }
 
 // TODO(nmittler): Remove once protobuf includes javadoc methods in
 // distribution.
-template<typename ITR>
-static void GrpcSplitStringToIteratorUsing(const string &full,
-                                           const char *delim, ITR &result) {
+template <typename ITR>
+static void GrpcSplitStringToIteratorUsing(const string& full,
+                                           const char* delim, ITR& result) {
   // Optimize the common case where delim is a single character.
   if (delim[0] != '\0' && delim[1] == '\0') {
     char c = delim[0];
-    const char *p = full.data();
-    const char *end = p + full.size();
+    const char* p = full.data();
+    const char* end = p + full.size();
     while (p != end) {
       if (*p == c) {
         ++p;
       } else {
-        const char *start = p;
-        while (++p != end && *p != c)
-          ;
+        const char* start = p;
+        while (++p != end && *p != c);
         *result++ = string(start, p - start);
       }
     }
@@ -157,13 +156,13 @@
   }
 }
 
-static void GrpcSplitStringUsing(const string &full, const char *delim,
-                                 std::vector<string> *result) {
+static void GrpcSplitStringUsing(const string& full, const char* delim,
+                                 std::vector<string>* result) {
   std::back_insert_iterator<std::vector<string>> it(*result);
   GrpcSplitStringToIteratorUsing(full, delim, it);
 }
 
-static std::vector<string> GrpcSplit(const string &full, const char *delim) {
+static std::vector<string> GrpcSplit(const string& full, const char* delim) {
   std::vector<string> result;
   GrpcSplitStringUsing(full, delim, &result);
   return result;
@@ -171,7 +170,7 @@
 
 // TODO(nmittler): Remove once protobuf includes javadoc methods in
 // distribution.
-static string GrpcEscapeJavadoc(const string &input) {
+static string GrpcEscapeJavadoc(const string& input) {
   string result;
   result.reserve(input.size() * 2);
 
@@ -218,7 +217,9 @@
         // Java interprets Unicode escape sequences anywhere!
         result.append("&#92;");
         break;
-      default: result.push_back(c); break;
+      default:
+        result.push_back(c);
+        break;
     }
 
     prev = c;
@@ -227,7 +228,7 @@
   return result;
 }
 
-static std::vector<string> GrpcGetDocLines(const string &comments) {
+static std::vector<string> GrpcGetDocLines(const string& comments) {
   if (!comments.empty()) {
     // TODO(kenton):  Ideally we should parse the comment text as Markdown and
     //   write it back as HTML, but this requires a Markdown parser.  For now
@@ -238,23 +239,27 @@
     string escapedComments = GrpcEscapeJavadoc(comments);
 
     std::vector<string> lines = GrpcSplit(escapedComments, "\n");
-    while (!lines.empty() && lines.back().empty()) { lines.pop_back(); }
+    while (!lines.empty() && lines.back().empty()) {
+      lines.pop_back();
+    }
     return lines;
   }
   return std::vector<string>();
 }
 
 static std::vector<string> GrpcGetDocLinesForDescriptor(
-    const DescriptorType *descriptor) {
+    const DescriptorType* descriptor) {
   return descriptor->GetAllComments();
   // return GrpcGetDocLines(descriptor->GetLeadingComments("///"));
 }
 
-static void GrpcWriteDocCommentBody(Printer *printer, VARS &vars,
-                                    const std::vector<string> &lines,
+static void GrpcWriteDocCommentBody(Printer* printer, VARS& vars,
+                                    const std::vector<string>& lines,
                                     bool surroundWithPreTag) {
   if (!lines.empty()) {
-    if (surroundWithPreTag) { printer->Print(" * <pre>\n"); }
+    if (surroundWithPreTag) {
+      printer->Print(" * <pre>\n");
+    }
 
     for (size_t i = 0; i < lines.size(); i++) {
       // Most lines should start with a space.  Watch out for lines that start
@@ -268,28 +273,30 @@
       }
     }
 
-    if (surroundWithPreTag) { printer->Print(" * </pre>\n"); }
+    if (surroundWithPreTag) {
+      printer->Print(" * </pre>\n");
+    }
   }
 }
 
-static void GrpcWriteDocComment(Printer *printer, VARS &vars,
-                                const string &comments) {
+static void GrpcWriteDocComment(Printer* printer, VARS& vars,
+                                const string& comments) {
   printer->Print("/**\n");
   std::vector<string> lines = GrpcGetDocLines(comments);
   GrpcWriteDocCommentBody(printer, vars, lines, false);
   printer->Print(" */\n");
 }
 
-static void GrpcWriteServiceDocComment(Printer *printer, VARS &vars,
-                                       const ServiceDescriptor *service) {
+static void GrpcWriteServiceDocComment(Printer* printer, VARS& vars,
+                                       const ServiceDescriptor* service) {
   printer->Print("/**\n");
   std::vector<string> lines = GrpcGetDocLinesForDescriptor(service);
   GrpcWriteDocCommentBody(printer, vars, lines, true);
   printer->Print(" */\n");
 }
 
-static void GrpcWriteMethodDocComment(Printer *printer, VARS &vars,
-                               const MethodDescriptor *method) {
+static void GrpcWriteMethodDocComment(Printer* printer, VARS& vars,
+                                      const MethodDescriptor* method) {
   printer->Print("/**\n");
   std::vector<string> lines = GrpcGetDocLinesForDescriptor(method);
   GrpcWriteDocCommentBody(printer, vars, lines, true);
@@ -298,7 +305,7 @@
 
 // outputs static singleton extractor for type stored in "extr_type" and
 // "extr_type_name" vars
-static void PrintTypeExtractor(Printer *p, VARS &vars) {
+static void PrintTypeExtractor(Printer* p, VARS& vars) {
   p->Print(vars,
            "private static volatile FlatbuffersUtils.FBExtactor<$extr_type$> "
            "extractorOf$extr_type_name$;\n"
@@ -320,8 +327,8 @@
            "    }\n"
            "}\n\n");
 }
-static void PrintMethodFields(Printer *p, VARS &vars,
-                              const ServiceDescriptor *service) {
+static void PrintMethodFields(Printer* p, VARS& vars,
+                              const ServiceDescriptor* service) {
   p->Print("// Static method descriptors that strictly reflect the proto.\n");
   vars["service_name"] = service->name();
 
@@ -443,11 +450,11 @@
 
 enum CallType { ASYNC_CALL = 0, BLOCKING_CALL = 1, FUTURE_CALL = 2 };
 
-static void PrintBindServiceMethodBody(Printer *p, VARS &vars,
-                                       const ServiceDescriptor *service);
+static void PrintBindServiceMethodBody(Printer* p, VARS& vars,
+                                       const ServiceDescriptor* service);
 
 // Prints a client interface or implementation class, or a server interface.
-static void PrintStub(Printer *p, VARS &vars, const ServiceDescriptor *service,
+static void PrintStub(Printer* p, VARS& vars, const ServiceDescriptor* service,
                       StubType type) {
   const string service_name = service->name();
   vars["service_name"] = service_name;
@@ -493,7 +500,9 @@
   vars["client_name"] = client_name;
 
   // Class head
-  if (!interface) { GrpcWriteServiceDocComment(p, vars, service); }
+  if (!interface) {
+    GrpcWriteServiceDocComment(p, vars, service);
+  }
   if (impl_base) {
     p->Print(vars,
              "public static abstract class $abstract_name$ implements "
@@ -555,7 +564,9 @@
     p->Print("\n");
     // TODO(nmittler): Replace with WriteMethodDocComment once included by the
     // protobuf distro.
-    if (!interface) { GrpcWriteMethodDocComment(p, vars, &*method); }
+    if (!interface) {
+      GrpcWriteMethodDocComment(p, vars, &*method);
+    }
     p->Print("public ");
     switch (call_type) {
       case BLOCKING_CALL:
@@ -620,7 +631,8 @@
                      "responseObserver);\n");
           }
           break;
-        default: break;
+        default:
+          break;
       }
     } else if (!interface) {
       switch (call_type) {
@@ -695,15 +707,15 @@
 }
 
 static bool CompareMethodClientStreaming(
-    const std::unique_ptr<const grpc_generator::Method> &method1,
-    const std::unique_ptr<const grpc_generator::Method> &method2) {
+    const std::unique_ptr<const grpc_generator::Method>& method1,
+    const std::unique_ptr<const grpc_generator::Method>& method2) {
   return method1->ClientStreaming() < method2->ClientStreaming();
 }
 
 // Place all method invocations into a single class to reduce memory footprint
 // on Android.
-static void PrintMethodHandlerClass(Printer *p, VARS &vars,
-                                    const ServiceDescriptor *service) {
+static void PrintMethodHandlerClass(Printer* p, VARS& vars,
+                                    const ServiceDescriptor* service) {
   // Sort method ids based on ClientStreaming() so switch tables are compact.
   std::vector<std::unique_ptr<const grpc_generator::Method>> sorted_methods(
       service->method_count());
@@ -713,7 +725,7 @@
   stable_sort(sorted_methods.begin(), sorted_methods.end(),
               CompareMethodClientStreaming);
   for (size_t i = 0; i < sorted_methods.size(); i++) {
-    auto &method = sorted_methods[i];
+    auto& method = sorted_methods[i];
     vars["method_id"] = to_string(i);
     vars["method_id_name"] = MethodIdFieldName(&*method);
     p->Print(vars,
@@ -746,7 +758,9 @@
 
   for (int i = 0; i < service->method_count(); ++i) {
     auto method = service->method(i);
-    if (method->ClientStreaming() || method->BidiStreaming()) { continue; }
+    if (method->ClientStreaming() || method->BidiStreaming()) {
+      continue;
+    }
     vars["method_id_name"] = MethodIdFieldName(&*method);
     vars["lower_method_name"] = LowerMethodName(&*method);
     vars["input_type"] = JavaClassName(vars, method->get_input_type_name());
@@ -778,7 +792,9 @@
 
   for (int i = 0; i < service->method_count(); ++i) {
     auto method = service->method(i);
-    if (!(method->ClientStreaming() || method->BidiStreaming())) { continue; }
+    if (!(method->ClientStreaming() || method->BidiStreaming())) {
+      continue;
+    }
     vars["method_id_name"] = MethodIdFieldName(&*method);
     vars["lower_method_name"] = LowerMethodName(&*method);
     vars["input_type"] = JavaClassName(vars, method->get_input_type_name());
@@ -803,8 +819,8 @@
   p->Print("}\n\n");
 }
 
-static void PrintGetServiceDescriptorMethod(Printer *p, VARS &vars,
-                                            const ServiceDescriptor *service) {
+static void PrintGetServiceDescriptorMethod(Printer* p, VARS& vars,
+                                            const ServiceDescriptor* service) {
   vars["service_name"] = service->name();
   //        vars["proto_base_descriptor_supplier"] = service->name() +
   //        "BaseDescriptorSupplier"; vars["proto_file_descriptor_supplier"] =
@@ -896,8 +912,8 @@
   p->Print("}\n");
 }
 
-static void PrintBindServiceMethodBody(Printer *p, VARS &vars,
-                                       const ServiceDescriptor *service) {
+static void PrintBindServiceMethodBody(Printer* p, VARS& vars,
+                                       const ServiceDescriptor* service) {
   vars["service_name"] = service->name();
   p->Indent();
   p->Print(vars,
@@ -949,8 +965,8 @@
   p->Outdent();
 }
 
-static void PrintService(Printer *p, VARS &vars,
-                         const ServiceDescriptor *service,
+static void PrintService(Printer* p, VARS& vars,
+                         const ServiceDescriptor* service,
                          bool disable_version) {
   vars["service_name"] = service->name();
   vars["service_class_name"] = ServiceClassName(service->name());
@@ -1030,7 +1046,7 @@
   p->Print("}\n");
 }
 
-static void PrintStaticImports(Printer *p) {
+static void PrintStaticImports(Printer* p) {
   p->Print(
       "import java.nio.ByteBuffer;\n"
       "import static "
@@ -1063,9 +1079,9 @@
       "io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;\n\n");
 }
 
-static void GenerateService(const grpc_generator::Service *service,
-                     grpc_generator::Printer *printer, VARS &vars,
-                     bool disable_version) {
+static void GenerateService(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer, VARS& vars,
+                            bool disable_version) {
   // All non-generated classes must be referred by fully qualified names to
   // avoid collision with generated classes.
   vars["String"] = "java.lang.String";
@@ -1098,11 +1114,11 @@
 
   PrintService(printer, vars, service, disable_version);
 }
-} // namespace
+}  // namespace
 
 grpc::string GenerateServiceSource(
-    grpc_generator::File *file, const grpc_generator::Service *service,
-    grpc_java_generator::Parameters *parameters) {
+    grpc_generator::File* file, const grpc_generator::Service* service,
+    grpc_java_generator::Parameters* parameters) {
   grpc::string out;
   auto printer = file->CreatePrinter(&out);
   VARS vars;
diff --git a/grpc/src/compiler/java_generator.h b/grpc/src/compiler/java_generator.h
index b101fbf..00fe3fe 100644
--- a/grpc/src/compiler/java_generator.h
+++ b/grpc/src/compiler/java_generator.h
@@ -18,6 +18,7 @@
 #define NET_GRPC_COMPILER_JAVA_GENERATOR_H_
 
 #include <stdlib.h>  // for abort()
+
 #include <iostream>
 #include <map>
 #include <string>
@@ -39,8 +40,8 @@
   LogHelper(std::ostream* os) : os_(os) {}
 #if defined(_MSC_VER)
 #pragma warning(push)
-#pragma warning( \
-    disable : 4722)  // the flow of control terminates in a destructor
+#pragma warning(disable \
+                : 4722)  // the flow of control terminates in a destructor
   // (needed to compile ~LogHelper where destructor emits abort intentionally -
   // inherited from grpc/java code generator).
 #endif
diff --git a/grpc/src/compiler/python_generator.cc b/grpc/src/compiler/python_generator.cc
index 72a139f..f217c9d 100644
--- a/grpc/src/compiler/python_generator.cc
+++ b/grpc/src/compiler/python_generator.cc
@@ -35,22 +35,22 @@
 namespace python {
 namespace grpc {
 namespace {
-bool ClientStreaming(const RPCCall *method) {
-  const Value *val = method->attributes.Lookup("streaming");
+bool ClientStreaming(const RPCCall* method) {
+  const Value* val = method->attributes.Lookup("streaming");
   return val != nullptr &&
          (val->constant == "client" || val->constant == "bidi");
 }
 
-bool ServerStreaming(const RPCCall *method) {
-  const Value *val = method->attributes.Lookup("streaming");
+bool ServerStreaming(const RPCCall* method) {
+  const Value* val = method->attributes.Lookup("streaming");
   return val != nullptr &&
          (val->constant == "server" || val->constant == "bidi");
 }
 
-void FormatImports(std::stringstream &ss, const Imports &imports) {
+void FormatImports(std::stringstream& ss, const Imports& imports) {
   std::set<std::string> modules;
   std::map<std::string, std::set<std::string>> names_by_module;
-  for (const Import &import : imports.imports) {
+  for (const Import& import : imports.imports) {
     if (import.IsLocal()) continue;  // skip all local imports
     if (import.name == "") {
       modules.insert(import.module);
@@ -59,14 +59,14 @@
     }
   }
 
-  for (const std::string &module : modules) {
+  for (const std::string& module : modules) {
     ss << "import " << module << '\n';
   }
   ss << '\n';
-  for (const auto &import : names_by_module) {
+  for (const auto& import : names_by_module) {
     ss << "from " << import.first << " import ";
     size_t i = 0;
-    for (const std::string &name : import.second) {
+    for (const std::string& name : import.second) {
       if (i > 0) ss << ", ";
       ss << name;
       ++i;
@@ -76,8 +76,8 @@
   ss << "\n\n";
 }
 
-bool SaveStub(const std::string &filename, const Imports &imports,
-              const std::string &content) {
+bool SaveStub(const std::string& filename, const Imports& imports,
+              const std::string& content) {
   std::stringstream ss;
   ss << "# Generated by the gRPC FlatBuffers compiler. DO NOT EDIT!\n"
      << '\n'
@@ -90,8 +90,8 @@
   return flatbuffers::SaveFile(filename.c_str(), ss.str(), false);
 }
 
-bool SaveService(const std::string &filename, const Imports &imports,
-                 const std::string &content) {
+bool SaveService(const std::string& filename, const Imports& imports,
+                 const std::string& content) {
   std::stringstream ss;
   ss << "# Generated by the gRPC FlatBuffers compiler. DO NOT EDIT!\n" << '\n';
   FormatImports(ss, imports);
@@ -103,32 +103,33 @@
 
 class BaseGenerator {
  protected:
-  BaseGenerator(const Parser &parser, const Namer::Config &config,
-                const std::string &path, const Version &version)
-      : parser_{ parser },
-        namer_{ WithFlagOptions(config, parser.opts, path), Keywords(version) },
-        version_{ version },
+  BaseGenerator(const Parser& parser, const Namer::Config& config,
+                const std::string& path, const Version& version)
+      : parser_{parser},
+        namer_{WithFlagOptions(config, parser.opts, path), Keywords(version)},
+        version_{version},
         path_(path) {}
 
  protected:
-  std::string ModuleForFile(const std::string &file) const {
+  std::string ModuleForFile(const std::string& file) const {
     std::string module = parser_.opts.include_prefix + StripExtension(file) +
                          parser_.opts.filename_suffix;
     std::replace(module.begin(), module.end(), '/', '.');
     return module;
   }
 
-  template<typename T> std::string ModuleFor(const T *def) const {
+  template <typename T>
+  std::string ModuleFor(const T* def) const {
     if (parser_.opts.one_file) return ModuleForFile(def->file);
     return namer_.NamespacedType(*def);
   }
 
-  std::string NamespaceDir(const Parser &parser, const std::string &path,
-                           const Namespace &ns, const bool dasherize) {
+  std::string NamespaceDir(const Parser& parser, const std::string& path,
+                           const Namespace& ns, const bool dasherize) {
     EnsureDirExists(path);
     if (parser.opts.one_file) return path;
     std::string namespace_dir = path;  // Either empty or ends in separator.
-    auto &namespaces = ns.components;
+    auto& namespaces = ns.components;
     for (auto it = namespaces.begin(); it != namespaces.end(); ++it) {
       namespace_dir +=
           !dasherize ? *it : ConvertCase(*it, Case::kDasher, Case::kUpperCamel);
@@ -138,32 +139,32 @@
     return namespace_dir;
   }
 
-  std::string NamespaceDir(const Namespace &ns, const bool dasherize) {
+  std::string NamespaceDir(const Namespace& ns, const bool dasherize) {
     return NamespaceDir(parser_, path_, ns, dasherize);
   }
 
-  const Parser &parser_;
+  const Parser& parser_;
   const IdlNamer namer_;
   const Version version_;
-  const std::string &path_;
+  const std::string& path_;
 };
 
 class StubGenerator : public BaseGenerator {
  public:
-  StubGenerator(const Parser &parser, const std::string &path,
-                const Version &version)
+  StubGenerator(const Parser& parser, const std::string& path,
+                const Version& version)
       : BaseGenerator(parser, kStubConfig, path, version) {}
 
   bool Generate() {
     Imports imports;
     std::stringstream stub;
     std::string ns_name{};
-    for (const ServiceDef *service : parser_.services_.vec) {
+    for (const ServiceDef* service : parser_.services_.vec) {
       Generate(stub, service, &imports);
       ns_name = NamespaceDir(*service->defined_namespace, false);
     }
 
-    std::string sanitized_suffix{ parser_.opts.grpc_filename_suffix };
+    std::string sanitized_suffix{parser_.opts.grpc_filename_suffix};
     std::replace(sanitized_suffix.begin(), sanitized_suffix.end(), '.', '_');
     std::string filename =
         ns_name + kPathSeparator +
@@ -174,14 +175,14 @@
   }
 
  private:
-  void Generate(std::stringstream &ss, const ServiceDef *service,
-                Imports *imports) {
+  void Generate(std::stringstream& ss, const ServiceDef* service,
+                Imports* imports) {
     imports->Import("grpc");
 
     ss << "class " << service->name << "Stub(object):\n"
        << "  def __init__(self, channel: grpc.Channel) -> None: ...\n";
 
-    for (const RPCCall *method : service->calls.vec) {
+    for (const RPCCall* method : service->calls.vec) {
       std::string request = "bytes";
       std::string response = "bytes";
 
@@ -213,7 +214,7 @@
     ss << "\n\n";
     ss << "class " << service->name << "Servicer(object):\n";
 
-    for (const RPCCall *method : service->calls.vec) {
+    for (const RPCCall* method : service->calls.vec) {
       std::string request = "bytes";
       std::string response = "bytes";
 
@@ -252,8 +253,8 @@
 
 class ServiceGenerator : public BaseGenerator {
  public:
-  ServiceGenerator(const Parser &parser, const std::string &path,
-                   const Version &version)
+  ServiceGenerator(const Parser& parser, const std::string& path,
+                   const Version& version)
       : BaseGenerator(parser, kConfig, path, version) {}
 
   bool Generate() {
@@ -274,14 +275,14 @@
     }
 
     std::string ns_name{};
-    for (const ServiceDef *service : parser_.services_.vec) {
+    for (const ServiceDef* service : parser_.services_.vec) {
       GenerateStub(ss, service, &imports);
       GenerateServicer(ss, service, &imports);
       GenerateRegister(ss, service, &imports);
       ns_name = NamespaceDir(*service->defined_namespace, false);
     }
 
-    std::string sanitized_suffix{ parser_.opts.grpc_filename_suffix };
+    std::string sanitized_suffix{parser_.opts.grpc_filename_suffix};
     std::replace(sanitized_suffix.begin(), sanitized_suffix.end(), '.', '_');
     std::string filename =
         ns_name + kPathSeparator +
@@ -292,8 +293,8 @@
   }
 
  private:
-  void GenerateStub(std::stringstream &ss, const ServiceDef *service,
-                    Imports *imports) {
+  void GenerateStub(std::stringstream& ss, const ServiceDef* service,
+                    Imports* imports) {
     ss << "class " << service->name << "Stub";
     if (version_.major != 3) ss << "(object)";
     ss << ":\n"
@@ -307,7 +308,7 @@
        << "    '''\n"
        << '\n';
 
-    for (const RPCCall *method : service->calls.vec) {
+    for (const RPCCall* method : service->calls.vec) {
       std::string response = namer_.Type(*method->response);
 
       imports->Import(ModuleFor(method->response), response);
@@ -330,8 +331,8 @@
     ss << '\n';
   }
 
-  void GenerateServicer(std::stringstream &ss, const ServiceDef *service,
-                        Imports *imports) {
+  void GenerateServicer(std::stringstream& ss, const ServiceDef* service,
+                        Imports* imports) {
     imports->Import("grpc");
 
     ss << "class " << service->name << "Servicer";
@@ -340,7 +341,7 @@
        << "  '''Interface exported by the server.'''\n"
        << '\n';
 
-    for (const RPCCall *method : service->calls.vec) {
+    for (const RPCCall* method : service->calls.vec) {
       const std::string request_param =
           ClientStreaming(method) ? "request_iterator" : "request";
       ss << "  def " << method->name << "(self, " << request_param
@@ -354,15 +355,15 @@
     ss << '\n';
   }
 
-  void GenerateRegister(std::stringstream &ss, const ServiceDef *service,
-                        Imports *imports) {
+  void GenerateRegister(std::stringstream& ss, const ServiceDef* service,
+                        Imports* imports) {
     imports->Import("grpc");
 
     ss << "def add_" << service->name
        << "Servicer_to_server(servicer, server):\n"
        << "  rpc_method_handlers = {\n";
 
-    for (const RPCCall *method : service->calls.vec) {
+    for (const RPCCall* method : service->calls.vec) {
       std::string request = namer_.Type(*method->request);
 
       imports->Import(ModuleFor(method->request), request);
@@ -393,15 +394,15 @@
 };
 }  // namespace
 
-bool Generate(const Parser &parser, const std::string &path,
-              const Version &version) {
-  ServiceGenerator generator{ parser, path, version };
+bool Generate(const Parser& parser, const std::string& path,
+              const Version& version) {
+  ServiceGenerator generator{parser, path, version};
   return generator.Generate();
 }
 
-bool GenerateStub(const Parser &parser, const std::string &path,
-                  const Version &version) {
-  StubGenerator generator{ parser, path, version };
+bool GenerateStub(const Parser& parser, const std::string& path,
+                  const Version& version) {
+  StubGenerator generator{parser, path, version};
   return generator.Generate();
 }
 
diff --git a/grpc/src/compiler/python_generator.h b/grpc/src/compiler/python_generator.h
index 6335ecc..5967e1f 100644
--- a/grpc/src/compiler/python_generator.h
+++ b/grpc/src/compiler/python_generator.h
@@ -27,11 +27,11 @@
 namespace flatbuffers {
 namespace python {
 namespace grpc {
-bool Generate(const Parser &parser, const std::string &path,
-              const Version &version);
+bool Generate(const Parser& parser, const std::string& path,
+              const Version& version);
 
-bool GenerateStub(const Parser &parser, const std::string &path,
-                  const Version &version);
+bool GenerateStub(const Parser& parser, const std::string& path,
+                  const Version& version);
 }  // namespace grpc
 }  // namespace python
 }  // namespace flatbuffers
diff --git a/grpc/src/compiler/swift_generator.cc b/grpc/src/compiler/swift_generator.cc
index ea1fd83..b741415 100644
--- a/grpc/src/compiler/swift_generator.cc
+++ b/grpc/src/compiler/swift_generator.cc
@@ -20,34 +20,35 @@
  * please open an issue in the flatbuffers repository. This file should always
  * be maintained according to the Swift-grpc repository
  */
+#include "src/compiler/swift_generator.h"
+
 #include <map>
 #include <sstream>
 
 #include "flatbuffers/util.h"
 #include "src/compiler/schema_interface.h"
-#include "src/compiler/swift_generator.h"
 
 namespace grpc_swift_generator {
 namespace {
 
-static std::string WrapInNameSpace(const std::vector<std::string> &components,
-                            const grpc::string &name) {
+static std::string WrapInNameSpace(const std::vector<std::string>& components,
+                                   const grpc::string& name) {
   std::string qualified_name;
   for (auto it = components.begin(); it != components.end(); ++it)
     qualified_name += *it + "_";
   return qualified_name + name;
 }
 
-static grpc::string GenerateMessage(const std::vector<std::string> &components,
-                             const grpc::string &name) {
+static grpc::string GenerateMessage(const std::vector<std::string>& components,
+                                    const grpc::string& name) {
   return "Message<" + WrapInNameSpace(components, name) + ">";
 }
 
 // MARK: - Client
 
-static void GenerateClientFuncName(const grpc_generator::Method *method,
-                            grpc_generator::Printer *printer,
-                            std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateClientFuncName(
+    const grpc_generator::Method* method, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   if (method->NoStreaming()) {
     printer->Print(vars,
@@ -83,9 +84,9 @@
                  "  ) -> BidirectionalStreamingCall<$Input$, $Output$>");
 }
 
-static void GenerateClientFuncBody(const grpc_generator::Method *method,
-                            grpc_generator::Printer *printer,
-                            std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateClientFuncBody(
+    const grpc_generator::Method* method, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   vars["Interceptor"] =
       "interceptors: self.interceptors?.make$MethodName$Interceptors() ?? []";
@@ -133,9 +134,9 @@
                  "    )\n");
 }
 
-void GenerateClientProtocol(const grpc_generator::Service *service,
-                            grpc_generator::Printer *printer,
-                            std::map<grpc::string, grpc::string> *dictonary) {
+void GenerateClientProtocol(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(
       vars,
@@ -207,8 +208,8 @@
   printer->Print("}\n\n");
 }
 
-void GenerateClientClass(grpc_generator::Printer *printer,
-                         std::map<grpc::string, grpc::string> *dictonary) {
+void GenerateClientClass(grpc_generator::Printer* printer,
+                         std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars,
                  "$ACCESS$ final class $ServiceQualifiedName$ServiceClient: "
@@ -237,7 +238,7 @@
 
 // MARK: - Server
 
-grpc::string GenerateServerFuncName(const grpc_generator::Method *method) {
+grpc::string GenerateServerFuncName(const grpc_generator::Method* method) {
   if (method->NoStreaming()) {
     return "func $MethodName$(request: $Input$"
            ", context: StatusOnlyCallContext) -> EventLoopFuture<$Output$>";
@@ -258,7 +259,7 @@
          "-> EventLoopFuture<(StreamEvent<$Input$>) -> Void>";
 }
 
-grpc::string GenerateServerExtensionBody(const grpc_generator::Method *method) {
+grpc::string GenerateServerExtensionBody(const grpc_generator::Method* method) {
   grpc::string start = "    case \"$MethodName$\":\n    ";
   grpc::string interceptors =
       "      interceptors: self.interceptors?.make$MethodName$Interceptors() "
@@ -302,9 +303,9 @@
   return "";
 }
 
-void GenerateServerProtocol(const grpc_generator::Service *service,
-                            grpc_generator::Printer *printer,
-                            std::map<grpc::string, grpc::string> *dictonary) {
+void GenerateServerProtocol(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars,
                  "$ACCESS$ protocol $ServiceQualifiedName$Provider: "
@@ -373,14 +374,16 @@
   }
   printer->Print("}");
 }
-} // namespace
+}  // namespace
 
-grpc::string Generate(grpc_generator::File *file,
-                      const grpc_generator::Service *service) {
+grpc::string Generate(grpc_generator::File* file,
+                      const grpc_generator::Service* service) {
   grpc::string output;
   std::map<grpc::string, grpc::string> vars;
   vars["PATH"] = file->package();
-  if (!file->package().empty()) { vars["PATH"].append("."); }
+  if (!file->package().empty()) {
+    vars["PATH"].append(".");
+  }
   vars["ServiceQualifiedName"] =
       WrapInNameSpace(service->namespace_parts(), service->name());
   vars["ServiceName"] = service->name();
diff --git a/grpc/src/compiler/swift_generator.h b/grpc/src/compiler/swift_generator.h
index 2a226fa..fea1a31 100644
--- a/grpc/src/compiler/swift_generator.h
+++ b/grpc/src/compiler/swift_generator.h
@@ -20,8 +20,8 @@
 #include "src/compiler/schema_interface.h"
 
 #ifndef GRPC_CUSTOM_STRING
-#  include <string>
-#  define GRPC_CUSTOM_STRING std::string
+#include <string>
+#define GRPC_CUSTOM_STRING std::string
 #endif
 
 namespace grpc {
@@ -31,7 +31,7 @@
 }  // namespace grpc
 
 namespace grpc_swift_generator {
-grpc::string Generate(grpc_generator::File *file,
-                      const grpc_generator::Service *service);
+grpc::string Generate(grpc_generator::File* file,
+                      const grpc_generator::Service* service);
 grpc::string GenerateHeader();
 }  // namespace grpc_swift_generator
diff --git a/grpc/src/compiler/ts_generator.cc b/grpc/src/compiler/ts_generator.cc
index ff362b7..a578988 100644
--- a/grpc/src/compiler/ts_generator.cc
+++ b/grpc/src/compiler/ts_generator.cc
@@ -33,8 +33,8 @@
 namespace {
 
 static grpc::string GenerateNamespace(const std::vector<std::string> ns,
-                               const std::string filename,
-                               const bool include_separator) {
+                                      const std::string filename,
+                                      const bool include_separator) {
   grpc::string path = "";
   if (include_separator) path += ".";
 
@@ -56,10 +56,10 @@
 
 // MARK: - Shared code
 
-static void GenerateImports(const grpc_generator::Service *service,
-                     grpc_generator::Printer *printer,
-                     std::map<grpc::string, grpc::string> *dictonary,
-                     const bool grpc_var_import) {
+static void GenerateImports(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string>* dictonary,
+                            const bool grpc_var_import) {
   auto vars = *dictonary;
   printer->Print(
       "// Generated GRPC code for FlatBuffers TS *** DO NOT EDIT ***\n");
@@ -105,9 +105,9 @@
 
 // MARK: - Generate Main GRPC Code
 
-static void GetStreamType(grpc_generator::Printer *printer,
-                   const grpc_generator::Method *method,
-                   std::map<grpc::string, grpc::string> *dictonary) {
+static void GetStreamType(grpc_generator::Printer* printer,
+                          const grpc_generator::Method* method,
+                          std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   auto client_streaming = method->ClientStreaming() || method->BidiStreaming();
   auto server_streaming = method->ServerStreaming() || method->BidiStreaming();
@@ -117,8 +117,9 @@
   printer->Print(vars, "responseStream: $ServerStreaming$,\n");
 }
 
-static void GenerateSerializeMethod(grpc_generator::Printer *printer,
-                             std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateSerializeMethod(
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars, "function serialize_$Type$(buffer_args) {\n");
   printer->Indent();
@@ -134,8 +135,8 @@
 }
 
 static void GenerateDeserializeMethod(
-    grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars, "function deserialize_$Type$(buffer) {\n");
   printer->Indent();
@@ -146,9 +147,9 @@
   printer->Print("}\n\n");
 }
 
-static void GenerateMethods(const grpc_generator::Service *service,
-                     grpc_generator::Printer *printer,
-                     std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateMethods(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
 
   std::set<grpc::string> generated_functions;
@@ -178,9 +179,9 @@
   }
 }
 
-static void GenerateService(const grpc_generator::Service *service,
-                     grpc_generator::Printer *printer,
-                     std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateService(const grpc_generator::Service* service,
+                            grpc_generator::Printer* printer,
+                            std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   vars["NAME"] = service->name() + "Service";
 
@@ -213,17 +214,19 @@
                  "grpc.makeGenericClientConstructor($NAME$);");
 }
 
-} // namespace
+}  // namespace
 
-grpc::string Generate(grpc_generator::File *file,
-                      const grpc_generator::Service *service,
-                      const grpc::string &filename) {
+grpc::string Generate(grpc_generator::File* file,
+                      const grpc_generator::Service* service,
+                      const grpc::string& filename) {
   grpc::string output;
   std::map<grpc::string, grpc::string> vars;
 
   vars["PATH"] = file->package();
 
-  if (!file->package().empty()) { vars["PATH"].append("."); }
+  if (!file->package().empty()) {
+    vars["PATH"].append(".");
+  }
 
   vars["ServiceName"] = service->name();
   vars["FBSFile"] = service->name() + "_fbs";
@@ -240,8 +243,8 @@
 
 // MARK: - Generate Interface
 
-static void FillInterface(grpc_generator::Printer *printer,
-                   std::map<grpc::string, grpc::string> *dictonary) {
+static void FillInterface(grpc_generator::Printer* printer,
+                          std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars,
                  "interface I$ServiceName$Service_I$MethodName$ extends "
@@ -258,9 +261,9 @@
   printer->Print("}\n");
 }
 
-static void GenerateInterfaces(const grpc_generator::Service *service,
-                        grpc_generator::Printer *printer,
-                        std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateInterfaces(
+    const grpc_generator::Service* service, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   for (auto it = 0; it < service->method_count(); it++) {
     auto method = service->method(it);
@@ -281,8 +284,8 @@
 }
 
 static void GenerateExportedInterface(
-    const grpc_generator::Service *service, grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    const grpc_generator::Service* service, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars,
                  "export interface I$ServiceName$Server extends "
@@ -324,9 +327,9 @@
   printer->Print("}\n");
 }
 
-static void GenerateMainInterface(const grpc_generator::Service *service,
-                           grpc_generator::Printer *printer,
-                           std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateMainInterface(
+    const grpc_generator::Service* service, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(
       vars,
@@ -351,11 +354,13 @@
 
 static grpc::string GenerateMetaData() { return "metadata: grpc.Metadata"; }
 
-static grpc::string GenerateOptions() { return "options: Partial<grpc.CallOptions>"; }
+static grpc::string GenerateOptions() {
+  return "options: Partial<grpc.CallOptions>";
+}
 
 static void GenerateUnaryClientInterface(
-    grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   grpc::string main = "$ISPUBLIC$$MethodName$(request: $INPUT$, ";
   grpc::string callback =
@@ -369,8 +374,8 @@
 }
 
 static void GenerateClientWriteStreamInterface(
-    grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   grpc::string main = "$ISPUBLIC$$MethodName$(";
   grpc::string callback =
@@ -386,8 +391,8 @@
 }
 
 static void GenerateClientReadableStreamInterface(
-    grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   grpc::string main = "$ISPUBLIC$$MethodName$(request: $INPUT$, ";
   grpc::string end_function = "): grpc.ClientReadableStream<$OUTPUT$>;\n";
@@ -398,8 +403,8 @@
 }
 
 static void GenerateDepluxStreamInterface(
-    grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   grpc::string main = "$ISPUBLIC$$MethodName$(";
   grpc::string end_function =
@@ -413,9 +418,9 @@
                            .c_str());
 }
 
-static void GenerateClientInterface(const grpc_generator::Service *service,
-                             grpc_generator::Printer *printer,
-                             std::map<grpc::string, grpc::string> *dictonary) {
+static void GenerateClientInterface(
+    const grpc_generator::Service* service, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars, "export interface I$ServiceName$Client {\n");
   printer->Indent();
@@ -452,8 +457,8 @@
 }
 
 static void GenerateClientClassInterface(
-    const grpc_generator::Service *service, grpc_generator::Printer *printer,
-    std::map<grpc::string, grpc::string> *dictonary) {
+    const grpc_generator::Service* service, grpc_generator::Printer* printer,
+    std::map<grpc::string, grpc::string>* dictonary) {
   auto vars = *dictonary;
   printer->Print(vars,
                  "export class $ServiceName$Client extends grpc.Client "
@@ -492,12 +497,11 @@
   printer->Outdent();
   printer->Print("}\n");
 }
-} // namespace
+}  // namespace
 
-
-grpc::string GenerateInterface(grpc_generator::File *file,
-                               const grpc_generator::Service *service,
-                               const grpc::string &filename) {
+grpc::string GenerateInterface(grpc_generator::File* file,
+                               const grpc_generator::Service* service,
+                               const grpc::string& filename) {
   grpc::string output;
 
   std::set<grpc::string> generated_functions;
@@ -505,7 +509,9 @@
 
   vars["PATH"] = file->package();
 
-  if (!file->package().empty()) { vars["PATH"].append("."); }
+  if (!file->package().empty()) {
+    vars["PATH"].append(".");
+  }
 
   vars["ServiceName"] = service->name();
   vars["FBSFile"] = service->name() + "_fbs";
diff --git a/grpc/src/compiler/ts_generator.h b/grpc/src/compiler/ts_generator.h
index a356659..655fc8e 100644
--- a/grpc/src/compiler/ts_generator.h
+++ b/grpc/src/compiler/ts_generator.h
@@ -5,8 +5,8 @@
 #include "src/compiler/schema_interface.h"
 
 #ifndef GRPC_CUSTOM_STRING
-#  include <string>
-#  define GRPC_CUSTOM_STRING std::string
+#include <string>
+#define GRPC_CUSTOM_STRING std::string
 #endif
 
 namespace grpc {
@@ -16,11 +16,11 @@
 }  // namespace grpc
 
 namespace grpc_ts_generator {
-grpc::string Generate(grpc_generator::File *file,
-                      const grpc_generator::Service *service,
-                      const grpc::string &filename);
+grpc::string Generate(grpc_generator::File* file,
+                      const grpc_generator::Service* service,
+                      const grpc::string& filename);
 
-grpc::string GenerateInterface(grpc_generator::File *file,
-                               const grpc_generator::Service *service,
-                               const grpc::string &filename);
+grpc::string GenerateInterface(grpc_generator::File* file,
+                               const grpc_generator::Service* service,
+                               const grpc::string& filename);
 }  // namespace grpc_ts_generator
diff --git a/grpc/tests/GameFactory.java b/grpc/tests/GameFactory.java
index 520ae39..87e792b 100644
--- a/grpc/tests/GameFactory.java
+++ b/grpc/tests/GameFactory.java
@@ -1,10 +1,11 @@
-import java.nio.ByteBuffer;
 import MyGame.Example.Monster;
 import MyGame.Example.Stat;
 import com.google.flatbuffers.FlatBufferBuilder;
+import java.nio.ByteBuffer;
 
 class GameFactory {
-  public static Monster createMonster(String monsterName, short nestedMonsterHp, short nestedMonsterMana) {
+  public static Monster createMonster(
+      String monsterName, short nestedMonsterHp, short nestedMonsterMana) {
     FlatBufferBuilder builder = new FlatBufferBuilder();
 
     int name_offset = builder.createString(monsterName);
@@ -31,12 +32,11 @@
     return monster;
   }
 
-  public static Stat createStat(String greeting, long val, int count) { 
+  public static Stat createStat(String greeting, long val, int count) {
     FlatBufferBuilder builder = new FlatBufferBuilder();
     int statOffset = Stat.createStat(builder, builder.createString(greeting), val, count);
     builder.finish(statOffset);
     Stat stat = Stat.getRootAsStat(builder.dataBuffer());
     return stat;
   }
-
 }
diff --git a/grpc/tests/JavaGrpcTest.java b/grpc/tests/JavaGrpcTest.java
index 2732911..3bce08e 100644
--- a/grpc/tests/JavaGrpcTest.java
+++ b/grpc/tests/JavaGrpcTest.java
@@ -17,226 +17,236 @@
 import MyGame.Example.Monster;
 import MyGame.Example.MonsterStorageGrpc;
 import MyGame.Example.Stat;
-import com.google.flatbuffers.FlatBufferBuilder;
 import io.grpc.ManagedChannel;
 import io.grpc.ManagedChannelBuilder;
 import io.grpc.Server;
 import io.grpc.ServerBuilder;
 import io.grpc.stub.StreamObserver;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 import org.junit.Assert;
 
-import java.io.IOException;
-import java.lang.InterruptedException;
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.CountDownLatch;
-
-
-/**
- * Demonstrates basic client-server interaction using grpc-java over netty.
- */
+/** Demonstrates basic client-server interaction using grpc-java over netty. */
 public class JavaGrpcTest {
-    static final String BIG_MONSTER_NAME = "Cyberdemon";
-    static final short nestedMonsterHp = 600;
-    static final short nestedMonsterMana = 1024;
-    static final int numStreamedMsgs = 10;
-    static final int timeoutMs = 3000;
-    static Server server;
-    static ManagedChannel channel;
-    static MonsterStorageGrpc.MonsterStorageBlockingStub blockingStub;
-    static MonsterStorageGrpc.MonsterStorageStub asyncStub;
+  static final String BIG_MONSTER_NAME = "Cyberdemon";
+  static final short nestedMonsterHp = 600;
+  static final short nestedMonsterMana = 1024;
+  static final int numStreamedMsgs = 10;
+  static final int timeoutMs = 3000;
+  static Server server;
+  static ManagedChannel channel;
+  static MonsterStorageGrpc.MonsterStorageBlockingStub blockingStub;
+  static MonsterStorageGrpc.MonsterStorageStub asyncStub;
 
-    static class MyService extends MonsterStorageGrpc.MonsterStorageImplBase {
-        @Override
-        public void store(Monster request, io.grpc.stub.StreamObserver<Stat> responseObserver) {
-            Assert.assertEquals(request.name(), BIG_MONSTER_NAME);
-            Assert.assertEquals(request.hp(), nestedMonsterHp);
-            Assert.assertEquals(request.mana(), nestedMonsterMana);
-            System.out.println("Received store request from " + request.name());
-            // Create a response from the incoming request name.
-            Stat stat = GameFactory.createStat("Hello " + request.name(), 100, 10);
-            responseObserver.onNext(stat);
-            responseObserver.onCompleted();
-        }
-
-        @Override
-        public void retrieve(Stat request, io.grpc.stub.StreamObserver<Monster> responseObserver) {
-            // Create 10 monsters for streaming response.
-            for (int i=0; i<numStreamedMsgs; i++) {
-                Monster monster = GameFactory.createMonsterFromStat(request, i);
-                responseObserver.onNext(monster);
-            }
-            responseObserver.onCompleted();
-        }
-
-        @Override
-        public StreamObserver<Monster> getMaxHitPoint(final StreamObserver<Stat> responseObserver) {
-          return computeMinMax(responseObserver, false);
-        }
-
-        @Override
-        public StreamObserver<Monster> getMinMaxHitPoints(final StreamObserver<Stat> responseObserver) {
-          return computeMinMax(responseObserver, true);
-        }
-
-        private StreamObserver<Monster> computeMinMax(final StreamObserver<Stat> responseObserver, final boolean includeMin) {
-          final AtomicInteger maxHp = new AtomicInteger(Integer.MIN_VALUE);
-          final AtomicReference<String> maxHpMonsterName = new AtomicReference<String>();
-          final AtomicInteger maxHpCount = new AtomicInteger();
-
-          final AtomicInteger minHp = new AtomicInteger(Integer.MAX_VALUE);
-          final AtomicReference<String> minHpMonsterName = new AtomicReference<String>();
-          final AtomicInteger minHpCount = new AtomicInteger();
-
-          return new StreamObserver<Monster>() {
-            public void onNext(Monster monster) {
-              if (monster.hp() > maxHp.get()) {
-                // Found a monster of higher hit points.
-                maxHp.set(monster.hp());
-                maxHpMonsterName.set(monster.name());
-                maxHpCount.set(1);
-              }
-              else if (monster.hp() == maxHp.get()) {
-                // Count how many times we saw a monster of current max hit points.
-                maxHpCount.getAndIncrement();
-              }
-
-              if (monster.hp() < minHp.get()) {
-                // Found a monster of a lower hit points.
-                minHp.set(monster.hp());
-                minHpMonsterName.set(monster.name());
-                minHpCount.set(1);
-              }
-              else if (monster.hp() == minHp.get()) {
-                // Count how many times we saw a monster of current min hit points.
-                minHpCount.getAndIncrement();
-              }
-            }
-            public void onCompleted() {
-              Stat maxHpStat = GameFactory.createStat(maxHpMonsterName.get(), maxHp.get(), maxHpCount.get());
-              // Send max hit points first.
-              responseObserver.onNext(maxHpStat);
-              if (includeMin) {
-                // Send min hit points.
-                Stat minHpStat = GameFactory.createStat(minHpMonsterName.get(), minHp.get(), minHpCount.get());
-                responseObserver.onNext(minHpStat);
-              }
-              responseObserver.onCompleted();
-            }
-            public void onError(Throwable t) {
-              // Not expected
-              Assert.fail();
-            };
-          };
-        }
+  static class MyService extends MonsterStorageGrpc.MonsterStorageImplBase {
+    @Override
+    public void store(Monster request, io.grpc.stub.StreamObserver<Stat> responseObserver) {
+      Assert.assertEquals(request.name(), BIG_MONSTER_NAME);
+      Assert.assertEquals(request.hp(), nestedMonsterHp);
+      Assert.assertEquals(request.mana(), nestedMonsterMana);
+      System.out.println("Received store request from " + request.name());
+      // Create a response from the incoming request name.
+      Stat stat = GameFactory.createStat("Hello " + request.name(), 100, 10);
+      responseObserver.onNext(stat);
+      responseObserver.onCompleted();
     }
 
-    @org.junit.BeforeClass
-    public static void startServer() throws IOException {
-        server = ServerBuilder.forPort(0).addService(new MyService()).build().start();
-        int port = server.getPort();
-        channel = ManagedChannelBuilder.forAddress("localhost", port)
-                // Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
-                // needing certificates.
-                .usePlaintext()
-                .directExecutor()
-                .build();
-        blockingStub = MonsterStorageGrpc.newBlockingStub(channel);
-        asyncStub = MonsterStorageGrpc.newStub(channel);
-    }
-
-    @org.junit.Test
-    public void testUnary() throws IOException {
-        Monster monsterRequest = GameFactory.createMonster(BIG_MONSTER_NAME, nestedMonsterHp, nestedMonsterMana);
-        Stat stat = blockingStub.store(monsterRequest);
-        Assert.assertEquals(stat.id(), "Hello " + BIG_MONSTER_NAME);
-        System.out.println("Received stat response from service: " + stat.id());
-    }
-
-    @org.junit.Test
-    public void testServerStreaming() throws IOException {
-        Monster monsterRequest = GameFactory.createMonster(BIG_MONSTER_NAME, nestedMonsterHp, nestedMonsterMana);
-        Stat stat = blockingStub.store(monsterRequest);
-        Iterator<Monster> iterator = blockingStub.retrieve(stat);
-        int counter = 0;
-        while(iterator.hasNext()) {
-            Monster m = iterator.next();
-            System.out.println("Received monster " + m.name());
-            counter ++;
-        }
-        Assert.assertEquals(counter, numStreamedMsgs);
-        System.out.println("FlatBuffers GRPC client/server test: completed successfully");
-    }
-
-    @org.junit.Test
-    public void testClientStreaming() throws IOException, InterruptedException {
-      final AtomicReference<Stat> maxHitStat = new AtomicReference<Stat>();
-      final CountDownLatch streamAlive = new CountDownLatch(1);
-
-      StreamObserver<Stat> statObserver = new StreamObserver<Stat>() {
-        public void onCompleted() {
-          streamAlive.countDown();
-        }
-        public void onError(Throwable ex) { }
-        public void onNext(Stat stat) {
-          maxHitStat.set(stat);
-        }
-      };
-      StreamObserver<Monster> monsterStream = asyncStub.getMaxHitPoint(statObserver);
-      short count = 10;
-      for (short i = 0;i < count; ++i) {
-        Monster monster = GameFactory.createMonster(BIG_MONSTER_NAME + i, (short) (nestedMonsterHp * i), nestedMonsterMana);
-        monsterStream.onNext(monster);
+    @Override
+    public void retrieve(Stat request, io.grpc.stub.StreamObserver<Monster> responseObserver) {
+      // Create 10 monsters for streaming response.
+      for (int i = 0; i < numStreamedMsgs; i++) {
+        Monster monster = GameFactory.createMonsterFromStat(request, i);
+        responseObserver.onNext(monster);
       }
-      monsterStream.onCompleted();
-      // Wait a little bit for the server to send the stats of the monster with the max hit-points.
-      streamAlive.await(timeoutMs, TimeUnit.MILLISECONDS);
-      Assert.assertEquals(maxHitStat.get().id(), BIG_MONSTER_NAME + (count - 1));
-      Assert.assertEquals(maxHitStat.get().val(), nestedMonsterHp * (count - 1));
-      Assert.assertEquals(maxHitStat.get().count(), 1);
+      responseObserver.onCompleted();
     }
 
-    @org.junit.Test
-    public void testBiDiStreaming() throws IOException, InterruptedException {
-      final AtomicReference<Stat> maxHitStat = new AtomicReference<Stat>();
-      final AtomicReference<Stat> minHitStat = new AtomicReference<Stat>();
-      final CountDownLatch streamAlive = new CountDownLatch(1);
+    @Override
+    public StreamObserver<Monster> getMaxHitPoint(final StreamObserver<Stat> responseObserver) {
+      return computeMinMax(responseObserver, false);
+    }
 
-      StreamObserver<Stat> statObserver = new StreamObserver<Stat>() {
-        public void onCompleted() {
-          streamAlive.countDown();
+    @Override
+    public StreamObserver<Monster> getMinMaxHitPoints(final StreamObserver<Stat> responseObserver) {
+      return computeMinMax(responseObserver, true);
+    }
+
+    private StreamObserver<Monster> computeMinMax(
+        final StreamObserver<Stat> responseObserver, final boolean includeMin) {
+      final AtomicInteger maxHp = new AtomicInteger(Integer.MIN_VALUE);
+      final AtomicReference<String> maxHpMonsterName = new AtomicReference<String>();
+      final AtomicInteger maxHpCount = new AtomicInteger();
+
+      final AtomicInteger minHp = new AtomicInteger(Integer.MAX_VALUE);
+      final AtomicReference<String> minHpMonsterName = new AtomicReference<String>();
+      final AtomicInteger minHpCount = new AtomicInteger();
+
+      return new StreamObserver<Monster>() {
+        public void onNext(Monster monster) {
+          if (monster.hp() > maxHp.get()) {
+            // Found a monster of higher hit points.
+            maxHp.set(monster.hp());
+            maxHpMonsterName.set(monster.name());
+            maxHpCount.set(1);
+          } else if (monster.hp() == maxHp.get()) {
+            // Count how many times we saw a monster of current max hit points.
+            maxHpCount.getAndIncrement();
+          }
+
+          if (monster.hp() < minHp.get()) {
+            // Found a monster of a lower hit points.
+            minHp.set(monster.hp());
+            minHpMonsterName.set(monster.name());
+            minHpCount.set(1);
+          } else if (monster.hp() == minHp.get()) {
+            // Count how many times we saw a monster of current min hit points.
+            minHpCount.getAndIncrement();
+          }
         }
-        public void onError(Throwable ex) { }
-        public void onNext(Stat stat) {
-          // We expect the server to send the max stat first and then the min stat.
-          if (maxHitStat.get() == null) {
+
+        public void onCompleted() {
+          Stat maxHpStat =
+              GameFactory.createStat(maxHpMonsterName.get(), maxHp.get(), maxHpCount.get());
+          // Send max hit points first.
+          responseObserver.onNext(maxHpStat);
+          if (includeMin) {
+            // Send min hit points.
+            Stat minHpStat =
+                GameFactory.createStat(minHpMonsterName.get(), minHp.get(), minHpCount.get());
+            responseObserver.onNext(minHpStat);
+          }
+          responseObserver.onCompleted();
+        }
+
+        public void onError(Throwable t) {
+          // Not expected
+          Assert.fail();
+        }
+        ;
+      };
+    }
+  }
+
+  @org.junit.BeforeClass
+  public static void startServer() throws IOException {
+    server = ServerBuilder.forPort(0).addService(new MyService()).build().start();
+    int port = server.getPort();
+    channel =
+        ManagedChannelBuilder.forAddress("localhost", port)
+            // Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
+            // needing certificates.
+            .usePlaintext()
+            .directExecutor()
+            .build();
+    blockingStub = MonsterStorageGrpc.newBlockingStub(channel);
+    asyncStub = MonsterStorageGrpc.newStub(channel);
+  }
+
+  @org.junit.Test
+  public void testUnary() throws IOException {
+    Monster monsterRequest =
+        GameFactory.createMonster(BIG_MONSTER_NAME, nestedMonsterHp, nestedMonsterMana);
+    Stat stat = blockingStub.store(monsterRequest);
+    Assert.assertEquals(stat.id(), "Hello " + BIG_MONSTER_NAME);
+    System.out.println("Received stat response from service: " + stat.id());
+  }
+
+  @org.junit.Test
+  public void testServerStreaming() throws IOException {
+    Monster monsterRequest =
+        GameFactory.createMonster(BIG_MONSTER_NAME, nestedMonsterHp, nestedMonsterMana);
+    Stat stat = blockingStub.store(monsterRequest);
+    Iterator<Monster> iterator = blockingStub.retrieve(stat);
+    int counter = 0;
+    while (iterator.hasNext()) {
+      Monster m = iterator.next();
+      System.out.println("Received monster " + m.name());
+      counter++;
+    }
+    Assert.assertEquals(counter, numStreamedMsgs);
+    System.out.println("FlatBuffers GRPC client/server test: completed successfully");
+  }
+
+  @org.junit.Test
+  public void testClientStreaming() throws IOException, InterruptedException {
+    final AtomicReference<Stat> maxHitStat = new AtomicReference<Stat>();
+    final CountDownLatch streamAlive = new CountDownLatch(1);
+
+    StreamObserver<Stat> statObserver =
+        new StreamObserver<Stat>() {
+          public void onCompleted() {
+            streamAlive.countDown();
+          }
+
+          public void onError(Throwable ex) {}
+
+          public void onNext(Stat stat) {
             maxHitStat.set(stat);
           }
-          else {
-            minHitStat.set(stat);
-          }
-        }
-      };
-      StreamObserver<Monster> monsterStream = asyncStub.getMinMaxHitPoints(statObserver);
-      short count = 10;
-      for (short i = 0;i < count; ++i) {
-        Monster monster = GameFactory.createMonster(BIG_MONSTER_NAME + i, (short) (nestedMonsterHp * i), nestedMonsterMana);
-        monsterStream.onNext(monster);
-      }
-      monsterStream.onCompleted();
-
-      // Wait a little bit for the server to send the stats of the monster with the max and min hit-points.
-      streamAlive.await(timeoutMs, TimeUnit.MILLISECONDS);
-
-      Assert.assertEquals(maxHitStat.get().id(), BIG_MONSTER_NAME + (count - 1));
-      Assert.assertEquals(maxHitStat.get().val(), nestedMonsterHp * (count - 1));
-      Assert.assertEquals(maxHitStat.get().count(), 1);
-
-      Assert.assertEquals(minHitStat.get().id(), BIG_MONSTER_NAME + 0);
-      Assert.assertEquals(minHitStat.get().val(), nestedMonsterHp * 0);
-      Assert.assertEquals(minHitStat.get().count(), 1);
+        };
+    StreamObserver<Monster> monsterStream = asyncStub.getMaxHitPoint(statObserver);
+    short count = 10;
+    for (short i = 0; i < count; ++i) {
+      Monster monster =
+          GameFactory.createMonster(
+              BIG_MONSTER_NAME + i, (short) (nestedMonsterHp * i), nestedMonsterMana);
+      monsterStream.onNext(monster);
     }
+    monsterStream.onCompleted();
+    // Wait a little bit for the server to send the stats of the monster with the max hit-points.
+    streamAlive.await(timeoutMs, TimeUnit.MILLISECONDS);
+    Assert.assertEquals(maxHitStat.get().id(), BIG_MONSTER_NAME + (count - 1));
+    Assert.assertEquals(maxHitStat.get().val(), nestedMonsterHp * (count - 1));
+    Assert.assertEquals(maxHitStat.get().count(), 1);
+  }
+
+  @org.junit.Test
+  public void testBiDiStreaming() throws IOException, InterruptedException {
+    final AtomicReference<Stat> maxHitStat = new AtomicReference<Stat>();
+    final AtomicReference<Stat> minHitStat = new AtomicReference<Stat>();
+    final CountDownLatch streamAlive = new CountDownLatch(1);
+
+    StreamObserver<Stat> statObserver =
+        new StreamObserver<Stat>() {
+          public void onCompleted() {
+            streamAlive.countDown();
+          }
+
+          public void onError(Throwable ex) {}
+
+          public void onNext(Stat stat) {
+            // We expect the server to send the max stat first and then the min stat.
+            if (maxHitStat.get() == null) {
+              maxHitStat.set(stat);
+            } else {
+              minHitStat.set(stat);
+            }
+          }
+        };
+    StreamObserver<Monster> monsterStream = asyncStub.getMinMaxHitPoints(statObserver);
+    short count = 10;
+    for (short i = 0; i < count; ++i) {
+      Monster monster =
+          GameFactory.createMonster(
+              BIG_MONSTER_NAME + i, (short) (nestedMonsterHp * i), nestedMonsterMana);
+      monsterStream.onNext(monster);
+    }
+    monsterStream.onCompleted();
+
+    // Wait a little bit for the server to send the stats of the monster with the max and min
+    // hit-points.
+    streamAlive.await(timeoutMs, TimeUnit.MILLISECONDS);
+
+    Assert.assertEquals(maxHitStat.get().id(), BIG_MONSTER_NAME + (count - 1));
+    Assert.assertEquals(maxHitStat.get().val(), nestedMonsterHp * (count - 1));
+    Assert.assertEquals(maxHitStat.get().count(), 1);
+
+    Assert.assertEquals(minHitStat.get().id(), BIG_MONSTER_NAME + 0);
+    Assert.assertEquals(minHitStat.get().val(), nestedMonsterHp * 0);
+    Assert.assertEquals(minHitStat.get().count(), 1);
+  }
 }
diff --git a/grpc/tests/grpctest.py b/grpc/tests/grpctest.py
index 9cfeda6..f2ff261 100644
--- a/grpc/tests/grpctest.py
+++ b/grpc/tests/grpctest.py
@@ -1,13 +1,13 @@
 from __future__ import print_function
 
+from concurrent import futures
 import os
 import sys
-import grpc
+
 import flatbuffers
+import grpc
 
-from concurrent import futures
-
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'tests'))
+sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "tests"))
 import MyGame.Example.Monster as Monster
 import MyGame.Example.Stat as Stat
 import MyGame.Example.Vec3 as Vec3
@@ -39,136 +39,138 @@
 
 class MonsterStorage(monster_grpc_fb.MonsterStorageServicer):
 
-    def Store(self, request, context):
+  def Store(self, request, context):
 
-        m = Monster.Monster().GetRootAsMonster(request, 0)
+    m = Monster.Monster().GetRootAsMonster(request, 0)
 
-        assert m.Name().decode("utf-8") == test_monster_name1
+    assert m.Name().decode("utf-8") == test_monster_name1
 
-        assert m.Pos().X() == test_X
-        assert m.Pos().Y() == test_Y
-        assert m.Pos().Z() == test_Z
-        assert m.Pos().Test1() == test_test1
-        assert m.Pos().Test2() == test_color
-        test3 = Test.Test()
-        assert m.Pos().Test3(test3).A() == test_a
-        assert m.Pos().Test3(test3).B() == test_b
+    assert m.Pos().X() == test_X
+    assert m.Pos().Y() == test_Y
+    assert m.Pos().Z() == test_Z
+    assert m.Pos().Test1() == test_test1
+    assert m.Pos().Test2() == test_color
+    test3 = Test.Test()
+    assert m.Pos().Test3(test3).A() == test_a
+    assert m.Pos().Test3(test3).B() == test_b
 
-        assert m.Hp() == test_hp
+    assert m.Hp() == test_hp
 
-        assert m.Color() == test_color
+    assert m.Color() == test_color
 
-        assert m.InventoryLength() == len(test_inventory)
-        for i in range(0, len(test_inventory)):
-            assert m.Inventory(i) == test_inventory[len(test_inventory)-i -1]
+    assert m.InventoryLength() == len(test_inventory)
+    for i in range(0, len(test_inventory)):
+      assert m.Inventory(i) == test_inventory[len(test_inventory) - i - 1]
 
-        assert m.TestType() == test_testtype
+    assert m.TestType() == test_testtype
 
-        assert m.Test() is not None
-        table = m.Test()
+    assert m.Test() is not None
+    table = m.Test()
 
-        m2 = Monster.Monster()
-        m2.Init(table.Bytes, table.Pos)
-        assert m2.Name().decode("utf-8") == test_monster_name2
+    m2 = Monster.Monster()
+    m2.Init(table.Bytes, table.Pos)
+    assert m2.Name().decode("utf-8") == test_monster_name2
 
-        m3 = m.Enemy()
-        assert m3.Name().decode("utf-8") == test_monster_name2
+    m3 = m.Enemy()
+    assert m3.Name().decode("utf-8") == test_monster_name2
 
-        assert m.Testarrayofstring(0).decode("utf-8") == test_string
+    assert m.Testarrayofstring(0).decode("utf-8") == test_string
 
-        b = flatbuffers.Builder(0)
-        i = b.CreateString(test_stat_id)
-        Stat.StatStart(b)
-        Stat.StatAddId(b, i)
-        Stat.StatAddVal(b, test_stat_val)
-        Stat.StatAddCount(b, test_stat_count)
-        b.Finish(Stat.StatEnd(b))
-        return bytes(b.Output())
+    b = flatbuffers.Builder(0)
+    i = b.CreateString(test_stat_id)
+    Stat.StatStart(b)
+    Stat.StatAddId(b, i)
+    Stat.StatAddVal(b, test_stat_val)
+    Stat.StatAddCount(b, test_stat_count)
+    b.Finish(Stat.StatEnd(b))
+    return bytes(b.Output())
 
-    def Retrieve(self, request, context):
+  def Retrieve(self, request, context):
 
-        s = Stat.Stat().GetRootAsStat(request, 0)
+    s = Stat.Stat().GetRootAsStat(request, 0)
 
-        no_of_monsters = test_no_of_monsters
-        for i in range(0, no_of_monsters):
-            b = flatbuffers.Builder(0)
-            i = b.CreateString(test_monsters_name_retrieve[i])
-            Monster.MonsterStart(b)
-            Monster.MonsterAddName(b, i)
-            b.Finish(Monster.MonsterEnd(b))
-            yield bytes(b.Output())
+    no_of_monsters = test_no_of_monsters
+    for i in range(0, no_of_monsters):
+      b = flatbuffers.Builder(0)
+      i = b.CreateString(test_monsters_name_retrieve[i])
+      Monster.MonsterStart(b)
+      Monster.MonsterAddName(b, i)
+      b.Finish(Monster.MonsterEnd(b))
+      yield bytes(b.Output())
 
 
 def serve():
 
-    server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
-    monster_grpc_fb.add_MonsterStorageServicer_to_server(MonsterStorage(), server)
-    server.add_insecure_port('[::]:50051')
+  server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+  monster_grpc_fb.add_MonsterStorageServicer_to_server(MonsterStorage(), server)
+  server.add_insecure_port("[::]:50051")
 
-    server.start()
+  server.start()
 
-    run()
+  run()
 
 
 def run():
 
-    channel = grpc.insecure_channel('127.0.0.1:50051')
-    stub = monster_grpc_fb.MonsterStorageStub(channel)
+  channel = grpc.insecure_channel("127.0.0.1:50051")
+  stub = monster_grpc_fb.MonsterStorageStub(channel)
 
-    b = flatbuffers.Builder(0)
-    name2 = b.CreateString(test_monster_name2)
-    name1 = b.CreateString(test_monster_name1)
-    Monster.MonsterStart(b)
-    Monster.MonsterAddName(b, name2)
-    monster2 = Monster.MonsterEnd(b)
-    test1 = b.CreateString(test_string)
+  b = flatbuffers.Builder(0)
+  name2 = b.CreateString(test_monster_name2)
+  name1 = b.CreateString(test_monster_name1)
+  Monster.MonsterStart(b)
+  Monster.MonsterAddName(b, name2)
+  monster2 = Monster.MonsterEnd(b)
+  test1 = b.CreateString(test_string)
 
-    Monster.MonsterStartInventoryVector(b, len(test_inventory))
-    for i in range(0, len(test_inventory)):
-        b.PrependByte(test_inventory[i])
-    inv = b.EndVector()
+  Monster.MonsterStartInventoryVector(b, len(test_inventory))
+  for i in range(0, len(test_inventory)):
+    b.PrependByte(test_inventory[i])
+  inv = b.EndVector()
 
-    Monster.MonsterStartTest4Vector(b, 2)
-    Test.CreateTest(b, 10, 20)
-    Test.CreateTest(b, 30, 40)
-    test4 = b.EndVector()
+  Monster.MonsterStartTest4Vector(b, 2)
+  Test.CreateTest(b, 10, 20)
+  Test.CreateTest(b, 30, 40)
+  test4 = b.EndVector()
 
-    Monster.MonsterStartTestarrayofstringVector(b, 1)
-    b.PrependUOffsetTRelative(test1)
-    test_array_of_string = b.EndVector()
+  Monster.MonsterStartTestarrayofstringVector(b, 1)
+  b.PrependUOffsetTRelative(test1)
+  test_array_of_string = b.EndVector()
 
-    Monster.MonsterStart(b)
+  Monster.MonsterStart(b)
 
-    Monster.MonsterAddHp(b, test_hp)
-    Monster.MonsterAddName(b, name1)
-    Monster.MonsterAddColor(b, test_color)
-    pos = Vec3.CreateVec3(b, test_X, test_Y, test_Z, test_test1, test_color, test_a, test_b)
-    Monster.MonsterAddPos(b, pos)
-    Monster.MonsterAddInventory(b, inv)
-    Monster.MonsterAddTestType(b, test_testtype)
-    Monster.MonsterAddTest(b, monster2)
-    Monster.MonsterAddTest4(b, test4)
-    Monster.MonsterAddEnemy(b, monster2)
-    Monster.MonsterAddTestarrayofstring(b, test_array_of_string)
-    monster = Monster.MonsterEnd(b)
+  Monster.MonsterAddHp(b, test_hp)
+  Monster.MonsterAddName(b, name1)
+  Monster.MonsterAddColor(b, test_color)
+  pos = Vec3.CreateVec3(
+      b, test_X, test_Y, test_Z, test_test1, test_color, test_a, test_b
+  )
+  Monster.MonsterAddPos(b, pos)
+  Monster.MonsterAddInventory(b, inv)
+  Monster.MonsterAddTestType(b, test_testtype)
+  Monster.MonsterAddTest(b, monster2)
+  Monster.MonsterAddTest4(b, test4)
+  Monster.MonsterAddEnemy(b, monster2)
+  Monster.MonsterAddTestarrayofstring(b, test_array_of_string)
+  monster = Monster.MonsterEnd(b)
 
-    b.Finish(monster)
+  b.Finish(monster)
 
-    stat_response = stub.Store(bytes(b.Output()))
+  stat_response = stub.Store(bytes(b.Output()))
 
-    s = Stat.Stat().GetRootAsStat(stat_response, 0)
+  s = Stat.Stat().GetRootAsStat(stat_response, 0)
 
-    assert s.Id().decode("utf-8") == test_stat_id
-    assert s.Val() == test_stat_val
-    assert s.Count() == test_stat_count
+  assert s.Id().decode("utf-8") == test_stat_id
+  assert s.Val() == test_stat_val
+  assert s.Count() == test_stat_count
 
-    monster_reponses = stub.Retrieve(stat_response)
-    count = 0
-    for monster_reponse in monster_reponses:
-        m = Monster.Monster().GetRootAsMonster(monster_reponse, 0)
-        assert m.Name().decode("utf-8") == test_monsters_name_retrieve[count]
-        count = count + 1
+  monster_reponses = stub.Retrieve(stat_response)
+  count = 0
+  for monster_reponse in monster_reponses:
+    m = Monster.Monster().GetRootAsMonster(monster_reponse, 0)
+    assert m.Name().decode("utf-8") == test_monsters_name_retrieve[count]
+    count = count + 1
 
 
-if __name__ == '__main__':
-    serve()
+if __name__ == "__main__":
+  serve()
diff --git a/include/codegen/idl_namer.h b/include/codegen/idl_namer.h
index dd2fe3b..2aa716e 100644
--- a/include/codegen/idl_namer.h
+++ b/include/codegen/idl_namer.h
@@ -25,69 +25,69 @@
   using Namer::Variable;
   using Namer::Variant;
 
-  std::string Constant(const FieldDef &d) const { return Constant(d.name); }
+  std::string Constant(const FieldDef& d) const { return Constant(d.name); }
 
   // Types are always structs or enums so we can only expose these two
   // overloads.
-  std::string Type(const StructDef &d) const { return Type(d.name); }
-  std::string Type(const EnumDef &d) const { return Type(d.name); }
+  std::string Type(const StructDef& d) const { return Type(d.name); }
+  std::string Type(const EnumDef& d) const { return Type(d.name); }
 
-  std::string Function(const Definition &s) const { return Function(s.name); }
-  std::string Function(const std::string& prefix, const Definition &s) const {
+  std::string Function(const Definition& s) const { return Function(s.name); }
+  std::string Function(const std::string& prefix, const Definition& s) const {
     return Function(prefix + s.name);
   }
 
-  std::string Field(const FieldDef &s) const { return Field(s.name); }
-  std::string Field(const FieldDef &d, const std::string &s) const {
+  std::string Field(const FieldDef& s) const { return Field(s.name); }
+  std::string Field(const FieldDef& d, const std::string& s) const {
     return Field(d.name + "_" + s);
   }
 
-  std::string Variable(const FieldDef &s) const { return Variable(s.name); }
+  std::string Variable(const FieldDef& s) const { return Variable(s.name); }
 
-  std::string Variable(const StructDef &s) const { return Variable(s.name); }
+  std::string Variable(const StructDef& s) const { return Variable(s.name); }
 
-  std::string Variant(const EnumVal &s) const { return Variant(s.name); }
+  std::string Variant(const EnumVal& s) const { return Variant(s.name); }
 
-  std::string EnumVariant(const EnumDef &e, const EnumVal &v) const {
+  std::string EnumVariant(const EnumDef& e, const EnumVal& v) const {
     return Type(e) + config_.enum_variant_seperator + Variant(v);
   }
 
-  std::string ObjectType(const StructDef &d) const {
+  std::string ObjectType(const StructDef& d) const {
     return ObjectType(d.name);
   }
-  std::string ObjectType(const EnumDef &d) const { return ObjectType(d.name); }
+  std::string ObjectType(const EnumDef& d) const { return ObjectType(d.name); }
 
-  std::string Method(const FieldDef &d, const std::string &suffix) const {
+  std::string Method(const FieldDef& d, const std::string& suffix) const {
     return Method(d.name, suffix);
   }
-  std::string Method(const std::string &prefix, const StructDef &d) const {
+  std::string Method(const std::string& prefix, const StructDef& d) const {
     return Method(prefix, d.name);
   }
-  std::string Method(const std::string &prefix, const FieldDef &d) const {
+  std::string Method(const std::string& prefix, const FieldDef& d) const {
     return Method(prefix, d.name);
   }
-  std::string Method(const std::string &prefix, const FieldDef &d,
-                     const std::string &suffix) const {
+  std::string Method(const std::string& prefix, const FieldDef& d,
+                     const std::string& suffix) const {
     return Method(prefix, d.name, suffix);
   }
 
-  std::string Namespace(const struct Namespace &ns) const {
+  std::string Namespace(const struct Namespace& ns) const {
     return Namespace(ns.components);
   }
 
-  std::string NamespacedEnumVariant(const EnumDef &e, const EnumVal &v) const {
+  std::string NamespacedEnumVariant(const EnumDef& e, const EnumVal& v) const {
     return NamespacedString(e.defined_namespace, EnumVariant(e, v));
   }
 
-  std::string NamespacedType(const Definition &def) const {
+  std::string NamespacedType(const Definition& def) const {
     return NamespacedString(def.defined_namespace, Type(def.name));
   }
 
-  std::string NamespacedObjectType(const Definition &def) const {
+  std::string NamespacedObjectType(const Definition& def) const {
     return NamespacedString(def.defined_namespace, ObjectType(def.name));
   }
 
-  std::string Directories(const struct Namespace &ns,
+  std::string Directories(const struct Namespace& ns,
                           SkipDir skips = SkipDir::None,
                           Case input_case = Case::kUpperCamel) const {
     return Directories(ns.components, skips, input_case);
@@ -96,19 +96,19 @@
   // Legacy fields do not really follow the usual config and should be
   // considered for deprecation.
 
-  std::string LegacyRustNativeVariant(const EnumVal &v) const {
+  std::string LegacyRustNativeVariant(const EnumVal& v) const {
     return ConvertCase(EscapeKeyword(v.name), Case::kUpperCamel);
   }
 
-  std::string LegacyRustFieldOffsetName(const FieldDef &field) const {
+  std::string LegacyRustFieldOffsetName(const FieldDef& field) const {
     return "VT_" + ConvertCase(EscapeKeyword(field.name), Case::kAllUpper);
   }
-    std::string LegacyRustUnionTypeOffsetName(const FieldDef &field) const {
-    return "VT_" + ConvertCase(EscapeKeyword(field.name + "_type"), Case::kAllUpper);
+  std::string LegacyRustUnionTypeOffsetName(const FieldDef& field) const {
+    return "VT_" +
+           ConvertCase(EscapeKeyword(field.name + "_type"), Case::kAllUpper);
   }
 
-
-  std::string LegacySwiftVariant(const EnumVal &ev) const {
+  std::string LegacySwiftVariant(const EnumVal& ev) const {
     auto name = ev.name;
     if (isupper(name.front())) {
       std::transform(name.begin(), name.end(), name.begin(), CharToLower);
@@ -117,24 +117,24 @@
   }
 
   // Also used by Kotlin, lol.
-  std::string LegacyJavaMethod2(const std::string &prefix, const StructDef &sd,
-                                const std::string &suffix) const {
+  std::string LegacyJavaMethod2(const std::string& prefix, const StructDef& sd,
+                                const std::string& suffix) const {
     return prefix + sd.name + suffix;
   }
 
-  std::string LegacyKotlinVariant(EnumVal &ev) const {
+  std::string LegacyKotlinVariant(EnumVal& ev) const {
     // Namer assumes the input case is snake case which is wrong...
     return ConvertCase(EscapeKeyword(ev.name), Case::kLowerCamel);
   }
   // Kotlin methods escapes keywords after case conversion but before
   // prefixing and suffixing.
-  std::string LegacyKotlinMethod(const std::string &prefix, const FieldDef &d,
-                                 const std::string &suffix) const {
+  std::string LegacyKotlinMethod(const std::string& prefix, const FieldDef& d,
+                                 const std::string& suffix) const {
     return prefix + ConvertCase(EscapeKeyword(d.name), Case::kUpperCamel) +
            suffix;
   }
-  std::string LegacyKotlinMethod(const std::string &prefix, const StructDef &d,
-                                 const std::string &suffix) const {
+  std::string LegacyKotlinMethod(const std::string& prefix, const StructDef& d,
+                                 const std::string& suffix) const {
     return prefix + ConvertCase(EscapeKeyword(d.name), Case::kUpperCamel) +
            suffix;
   }
@@ -145,17 +145,19 @@
     return "mutate_" + d.name;
   }
 
-  std::string LegacyRustUnionTypeMethod(const FieldDef &d) {
+  std::string LegacyRustUnionTypeMethod(const FieldDef& d) {
     // assert d is a union
     // d should convert case but not escape keywords due to historical reasons
     return ConvertCase(d.name, config_.fields, Case::kLowerCamel) + "_type";
   }
 
  private:
-  std::string NamespacedString(const struct Namespace *ns,
-                               const std::string &str) const {
+  std::string NamespacedString(const struct Namespace* ns,
+                               const std::string& str) const {
     std::string ret;
-    if (ns != nullptr) { ret += Namespace(ns->components); }
+    if (ns != nullptr) {
+      ret += Namespace(ns->components);
+    }
     if (!ret.empty()) ret += config_.namespace_seperator;
     return ret + str;
   }
@@ -163,9 +165,9 @@
 
 // This is a temporary helper function for code generators to call until all
 // flag-overriding logic into flatc.cpp
-inline Namer::Config WithFlagOptions(const Namer::Config &input,
-                                     const IDLOptions &opts,
-                                     const std::string &path) {
+inline Namer::Config WithFlagOptions(const Namer::Config& input,
+                                     const IDLOptions& opts,
+                                     const std::string& path) {
   Namer::Config result = input;
   result.object_prefix = opts.object_prefix;
   result.object_suffix = opts.object_suffix;
diff --git a/include/codegen/namer.h b/include/codegen/namer.h
index e8b4286..e99bf74 100644
--- a/include/codegen/namer.h
+++ b/include/codegen/namer.h
@@ -110,49 +110,49 @@
 
   virtual ~Namer() {}
 
-  template<typename T> std::string Method(const T &s) const {
+  template <typename T>
+  std::string Method(const T& s) const {
     return Method(s.name);
   }
 
-  virtual std::string Method(const std::string &pre,
-                             const std::string &mid,
-                             const std::string &suf) const {
-    return Format(pre + "_" +  mid + "_" + suf, config_.methods);
+  virtual std::string Method(const std::string& pre, const std::string& mid,
+                             const std::string& suf) const {
+    return Format(pre + "_" + mid + "_" + suf, config_.methods);
   }
-  virtual std::string Method(const std::string &pre,
-                             const std::string &suf) const {
+  virtual std::string Method(const std::string& pre,
+                             const std::string& suf) const {
     return Format(pre + "_" + suf, config_.methods);
   }
-  virtual std::string Method(const std::string &s) const {
+  virtual std::string Method(const std::string& s) const {
     return Format(s, config_.methods);
   }
 
-  virtual std::string Constant(const std::string &s) const {
+  virtual std::string Constant(const std::string& s) const {
     return Format(s, config_.constants);
   }
 
-  virtual std::string Function(const std::string &s) const {
+  virtual std::string Function(const std::string& s) const {
     return Format(s, config_.functions);
   }
 
-  virtual std::string Variable(const std::string &s) const {
+  virtual std::string Variable(const std::string& s) const {
     return Format(s, config_.variables);
   }
 
-  template<typename T>
-  std::string Variable(const std::string &p, const T &s) const {
+  template <typename T>
+  std::string Variable(const std::string& p, const T& s) const {
     return Format(p + "_" + s.name, config_.variables);
   }
-  virtual std::string Variable(const std::string &p,
-                               const std::string &s) const {
+  virtual std::string Variable(const std::string& p,
+                               const std::string& s) const {
     return Format(p + "_" + s, config_.variables);
   }
 
-  virtual std::string Namespace(const std::string &s) const {
+  virtual std::string Namespace(const std::string& s) const {
     return Format(s, config_.namespaces);
   }
 
-  virtual std::string Namespace(const std::vector<std::string> &ns) const {
+  virtual std::string Namespace(const std::vector<std::string>& ns) const {
     std::string result;
     for (auto it = ns.begin(); it != ns.end(); it++) {
       if (it != ns.begin()) result += config_.namespace_seperator;
@@ -161,14 +161,14 @@
     return result;
   }
 
-  virtual std::string NamespacedType(const std::vector<std::string> &ns,
-                                     const std::string &s) const {
+  virtual std::string NamespacedType(const std::vector<std::string>& ns,
+                                     const std::string& s) const {
     return (ns.empty() ? "" : (Namespace(ns) + config_.namespace_seperator)) +
            Type(s);
   }
 
   // Returns `filename` with the right casing, suffix, and extension.
-  virtual std::string File(const std::string &filename,
+  virtual std::string File(const std::string& filename,
                            SkipFile skips = SkipFile::None) const {
     const bool skip_suffix = (skips & SkipFile::Suffix) != SkipFile::None;
     const bool skip_ext = (skips & SkipFile::Extension) != SkipFile::None;
@@ -176,8 +176,8 @@
            (skip_suffix ? "" : config_.filename_suffix) +
            (skip_ext ? "" : config_.filename_extension);
   }
-  template<typename T>
-  std::string File(const T &f, SkipFile skips = SkipFile::None) const {
+  template <typename T>
+  std::string File(const T& f, SkipFile skips = SkipFile::None) const {
     return File(f.name, skips);
   }
 
@@ -188,7 +188,7 @@
   // input_case is used to tell how to modify namespace. e.g. kUpperCamel will
   // add a underscode between case changes, so MyGame turns into My_Game
   // (depending also on the output_case).
-  virtual std::string Directories(const std::vector<std::string> &directories,
+  virtual std::string Directories(const std::vector<std::string>& directories,
                                   SkipDir skips = SkipDir::None,
                                   Case input_case = Case::kUpperCamel) const {
     const bool skip_output_path =
@@ -204,7 +204,7 @@
     return result;
   }
 
-  virtual std::string EscapeKeyword(const std::string &name) const {
+  virtual std::string EscapeKeyword(const std::string& name) const {
     if (keywords_.find(name) == keywords_.end()) {
       return name;
     } else {
@@ -212,26 +212,26 @@
     }
   }
 
-  virtual std::string Type(const std::string &s) const {
+  virtual std::string Type(const std::string& s) const {
     return Format(s, config_.types);
   }
-  virtual std::string Type(const std::string &t, const std::string &s) const {
+  virtual std::string Type(const std::string& t, const std::string& s) const {
     return Format(t + "_" + s, config_.types);
   }
 
-  virtual std::string ObjectType(const std::string &s) const {
+  virtual std::string ObjectType(const std::string& s) const {
     return config_.object_prefix + Type(s) + config_.object_suffix;
   }
 
-  virtual std::string Field(const std::string &s) const {
+  virtual std::string Field(const std::string& s) const {
     return Format(s, config_.fields);
   }
 
-  virtual std::string Variant(const std::string &s) const {
+  virtual std::string Variant(const std::string& s) const {
     return Format(s, config_.variants);
   }
 
-  virtual std::string Format(const std::string &s, Case casing) const {
+  virtual std::string Format(const std::string& s, Case casing) const {
     if (config_.escape_keywords == Config::Escape::BeforeConvertingCase) {
       return ConvertCase(EscapeKeyword(s), casing, Case::kLowerCamel);
     } else {
@@ -242,8 +242,8 @@
   // Denamespaces a string (e.g. The.Quick.Brown.Fox) by returning the last part
   // after the `delimiter` (Fox) and placing the rest in `namespace_prefix`
   // (The.Quick.Brown).
-  virtual std::string Denamespace(const std::string &s,
-                                  std::string &namespace_prefix,
+  virtual std::string Denamespace(const std::string& s,
+                                  std::string& namespace_prefix,
                                   const char delimiter = '.') const {
     const size_t pos = s.find_last_of(delimiter);
     if (pos == std::string::npos) {
@@ -255,7 +255,7 @@
   }
 
   // Same as above, but disregards the prefix.
-  virtual std::string Denamespace(const std::string &s,
+  virtual std::string Denamespace(const std::string& s,
                                   const char delimiter = '.') const {
     std::string prefix;
     return Denamespace(s, prefix, delimiter);
diff --git a/include/codegen/python.cc b/include/codegen/python.cc
index ae6c82b..3225371 100644
--- a/include/codegen/python.cc
+++ b/include/codegen/python.cc
@@ -7,7 +7,7 @@
 
 namespace flatbuffers {
 namespace python {
-Version::Version(const std::string &version) {
+Version::Version(const std::string& version) {
   std::stringstream ss(version);
   char dot;
   ss >> major >> dot >> minor >> dot >> micro;
@@ -17,7 +17,7 @@
   return (major == 0 || major == 2 || major == 3) && minor >= 0 && micro >= 0;
 }
 
-std::set<std::string> Keywords(const Version &version) {
+std::set<std::string> Keywords(const Version& version) {
   switch (version.major) {
     case 2:
       // https://docs.python.org/2/reference/lexical_analysis.html#keywords
@@ -44,15 +44,15 @@
   }
 }
 
-const python::Import &python::Imports::Import(const std::string &module) {
+const python::Import& python::Imports::Import(const std::string& module) {
   python::Import import;
   import.module = module;
   imports.push_back(std::move(import));
   return imports.back();
 }
 
-const python::Import &python::Imports::Import(const std::string &module,
-                                              const std::string &name) {
+const python::Import& python::Imports::Import(const std::string& module,
+                                              const std::string& name) {
   python::Import import;
   import.module = module;
   import.name = name;
@@ -60,15 +60,15 @@
   return imports.back();
 }
 
-const python::Import &python::Imports::Export(const std::string &module) {
+const python::Import& python::Imports::Export(const std::string& module) {
   python::Import import;
   import.module = module;
   exports.push_back(std::move(import));
   return exports.back();
 }
 
-const python::Import &python::Imports::Export(const std::string &module,
-                                              const std::string &name) {
+const python::Import& python::Imports::Export(const std::string& module,
+                                              const std::string& name) {
   python::Import import;
   import.module = module;
   import.name = name;
diff --git a/include/codegen/python.h b/include/codegen/python.h
index b79e37c..cc6c241 100644
--- a/include/codegen/python.h
+++ b/include/codegen/python.h
@@ -62,7 +62,7 @@
 //
 // https://docs.python.org/3/faq/general.html#how-does-the-python-version-numbering-scheme-work
 struct Version {
-  explicit Version(const std::string &version);
+  explicit Version(const std::string& version);
 
   bool IsValid() const;
 
@@ -71,7 +71,7 @@
   int16_t micro = 0;
 };
 
-std::set<std::string> Keywords(const Version &version);
+std::set<std::string> Keywords(const Version& version);
 
 struct Import {
   bool IsLocal() const { return module == "."; }
@@ -81,13 +81,13 @@
 };
 
 struct Imports {
-  const python::Import &Import(const std::string &module);
-  const python::Import &Import(const std::string &module,
-                               const std::string &name);
+  const python::Import& Import(const std::string& module);
+  const python::Import& Import(const std::string& module,
+                               const std::string& name);
 
-  const python::Import &Export(const std::string &module);
-  const python::Import &Export(const std::string &module,
-                               const std::string &name);
+  const python::Import& Export(const std::string& module);
+  const python::Import& Export(const std::string& module,
+                               const std::string& name);
 
   std::vector<python::Import> imports;
   std::vector<python::Import> exports;
diff --git a/include/flatbuffers/pch/flatc_pch.h b/include/flatbuffers/pch/flatc_pch.h
index 7713279..abdfded 100644
--- a/include/flatbuffers/pch/flatc_pch.h
+++ b/include/flatbuffers/pch/flatc_pch.h
@@ -18,22 +18,22 @@
 #define FLATBUFFERS_FLATC_PCH_H_
 
 // stl
-#include <cmath>
-#include <sstream>
 #include <cassert>
-#include <unordered_set>
-#include <unordered_map>
-#include <iostream>
+#include <cmath>
 #include <functional>
-#include <set>
+#include <iostream>
 #include <iterator>
+#include <set>
+#include <sstream>
 #include <tuple>
+#include <unordered_map>
+#include <unordered_set>
 
 // flatbuffers
-#include "flatbuffers/pch/pch.h"
 #include "flatbuffers/code_generators.h"
 #include "flatbuffers/flatbuffers.h"
 #include "flatbuffers/flexbuffers.h"
 #include "flatbuffers/idl.h"
+#include "flatbuffers/pch/pch.h"
 
-#endif // FLATBUFFERS_FLATC_PCH_H_
+#endif  // FLATBUFFERS_FLATC_PCH_H_
diff --git a/include/flatbuffers/pch/pch.h b/include/flatbuffers/pch/pch.h
index 804e99e..a7c48ea 100644
--- a/include/flatbuffers/pch/pch.h
+++ b/include/flatbuffers/pch/pch.h
@@ -18,21 +18,21 @@
 #define FLATBUFFERS_PCH_H_
 
 // stl
+#include <algorithm>
 #include <cstdint>
 #include <cstring>
-#include <algorithm>
-#include <list>
-#include <string>
-#include <utility>
 #include <iomanip>
+#include <limits>
+#include <list>
 #include <map>
 #include <memory>
-#include <limits>
 #include <stack>
-#include <vector>
+#include <string>
 #include <type_traits>
+#include <utility>
+#include <vector>
 
 // flatbuffers
 #include "flatbuffers/util.h"
 
-#endif // FLATBUFFERS_PCH_H_
+#endif  // FLATBUFFERS_PCH_H_
diff --git a/java/src/main/java/com/google/flatbuffers/ArrayReadWriteBuf.java b/java/src/main/java/com/google/flatbuffers/ArrayReadWriteBuf.java
index b7573d6..08a6246 100644
--- a/java/src/main/java/com/google/flatbuffers/ArrayReadWriteBuf.java
+++ b/java/src/main/java/com/google/flatbuffers/ArrayReadWriteBuf.java
@@ -3,12 +3,10 @@
 import java.util.Arrays;
 
 /**
- * Implements {@code ReadBuf} using an array of bytes
- * as a backing storage. Using array of bytes are
+ * Implements {@code ReadBuf} using an array of bytes as a backing storage. Using array of bytes are
  * usually faster than {@code ByteBuffer}.
  *
- * This class is not thread-safe, meaning that
- * it must operate on a single thread. Operating from
+ * <p>This class is not thread-safe, meaning that it must operate on a single thread. Operating from
  * multiple thread leads into a undefined behavior
  */
 public class ArrayReadWriteBuf implements ReadWriteBuf {
@@ -51,27 +49,27 @@
 
   @Override
   public short getShort(int index) {
-    return (short) ((buffer[index+ 1] << 8) | (buffer[index] & 0xff));
+    return (short) ((buffer[index + 1] << 8) | (buffer[index] & 0xff));
   }
 
   @Override
   public int getInt(int index) {
-    return (((buffer[index + 3]) << 24) |
-      ((buffer[index + 2] & 0xff) << 16) |
-      ((buffer[index + 1] & 0xff) << 8) |
-      ((buffer[index] & 0xff)));
+    return (((buffer[index + 3]) << 24)
+        | ((buffer[index + 2] & 0xff) << 16)
+        | ((buffer[index + 1] & 0xff) << 8)
+        | ((buffer[index] & 0xff)));
   }
 
   @Override
   public long getLong(int index) {
-    return ((((long) buffer[index++] & 0xff)) |
-      (((long) buffer[index++] & 0xff) << 8) |
-      (((long) buffer[index++] & 0xff) << 16) |
-      (((long) buffer[index++] & 0xff) << 24) |
-      (((long) buffer[index++] & 0xff) << 32) |
-      (((long) buffer[index++] & 0xff) << 40) |
-      (((long) buffer[index++] & 0xff) << 48) |
-      (((long) buffer[index]) << 56));
+    return ((((long) buffer[index++] & 0xff))
+        | (((long) buffer[index++] & 0xff) << 8)
+        | (((long) buffer[index++] & 0xff) << 16)
+        | (((long) buffer[index++] & 0xff) << 24)
+        | (((long) buffer[index++] & 0xff) << 32)
+        | (((long) buffer[index++] & 0xff) << 40)
+        | (((long) buffer[index++] & 0xff) << 48)
+        | (((long) buffer[index]) << 56));
   }
 
   @Override
@@ -94,17 +92,16 @@
     return buffer;
   }
 
-
   @Override
   public void putBoolean(boolean value) {
-      setBoolean(writePos, value);
-      writePos++;
+    setBoolean(writePos, value);
+    writePos++;
   }
 
   @Override
   public void put(byte[] value, int start, int length) {
     set(writePos, value, start, length);
-    writePos+=length;
+    writePos += length;
   }
 
   @Override
@@ -116,36 +113,36 @@
   @Override
   public void putShort(short value) {
     setShort(writePos, value);
-    writePos +=2;
+    writePos += 2;
   }
 
   @Override
   public void putInt(int value) {
     setInt(writePos, value);
-    writePos +=4;
+    writePos += 4;
   }
 
   @Override
   public void putLong(long value) {
     setLong(writePos, value);
-    writePos +=8;
+    writePos += 8;
   }
 
   @Override
   public void putFloat(float value) {
     setFloat(writePos, value);
-    writePos +=4;
+    writePos += 4;
   }
 
   @Override
   public void putDouble(double value) {
     setDouble(writePos, value);
-    writePos +=8;
+    writePos += 8;
   }
 
   @Override
   public void setBoolean(int index, boolean value) {
-    set(index, value ? (byte)1 : (byte)0);
+    set(index, value ? (byte) 1 : (byte) 0);
   }
 
   @Override
@@ -165,7 +162,7 @@
     requestCapacity(index + 2);
 
     buffer[index++] = (byte) ((value) & 0xff);
-    buffer[index  ] = (byte) ((value >> 8) & 0xff);
+    buffer[index] = (byte) ((value >> 8) & 0xff);
   }
 
   @Override
@@ -173,9 +170,9 @@
     requestCapacity(index + 4);
 
     buffer[index++] = (byte) ((value) & 0xff);
-    buffer[index++] = (byte) ((value >>  8) & 0xff);
+    buffer[index++] = (byte) ((value >> 8) & 0xff);
     buffer[index++] = (byte) ((value >> 16) & 0xff);
-    buffer[index  ] = (byte) ((value >> 24) & 0xff);
+    buffer[index] = (byte) ((value >> 24) & 0xff);
   }
 
   @Override
@@ -184,14 +181,14 @@
 
     int i = (int) value;
     buffer[index++] = (byte) ((i) & 0xff);
-    buffer[index++] = (byte) ((i >>  8) & 0xff);
+    buffer[index++] = (byte) ((i >> 8) & 0xff);
     buffer[index++] = (byte) ((i >> 16) & 0xff);
     buffer[index++] = (byte) ((i >> 24) & 0xff);
     i = (int) (value >> 32);
     buffer[index++] = (byte) ((i) & 0xff);
-    buffer[index++] = (byte) ((i >>  8) & 0xff);
+    buffer[index++] = (byte) ((i >> 8) & 0xff);
     buffer[index++] = (byte) ((i >> 16) & 0xff);
-    buffer[index  ] = (byte) ((i >> 24) & 0xff);
+    buffer[index] = (byte) ((i >> 24) & 0xff);
   }
 
   @Override
@@ -200,9 +197,9 @@
 
     int iValue = Float.floatToRawIntBits(value);
     buffer[index++] = (byte) ((iValue) & 0xff);
-    buffer[index++] = (byte) ((iValue >>  8) & 0xff);
+    buffer[index++] = (byte) ((iValue >> 8) & 0xff);
     buffer[index++] = (byte) ((iValue >> 16) & 0xff);
-    buffer[index  ] = (byte) ((iValue >> 24) & 0xff);
+    buffer[index] = (byte) ((iValue >> 24) & 0xff);
   }
 
   @Override
@@ -212,14 +209,14 @@
     long lValue = Double.doubleToRawLongBits(value);
     int i = (int) lValue;
     buffer[index++] = (byte) ((i) & 0xff);
-    buffer[index++] = (byte) ((i >>  8) & 0xff);
+    buffer[index++] = (byte) ((i >> 8) & 0xff);
     buffer[index++] = (byte) ((i >> 16) & 0xff);
     buffer[index++] = (byte) ((i >> 24) & 0xff);
     i = (int) (lValue >> 32);
     buffer[index++] = (byte) ((i) & 0xff);
-    buffer[index++] = (byte) ((i >>  8) & 0xff);
+    buffer[index++] = (byte) ((i >> 8) & 0xff);
     buffer[index++] = (byte) ((i >> 16) & 0xff);
-    buffer[index  ] = (byte) ((i >> 24) & 0xff);
+    buffer[index] = (byte) ((i >> 24) & 0xff);
   }
 
   @Override
@@ -235,7 +232,8 @@
   @Override
   public boolean requestCapacity(int capacity) {
     if (capacity < 0) {
-      throw new IllegalArgumentException("Capacity may not be negative (likely a previous int overflow)");
+      throw new IllegalArgumentException(
+          "Capacity may not be negative (likely a previous int overflow)");
     }
     if (buffer.length >= capacity) {
       return true;
@@ -243,7 +241,7 @@
     // implemented in the same growing fashion as ArrayList
     int oldCapacity = buffer.length;
     int newCapacity = oldCapacity + (oldCapacity >> 1);
-    if (newCapacity < capacity) {  // Note: this also catches newCapacity int overflow
+    if (newCapacity < capacity) { // Note: this also catches newCapacity int overflow
       newCapacity = capacity;
     }
     buffer = Arrays.copyOf(buffer, newCapacity);
diff --git a/java/src/main/java/com/google/flatbuffers/BaseVector.java b/java/src/main/java/com/google/flatbuffers/BaseVector.java
index 9230da7..72cb5b7 100644
--- a/java/src/main/java/com/google/flatbuffers/BaseVector.java
+++ b/java/src/main/java/com/google/flatbuffers/BaseVector.java
@@ -20,16 +20,17 @@
 
 /// @cond FLATBUFFERS_INTERNAL
 
-/**
- * All vector access objects derive from this class, and add their own accessors.
- */
+/** All vector access objects derive from this class, and add their own accessors. */
 public class BaseVector {
   /** Used to hold the vector data position. */
   private int vector;
+
   /** Used to hold the vector size. */
   private int length;
+
   /** Used to hold the vector element size in table. */
   private int element_size;
+
   /** The underlying ByteBuffer to hold the data of the vector. */
   protected ByteBuffer bb;
 
@@ -56,10 +57,10 @@
    * Re-init the internal state with an external buffer {@code ByteBuffer}, an offset within and
    * element size.
    *
-   * This method exists primarily to allow recycling vector instances without risking memory leaks
-   * due to {@code ByteBuffer} references.
+   * <p>This method exists primarily to allow recycling vector instances without risking memory
+   * leaks due to {@code ByteBuffer} references.
    */
-  protected void __reset(int _vector, int _element_size, ByteBuffer _bb) { 
+  protected void __reset(int _vector, int _element_size, ByteBuffer _bb) {
     bb = _bb;
     if (bb != null) {
       vector = _vector;
@@ -75,8 +76,8 @@
   /**
    * Resets the internal state with a null {@code ByteBuffer} and a zero position.
    *
-   * This method exists primarily to allow recycling vector instances without risking memory leaks
-   * due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
+   * <p>This method exists primarily to allow recycling vector instances without risking memory
+   * leaks due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
    * again to a {@code ByteBuffer}.
    */
   public void reset() {
diff --git a/java/src/main/java/com/google/flatbuffers/BooleanVector.java b/java/src/main/java/com/google/flatbuffers/BooleanVector.java
index 1c2a4cd..ce335e1 100644
--- a/java/src/main/java/com/google/flatbuffers/BooleanVector.java
+++ b/java/src/main/java/com/google/flatbuffers/BooleanVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of booleans.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of booleans. */
 public final class BooleanVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public BooleanVector __assign(int _vector, ByteBuffer _bb) {
-    __reset(_vector, Constants.SIZEOF_BYTE, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_BYTE, _bb);
+    return this;
   }
 
   /**
@@ -43,7 +41,7 @@
    * @param j The index from which the boolean will be read.
    * @return the boolean value at the given index.
    */
-  public boolean get(int j) { 
+  public boolean get(int j) {
     return 0 != bb.get(__element(j));
   }
 }
diff --git a/java/src/main/java/com/google/flatbuffers/ByteBufferReadWriteBuf.java b/java/src/main/java/com/google/flatbuffers/ByteBufferReadWriteBuf.java
index aaf72fe..a973a5c 100644
--- a/java/src/main/java/com/google/flatbuffers/ByteBufferReadWriteBuf.java
+++ b/java/src/main/java/com/google/flatbuffers/ByteBufferReadWriteBuf.java
@@ -64,7 +64,7 @@
 
   @Override
   public void putBoolean(boolean value) {
-    buffer.put(value ? (byte)1 : (byte)0);
+    buffer.put(value ? (byte) 1 : (byte) 0);
   }
 
   @Override
@@ -104,7 +104,7 @@
 
   @Override
   public void setBoolean(int index, boolean value) {
-    set(index, value ? (byte)1 : (byte)0);
+    set(index, value ? (byte) 1 : (byte) 0);
   }
 
   @Override
@@ -166,5 +166,4 @@
   public boolean requestCapacity(int capacity) {
     return capacity <= buffer.limit();
   }
-
 }
diff --git a/java/src/main/java/com/google/flatbuffers/ByteBufferUtil.java b/java/src/main/java/com/google/flatbuffers/ByteBufferUtil.java
index 624dc4e..3e6c272 100644
--- a/java/src/main/java/com/google/flatbuffers/ByteBufferUtil.java
+++ b/java/src/main/java/com/google/flatbuffers/ByteBufferUtil.java
@@ -24,35 +24,31 @@
 /// @addtogroup flatbuffers_java_api
 /// @{
 
-/**
- * Class that collects utility functions around `ByteBuffer`.
- */
+/** Class that collects utility functions around `ByteBuffer`. */
 public class ByteBufferUtil {
 
-	/**
-     * Extract the size prefix from a `ByteBuffer`.
-     * 
-     * @param bb a size-prefixed buffer
-     * @return the size prefix
-     */
-    public static int getSizePrefix(ByteBuffer bb) {
-        return bb.getInt(bb.position());
-    }
+  /**
+   * Extract the size prefix from a `ByteBuffer`.
+   *
+   * @param bb a size-prefixed buffer
+   * @return the size prefix
+   */
+  public static int getSizePrefix(ByteBuffer bb) {
+    return bb.getInt(bb.position());
+  }
 
-	/**
-     * Create a duplicate of a size-prefixed `ByteBuffer` that has its position
-     * advanced just past the size prefix.
-     * 
-     * @param bb a size-prefixed buffer
-     * @return a new buffer on the same underlying data that has skipped the
-     *         size prefix
-     */
-    public static ByteBuffer removeSizePrefix(ByteBuffer bb) {
-        ByteBuffer s = bb.duplicate();
-        s.position(s.position() + SIZE_PREFIX_LENGTH);
-        return s;
-    }
-
+  /**
+   * Create a duplicate of a size-prefixed `ByteBuffer` that has its position advanced just past the
+   * size prefix.
+   *
+   * @param bb a size-prefixed buffer
+   * @return a new buffer on the same underlying data that has skipped the size prefix
+   */
+  public static ByteBuffer removeSizePrefix(ByteBuffer bb) {
+    ByteBuffer s = bb.duplicate();
+    s.position(s.position() + SIZE_PREFIX_LENGTH);
+    return s;
+  }
 }
 
 /// @}
diff --git a/java/src/main/java/com/google/flatbuffers/ByteVector.java b/java/src/main/java/com/google/flatbuffers/ByteVector.java
index 8bc715b..15e2417 100644
--- a/java/src/main/java/com/google/flatbuffers/ByteVector.java
+++ b/java/src/main/java/com/google/flatbuffers/ByteVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of signed or unsigned 8-bit values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of signed or unsigned 8-bit values. */
 public final class ByteVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param vector Start data of a vector.
    * @param bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
-  public ByteVector __assign(int vector, ByteBuffer bb) { 
-    __reset(vector, Constants.SIZEOF_BYTE, bb); return this;
+  public ByteVector __assign(int vector, ByteBuffer bb) {
+    __reset(vector, Constants.SIZEOF_BYTE, bb);
+    return this;
   }
 
   /**
@@ -44,12 +42,12 @@
    * @return the 8-bit value at the given index.
    */
   public byte get(int j) {
-     return bb.get(__element(j));
+    return bb.get(__element(j));
   }
 
   /**
-   * Reads the byte at the given index, zero-extends it to type int, and returns the result,
-   * which is therefore in the range 0 through 255.
+   * Reads the byte at the given index, zero-extends it to type int, and returns the result, which
+   * is therefore in the range 0 through 255.
    *
    * @param j The index from which the byte will be read.
    * @return the unsigned 8-bit at the given index.
diff --git a/java/src/main/java/com/google/flatbuffers/Constants.java b/java/src/main/java/com/google/flatbuffers/Constants.java
index cb505f4..f764b24 100644
--- a/java/src/main/java/com/google/flatbuffers/Constants.java
+++ b/java/src/main/java/com/google/flatbuffers/Constants.java
@@ -18,35 +18,40 @@
 
 /// @cond FLATBUFFERS_INTERNAL
 
-/**
- * Class that holds shared constants
- */
+/** Class that holds shared constants */
 public class Constants {
-    // Java doesn't seem to have these.
-    /** The number of bytes in an `byte`. */
-    static final int SIZEOF_BYTE = 1;
-    /** The number of bytes in a `short`. */
-    static final int SIZEOF_SHORT = 2;
-    /** The number of bytes in an `int`. */
-    static final int SIZEOF_INT = 4;
-    /** The number of bytes in an `float`. */
-    static final int SIZEOF_FLOAT = 4;
-    /** The number of bytes in an `long`. */
-    static final int SIZEOF_LONG = 8;
-    /** The number of bytes in an `double`. */
-    static final int SIZEOF_DOUBLE = 8;
-    /** The number of bytes in a file identifier. */
-    static final int FILE_IDENTIFIER_LENGTH = 4;
-    /** The number of bytes in a size prefix. */
-    public static final int SIZE_PREFIX_LENGTH = 4;
-    /** A version identifier to force a compile error if someone
-    accidentally tries to build generated code with a runtime of
-    two mismatched version. Versions need to always match, as
-    the runtime and generated code are modified in sync.
-    Changes to the Java implementation need to be sure to change
-    the version here and in the code generator on every possible
-    incompatible change */
-    public static void FLATBUFFERS_25_2_10() {}
+  // Java doesn't seem to have these.
+  /** The number of bytes in an `byte`. */
+  static final int SIZEOF_BYTE = 1;
+
+  /** The number of bytes in a `short`. */
+  static final int SIZEOF_SHORT = 2;
+
+  /** The number of bytes in an `int`. */
+  static final int SIZEOF_INT = 4;
+
+  /** The number of bytes in an `float`. */
+  static final int SIZEOF_FLOAT = 4;
+
+  /** The number of bytes in an `long`. */
+  static final int SIZEOF_LONG = 8;
+
+  /** The number of bytes in an `double`. */
+  static final int SIZEOF_DOUBLE = 8;
+
+  /** The number of bytes in a file identifier. */
+  static final int FILE_IDENTIFIER_LENGTH = 4;
+
+  /** The number of bytes in a size prefix. */
+  public static final int SIZE_PREFIX_LENGTH = 4;
+
+  /**
+   * A version identifier to force a compile error if someone accidentally tries to build generated
+   * code with a runtime of two mismatched version. Versions need to always match, as the runtime
+   * and generated code are modified in sync. Changes to the Java implementation need to be sure to
+   * change the version here and in the code generator on every possible incompatible change
+   */
+  public static void FLATBUFFERS_25_2_10() {}
 }
 
 /// @endcond
diff --git a/java/src/main/java/com/google/flatbuffers/DoubleVector.java b/java/src/main/java/com/google/flatbuffers/DoubleVector.java
index fd4a3a4..0b1e04d 100644
--- a/java/src/main/java/com/google/flatbuffers/DoubleVector.java
+++ b/java/src/main/java/com/google/flatbuffers/DoubleVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of double values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of double values. */
 public final class DoubleVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public DoubleVector __assign(int _vector, ByteBuffer _bb) {
-     __reset(_vector, Constants.SIZEOF_DOUBLE, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_DOUBLE, _bb);
+    return this;
   }
 
   /**
diff --git a/java/src/main/java/com/google/flatbuffers/FlatBufferBuilder.java b/java/src/main/java/com/google/flatbuffers/FlatBufferBuilder.java
index a954d9f..bac946d 100644
--- a/java/src/main/java/com/google/flatbuffers/FlatBufferBuilder.java
+++ b/java/src/main/java/com/google/flatbuffers/FlatBufferBuilder.java
@@ -24,1097 +24,1145 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import java.lang.Integer;
 
 /// @file
 /// @addtogroup flatbuffers_java_api
 /// @{
 
 /**
- * Class that helps you build a FlatBuffer.  See the section
- * "Use in Java/C#" in the main FlatBuffers documentation.
+ * Class that helps you build a FlatBuffer. See the section "Use in Java/C#" in the main FlatBuffers
+ * documentation.
  */
 public class FlatBufferBuilder {
-    /// @cond FLATBUFFERS_INTERNAL
-    ByteBuffer bb;                    // Where we construct the FlatBuffer.
-    int space;                        // Remaining space in the ByteBuffer.
-    int minalign = 1;                 // Minimum alignment encountered so far.
-    int[] vtable = null;              // The vtable for the current table.
-    int vtable_in_use = 0;            // The amount of fields we're actually using.
-    boolean nested = false;           // Whether we are currently serializing a table.
-    boolean finished = false;         // Whether the buffer is finished.
-    int object_start;                 // Starting offset of the current struct/table.
-    int[] vtables = new int[16];      // List of offsets of all vtables.
-    int num_vtables = 0;              // Number of entries in `vtables` in use.
-    int vector_num_elems = 0;         // For the current vector being built.
-    boolean force_defaults = false;   // False omits default values from the serialized data.
-    ByteBufferFactory bb_factory;     // Factory for allocating the internal buffer
-    final Utf8 utf8;                  // UTF-8 encoder to use
-    Map<String, Integer> string_pool; // map used to cache shared strings.
-    /// @endcond
+  /// @cond FLATBUFFERS_INTERNAL
+  ByteBuffer bb; // Where we construct the FlatBuffer.
+  int space; // Remaining space in the ByteBuffer.
+  int minalign = 1; // Minimum alignment encountered so far.
+  int[] vtable = null; // The vtable for the current table.
+  int vtable_in_use = 0; // The amount of fields we're actually using.
+  boolean nested = false; // Whether we are currently serializing a table.
+  boolean finished = false; // Whether the buffer is finished.
+  int object_start; // Starting offset of the current struct/table.
+  int[] vtables = new int[16]; // List of offsets of all vtables.
+  int num_vtables = 0; // Number of entries in `vtables` in use.
+  int vector_num_elems = 0; // For the current vector being built.
+  boolean force_defaults = false; // False omits default values from the serialized data.
+  ByteBufferFactory bb_factory; // Factory for allocating the internal buffer
+  final Utf8 utf8; // UTF-8 encoder to use
+  Map<String, Integer> string_pool; // map used to cache shared strings.
 
+  /// @endcond
 
+  /**
+   * Maximum size of buffer to allocate. If we're allocating arrays on the heap, the header size of
+   * the array counts towards its maximum size.
+   */
+  private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
+
+  /** Default buffer size that is allocated if an initial size is not given, or is non positive. */
+  private static final int DEFAULT_BUFFER_SIZE = 1024;
+
+  /**
+   * Start with a buffer of size `initial_size`, then grow as required.
+   *
+   * @param initial_size The initial size of the internal buffer to use.
+   * @param bb_factory The factory to be used for allocating the internal buffer
+   */
+  public FlatBufferBuilder(int initial_size, ByteBufferFactory bb_factory) {
+    this(initial_size, bb_factory, null, Utf8.getDefault());
+  }
+
+  /**
+   * Start with a buffer of size `initial_size`, then grow as required.
+   *
+   * @param initial_size The initial size of the internal buffer to use.
+   * @param bb_factory The factory to be used for allocating the internal buffer
+   * @param existing_bb The byte buffer to reuse.
+   * @param utf8 The Utf8 codec
+   */
+  public FlatBufferBuilder(
+      int initial_size, ByteBufferFactory bb_factory, ByteBuffer existing_bb, Utf8 utf8) {
+    if (initial_size <= 0) {
+      initial_size = DEFAULT_BUFFER_SIZE;
+    }
+    this.bb_factory = bb_factory;
+    if (existing_bb != null) {
+      bb = existing_bb;
+      bb.clear();
+      bb.order(ByteOrder.LITTLE_ENDIAN);
+    } else {
+      bb = bb_factory.newByteBuffer(initial_size);
+    }
+    this.utf8 = utf8;
+    space = bb.capacity();
+  }
+
+  /**
+   * Start with a buffer of size `initial_size`, then grow as required.
+   *
+   * @param initial_size The initial size of the internal buffer to use.
+   */
+  public FlatBufferBuilder(int initial_size) {
+    this(initial_size, HeapByteBufferFactory.INSTANCE, null, Utf8.getDefault());
+  }
+
+  /** Start with a buffer of 1KiB, then grow as required. */
+  public FlatBufferBuilder() {
+    this(DEFAULT_BUFFER_SIZE);
+  }
+
+  /**
+   * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder can still grow the
+   * buffer as necessary. User classes should make sure to call {@link #dataBuffer()} to obtain the
+   * resulting encoded message.
+   *
+   * @param existing_bb The byte buffer to reuse.
+   * @param bb_factory The factory to be used for allocating a new internal buffer if the existing
+   *     buffer needs to grow
+   */
+  public FlatBufferBuilder(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
+    this(existing_bb.capacity(), bb_factory, existing_bb, Utf8.getDefault());
+  }
+
+  /**
+   * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder can still grow the
+   * buffer as necessary. User classes should make sure to call {@link #dataBuffer()} to obtain the
+   * resulting encoded message.
+   *
+   * @param existing_bb The byte buffer to reuse.
+   */
+  public FlatBufferBuilder(ByteBuffer existing_bb) {
+    this(existing_bb, new HeapByteBufferFactory());
+  }
+
+  /**
+   * Alternative initializer that allows reusing this object on an existing `ByteBuffer`. This
+   * method resets the builder's internal state, but keeps objects that have been allocated for
+   * temporary storage.
+   *
+   * @param existing_bb The byte buffer to reuse.
+   * @param bb_factory The factory to be used for allocating a new internal buffer if the existing
+   *     buffer needs to grow
+   * @return Returns `this`.
+   */
+  public FlatBufferBuilder init(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
+    this.bb_factory = bb_factory;
+    bb = existing_bb;
+    bb.clear();
+    bb.order(ByteOrder.LITTLE_ENDIAN);
+    minalign = 1;
+    space = bb.capacity();
+    vtable_in_use = 0;
+    nested = false;
+    finished = false;
+    object_start = 0;
+    num_vtables = 0;
+    vector_num_elems = 0;
+    if (string_pool != null) {
+      string_pool.clear();
+    }
+    return this;
+  }
+
+  /**
+   * An interface that provides a user of the FlatBufferBuilder class the ability to specify the
+   * method in which the internal buffer gets allocated. This allows for alternatives to the default
+   * behavior, which is to allocate memory for a new byte-array backed `ByteBuffer` array inside the
+   * JVM.
+   *
+   * <p>The FlatBufferBuilder class contains the HeapByteBufferFactory class to preserve the default
+   * behavior in the event that the user does not provide their own implementation of this
+   * interface.
+   */
+  public abstract static class ByteBufferFactory {
     /**
-     * Maximum size of buffer to allocate. If we're allocating arrays on the heap,
-     * the header size of the array counts towards its maximum size.
-     */
-    private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
-
-    /**
-     * Default buffer size that is allocated if an initial size is not given, or is
-     * non positive.
-     */
-    private static final int DEFAULT_BUFFER_SIZE = 1024;
-
-    /**
-     * Start with a buffer of size `initial_size`, then grow as required.
+     * Create a `ByteBuffer` with a given capacity. The returned ByteBuf must have a
+     * ByteOrder.LITTLE_ENDIAN ByteOrder.
      *
-     * @param initial_size The initial size of the internal buffer to use.
-     * @param bb_factory The factory to be used for allocating the internal buffer
+     * @param capacity The size of the `ByteBuffer` to allocate.
+     * @return Returns the new `ByteBuffer` that was allocated.
      */
-    public FlatBufferBuilder(int initial_size, ByteBufferFactory bb_factory) {
-        this(initial_size, bb_factory, null, Utf8.getDefault());
-    }
+    public abstract ByteBuffer newByteBuffer(int capacity);
 
     /**
-     * Start with a buffer of size `initial_size`, then grow as required.
+     * Release a ByteBuffer. Current {@link FlatBufferBuilder} released any reference to it, so it
+     * is safe to dispose the buffer or return it to a pool. It is not guaranteed that the buffer
+     * has been created with {@link #newByteBuffer(int) }.
      *
-     * @param initial_size The initial size of the internal buffer to use.
-     * @param bb_factory The factory to be used for allocating the internal buffer
-     * @param existing_bb The byte buffer to reuse.
-     * @param utf8 The Utf8 codec
+     * @param bb the buffer to release
      */
-    public FlatBufferBuilder(int initial_size, ByteBufferFactory bb_factory,
-                             ByteBuffer existing_bb, Utf8 utf8) {
-        if (initial_size <= 0) {
-          initial_size = DEFAULT_BUFFER_SIZE;
-        }
-        this.bb_factory = bb_factory;
-        if (existing_bb != null) {
-          bb = existing_bb;
-          bb.clear();
-          bb.order(ByteOrder.LITTLE_ENDIAN);
-        } else {
-          bb = bb_factory.newByteBuffer(initial_size);
-        }
-        this.utf8 = utf8;
-        space = bb.capacity();
+    public void releaseByteBuffer(ByteBuffer bb) {}
+  }
+
+  /**
+   * An implementation of the ByteBufferFactory interface that is used when one is not provided by
+   * the user.
+   *
+   * <p>Allocate memory for a new byte-array backed `ByteBuffer` array inside the JVM.
+   */
+  public static final class HeapByteBufferFactory extends ByteBufferFactory {
+
+    public static final HeapByteBufferFactory INSTANCE = new HeapByteBufferFactory();
+
+    @Override
+    public ByteBuffer newByteBuffer(int capacity) {
+      return ByteBuffer.allocate(capacity).order(ByteOrder.LITTLE_ENDIAN);
     }
+  }
 
-   /**
-    * Start with a buffer of size `initial_size`, then grow as required.
-    *
-    * @param initial_size The initial size of the internal buffer to use.
-    */
-    public FlatBufferBuilder(int initial_size) {
-        this(initial_size, HeapByteBufferFactory.INSTANCE, null, Utf8.getDefault());
-    }
-
-    /**
-     * Start with a buffer of 1KiB, then grow as required.
-     */
-    public FlatBufferBuilder() {
-        this(DEFAULT_BUFFER_SIZE);
-    }
-
-    /**
-     * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
-     * can still grow the buffer as necessary.  User classes should make sure
-     * to call {@link #dataBuffer()} to obtain the resulting encoded message.
-     *
-     * @param existing_bb The byte buffer to reuse.
-     * @param bb_factory The factory to be used for allocating a new internal buffer if
-     *                   the existing buffer needs to grow
-     */
-    public FlatBufferBuilder(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
-        this(existing_bb.capacity(), bb_factory, existing_bb, Utf8.getDefault());
-    }
-
-    /**
-     * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
-     * can still grow the buffer as necessary.  User classes should make sure
-     * to call {@link #dataBuffer()} to obtain the resulting encoded message.
-     *
-     * @param existing_bb The byte buffer to reuse.
-     */
-    public FlatBufferBuilder(ByteBuffer existing_bb) {
-        this(existing_bb, new HeapByteBufferFactory());
-    }
-
-    /**
-     * Alternative initializer that allows reusing this object on an existing
-     * `ByteBuffer`. This method resets the builder's internal state, but keeps
-     * objects that have been allocated for temporary storage.
-     *
-     * @param existing_bb The byte buffer to reuse.
-     * @param bb_factory The factory to be used for allocating a new internal buffer if
-     *                   the existing buffer needs to grow
-     * @return Returns `this`.
-     */
-    public FlatBufferBuilder init(ByteBuffer existing_bb, ByteBufferFactory bb_factory){
-        this.bb_factory = bb_factory;
-        bb = existing_bb;
-        bb.clear();
-        bb.order(ByteOrder.LITTLE_ENDIAN);
-        minalign = 1;
-        space = bb.capacity();
-        vtable_in_use = 0;
-        nested = false;
-        finished = false;
-        object_start = 0;
-        num_vtables = 0;
-        vector_num_elems = 0;
-        if (string_pool != null) {
-            string_pool.clear();
-        }
-        return this;
-    }
-
-    /**
-     * An interface that provides a user of the FlatBufferBuilder class the ability to specify
-     * the method in which the internal buffer gets allocated. This allows for alternatives
-     * to the default behavior, which is to allocate memory for a new byte-array
-     * backed `ByteBuffer` array inside the JVM.
-     *
-     * The FlatBufferBuilder class contains the HeapByteBufferFactory class to
-     * preserve the default behavior in the event that the user does not provide
-     * their own implementation of this interface.
-     */
-    public static abstract class ByteBufferFactory {
-        /**
-         * Create a `ByteBuffer` with a given capacity.
-         * The returned ByteBuf must have a ByteOrder.LITTLE_ENDIAN ByteOrder.
-         *
-         * @param capacity The size of the `ByteBuffer` to allocate.
-         * @return Returns the new `ByteBuffer` that was allocated.
-         */
-        public abstract ByteBuffer newByteBuffer(int capacity);
-
-        /**
-         * Release a ByteBuffer. Current {@link FlatBufferBuilder}
-         * released any reference to it, so it is safe to dispose the buffer
-         * or return it to a pool.
-         * It is not guaranteed that the buffer has been created
-         * with {@link #newByteBuffer(int) }.
-         *
-         * @param bb the buffer to release
-         */
-        public void releaseByteBuffer(ByteBuffer bb) {
-        }
-    }
-
-    /**
-     * An implementation of the ByteBufferFactory interface that is used when
-     * one is not provided by the user.
-     *
-     * Allocate memory for a new byte-array backed `ByteBuffer` array inside the JVM.
-     */
-    public static final class HeapByteBufferFactory extends ByteBufferFactory {
-
-        public static final HeapByteBufferFactory INSTANCE = new HeapByteBufferFactory();
-
-        @Override
-        public ByteBuffer newByteBuffer(int capacity) {
-            return ByteBuffer.allocate(capacity).order(ByteOrder.LITTLE_ENDIAN);
-        }
-    }
-
-   /**
+  /**
    * Helper function to test if a field is present in the table
    *
    * @param table Flatbuffer table
    * @param offset virtual table offset
    * @return true if the filed is present
    */
-   public static boolean isFieldPresent(Table table, int offset) {
-     return table.__offset(offset) != 0;
-   }
+  public static boolean isFieldPresent(Table table, int offset) {
+    return table.__offset(offset) != 0;
+  }
 
-    /**
-     * Reset the FlatBufferBuilder by purging all data that it holds.
-     */
-    public void clear(){
-        space = bb.capacity();
-        bb.clear();
-        minalign = 1;
-        while(vtable_in_use > 0) vtable[--vtable_in_use] = 0;
-        vtable_in_use = 0;
-        nested = false;
-        finished = false;
-        object_start = 0;
-        num_vtables = 0;
-        vector_num_elems = 0;
-        if (string_pool != null) {
-            string_pool.clear();
+  /** Reset the FlatBufferBuilder by purging all data that it holds. */
+  public void clear() {
+    space = bb.capacity();
+    bb.clear();
+    minalign = 1;
+    while (vtable_in_use > 0) vtable[--vtable_in_use] = 0;
+    vtable_in_use = 0;
+    nested = false;
+    finished = false;
+    object_start = 0;
+    num_vtables = 0;
+    vector_num_elems = 0;
+    if (string_pool != null) {
+      string_pool.clear();
+    }
+  }
+
+  /**
+   * Doubles the size of the backing {@link ByteBuffer} and copies the old data towards the end of
+   * the new buffer (since we build the buffer backwards).
+   *
+   * @param bb The current buffer with the existing data.
+   * @param bb_factory The factory to be used for allocating the new internal buffer
+   * @return A new byte buffer with the old data copied copied to it. The data is located at the end
+   *     of the buffer.
+   */
+  static ByteBuffer growByteBuffer(ByteBuffer bb, ByteBufferFactory bb_factory) {
+    int old_buf_size = bb.capacity();
+
+    int new_buf_size;
+
+    if (old_buf_size == 0) {
+      new_buf_size = DEFAULT_BUFFER_SIZE;
+    } else {
+      if (old_buf_size == MAX_BUFFER_SIZE) { // Ensure we don't grow beyond what fits in an int.
+        throw new AssertionError("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");
+      }
+      new_buf_size = (old_buf_size & 0xC0000000) != 0 ? MAX_BUFFER_SIZE : old_buf_size << 1;
+    }
+
+    bb.position(0);
+    ByteBuffer nbb = bb_factory.newByteBuffer(new_buf_size);
+    new_buf_size = nbb.clear().capacity(); // Ensure the returned buffer is treated as empty
+    nbb.position(new_buf_size - old_buf_size);
+    nbb.put(bb);
+    return nbb;
+  }
+
+  /**
+   * Offset relative to the end of the buffer.
+   *
+   * @return Offset relative to the end of the buffer.
+   */
+  public int offset() {
+    return bb.capacity() - space;
+  }
+
+  /**
+   * Add zero valued bytes to prepare a new entry to be added.
+   *
+   * @param byte_size Number of bytes to add.
+   */
+  public void pad(int byte_size) {
+    for (int i = 0; i < byte_size; i++) bb.put(--space, (byte) 0);
+  }
+
+  /**
+   * Prepare to write an element of `size` after `additional_bytes` have been written, e.g. if you
+   * write a string, you need to align such the int length field is aligned to {@link
+   * com.google.flatbuffers.Constants#SIZEOF_INT}, and the string data follows it directly. If all
+   * you need to do is alignment, `additional_bytes` will be 0.
+   *
+   * @param size This is the of the new element to write.
+   * @param additional_bytes The padding size.
+   */
+  public void prep(int size, int additional_bytes) {
+    // Track the biggest thing we've ever aligned to.
+    if (size > minalign) minalign = size;
+    // Find the amount of alignment needed such that `size` is properly
+    // aligned after `additional_bytes`
+    int align_size = ((~(bb.capacity() - space + additional_bytes)) + 1) & (size - 1);
+    // Reallocate the buffer if needed.
+    while (space < align_size + size + additional_bytes) {
+      int old_buf_size = bb.capacity();
+      ByteBuffer old = bb;
+      bb = growByteBuffer(old, bb_factory);
+      if (old != bb) {
+        bb_factory.releaseByteBuffer(old);
+      }
+      space += bb.capacity() - old_buf_size;
+    }
+    pad(align_size);
+  }
+
+  /**
+   * Add a `boolean` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `boolean` to put into the buffer.
+   */
+  public void putBoolean(boolean x) {
+    bb.put(space -= Constants.SIZEOF_BYTE, (byte) (x ? 1 : 0));
+  }
+
+  /**
+   * Add a `byte` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `byte` to put into the buffer.
+   */
+  public void putByte(byte x) {
+    bb.put(space -= Constants.SIZEOF_BYTE, x);
+  }
+
+  /**
+   * Add a `short` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `short` to put into the buffer.
+   */
+  public void putShort(short x) {
+    bb.putShort(space -= Constants.SIZEOF_SHORT, x);
+  }
+
+  /**
+   * Add an `int` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x An `int` to put into the buffer.
+   */
+  public void putInt(int x) {
+    bb.putInt(space -= Constants.SIZEOF_INT, x);
+  }
+
+  /**
+   * Add a `long` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `long` to put into the buffer.
+   */
+  public void putLong(long x) {
+    bb.putLong(space -= Constants.SIZEOF_LONG, x);
+  }
+
+  /**
+   * Add a `float` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `float` to put into the buffer.
+   */
+  public void putFloat(float x) {
+    bb.putFloat(space -= Constants.SIZEOF_FLOAT, x);
+  }
+
+  /**
+   * Add a `double` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
+   *
+   * @param x A `double` to put into the buffer.
+   */
+  public void putDouble(double x) {
+    bb.putDouble(space -= Constants.SIZEOF_DOUBLE, x);
+  }
+
+  /// @endcond
+
+  /**
+   * Add a `boolean` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `boolean` to put into the buffer.
+   */
+  public void addBoolean(boolean x) {
+    prep(Constants.SIZEOF_BYTE, 0);
+    putBoolean(x);
+  }
+
+  /**
+   * Add a `byte` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `byte` to put into the buffer.
+   */
+  public void addByte(byte x) {
+    prep(Constants.SIZEOF_BYTE, 0);
+    putByte(x);
+  }
+
+  /**
+   * Add a `short` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `short` to put into the buffer.
+   */
+  public void addShort(short x) {
+    prep(Constants.SIZEOF_SHORT, 0);
+    putShort(x);
+  }
+
+  /**
+   * Add an `int` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x An `int` to put into the buffer.
+   */
+  public void addInt(int x) {
+    prep(Constants.SIZEOF_INT, 0);
+    putInt(x);
+  }
+
+  /**
+   * Add a `long` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `long` to put into the buffer.
+   */
+  public void addLong(long x) {
+    prep(Constants.SIZEOF_LONG, 0);
+    putLong(x);
+  }
+
+  /**
+   * Add a `float` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `float` to put into the buffer.
+   */
+  public void addFloat(float x) {
+    prep(Constants.SIZEOF_FLOAT, 0);
+    putFloat(x);
+  }
+
+  /**
+   * Add a `double` to the buffer, properly aligned, and grows the buffer (if necessary).
+   *
+   * @param x A `double` to put into the buffer.
+   */
+  public void addDouble(double x) {
+    prep(Constants.SIZEOF_DOUBLE, 0);
+    putDouble(x);
+  }
+
+  /**
+   * Adds on offset, relative to where it will be written.
+   *
+   * @param off The offset to add.
+   */
+  public void addOffset(int off) {
+    prep(SIZEOF_INT, 0); // Ensure alignment is already done.
+    assert off <= offset();
+    off = offset() - off + SIZEOF_INT;
+    putInt(off);
+  }
+
+  /// @cond FLATBUFFERS_INTERNAL
+  /**
+   * Start a new array/vector of objects. Users usually will not call this directly. The
+   * `FlatBuffers` compiler will create a start/end method for vector types in generated code.
+   *
+   * <p>The expected sequence of calls is:
+   *
+   * <ol>
+   *   <li>Start the array using this method.
+   *   <li>Call {@link #addOffset(int)} `num_elems` number of times to set the offset of each
+   *       element in the array.
+   *   <li>Call {@link #endVector()} to retrieve the offset of the array.
+   * </ol>
+   *
+   * <p>For example, to create an array of strings, do:
+   *
+   * <pre>{@code
+   * // Need 10 strings
+   * FlatBufferBuilder builder = new FlatBufferBuilder(existingBuffer);
+   * int[] offsets = new int[10];
+   *
+   * for (int i = 0; i < 10; i++) {
+   *   offsets[i] = fbb.createString(" " + i);
+   * }
+   *
+   * // Have the strings in the buffer, but don't have a vector.
+   * // Add a vector that references the newly created strings:
+   * builder.startVector(4, offsets.length, 4);
+   *
+   * // Add each string to the newly created vector
+   * // The strings are added in reverse order since the buffer
+   * // is filled in back to front
+   * for (int i = offsets.length - 1; i >= 0; i--) {
+   *   builder.addOffset(offsets[i]);
+   * }
+   *
+   * // Finish off the vector
+   * int offsetOfTheVector = fbb.endVector();
+   * }</pre>
+   *
+   * @param elem_size The size of each element in the array.
+   * @param num_elems The number of elements in the array.
+   * @param alignment The alignment of the array.
+   */
+  public void startVector(int elem_size, int num_elems, int alignment) {
+    notNested();
+    vector_num_elems = num_elems;
+    prep(SIZEOF_INT, elem_size * num_elems);
+    prep(alignment, elem_size * num_elems); // Just in case alignment > int.
+    nested = true;
+  }
+
+  /**
+   * Finish off the creation of an array and all its elements. The array must be created with {@link
+   * #startVector(int, int, int)}.
+   *
+   * @return The offset at which the newly created array starts.
+   * @see #startVector(int, int, int)
+   */
+  public int endVector() {
+    if (!nested) throw new AssertionError("FlatBuffers: endVector called without startVector");
+    nested = false;
+    putInt(vector_num_elems);
+    return offset();
+  }
+
+  /// @endcond
+
+  /**
+   * Create a new array/vector and return a ByteBuffer to be filled later. Call {@link #endVector}
+   * after this method to get an offset to the beginning of vector.
+   *
+   * @param elem_size the size of each element in bytes.
+   * @param num_elems number of elements in the vector.
+   * @param alignment byte alignment.
+   * @return ByteBuffer with position and limit set to the space allocated for the array.
+   */
+  public ByteBuffer createUnintializedVector(int elem_size, int num_elems, int alignment) {
+    int length = elem_size * num_elems;
+    startVector(elem_size, num_elems, alignment);
+
+    bb.position(space -= length);
+
+    // Slice and limit the copy vector to point to the 'array'
+    ByteBuffer copy = bb.slice().order(ByteOrder.LITTLE_ENDIAN);
+    copy.limit(length);
+    return copy;
+  }
+
+  /**
+   * Create a vector of tables.
+   *
+   * @param offsets Offsets of the tables.
+   * @return Returns offset of the vector.
+   */
+  public int createVectorOfTables(int[] offsets) {
+    notNested();
+    startVector(Constants.SIZEOF_INT, offsets.length, Constants.SIZEOF_INT);
+    for (int i = offsets.length - 1; i >= 0; i--) addOffset(offsets[i]);
+    return endVector();
+  }
+
+  /**
+   * Create a vector of sorted by the key tables.
+   *
+   * @param obj Instance of the table subclass.
+   * @param offsets Offsets of the tables.
+   * @return Returns offset of the sorted vector.
+   */
+  public <T extends Table> int createSortedVectorOfTables(T obj, int[] offsets) {
+    obj.sortTables(offsets, bb);
+    return createVectorOfTables(offsets);
+  }
+
+  /**
+   * Encode the String `s` in the buffer using UTF-8. If a String with this exact contents has
+   * already been serialized using this method, instead simply returns the offset of the existing
+   * String.
+   *
+   * <p>Usage of the method will incur into additional allocations, so it is advisable to use it
+   * only when it is known upfront that your message will have several repeated strings.
+   *
+   * @param s The String to encode.
+   * @return The offset in the buffer where the encoded String starts.
+   */
+  public int createSharedString(String s) {
+
+    if (string_pool == null) {
+      string_pool = new HashMap<>();
+      int offset = createString(s);
+      string_pool.put(s, offset);
+      return offset;
+    }
+
+    Integer offset = string_pool.get(s);
+
+    if (offset == null) {
+      offset = createString(s);
+      string_pool.put(s, offset);
+    }
+    return offset;
+  }
+
+  /**
+   * Encode the string `s` in the buffer using UTF-8. If {@code s} is already a {@link CharBuffer},
+   * this method is allocation free.
+   *
+   * @param s The string to encode.
+   * @return The offset in the buffer where the encoded string starts.
+   */
+  public int createString(CharSequence s) {
+    int length = utf8.encodedLength(s);
+    addByte((byte) 0);
+    startVector(1, length, 1);
+    bb.position(space -= length);
+    utf8.encodeUtf8(s, bb);
+    return endVector();
+  }
+
+  /**
+   * Create a string in the buffer from an already encoded UTF-8 string in a ByteBuffer.
+   *
+   * @param s An already encoded UTF-8 string as a `ByteBuffer`.
+   * @return The offset in the buffer where the encoded string starts.
+   */
+  public int createString(ByteBuffer s) {
+    int length = s.remaining();
+    addByte((byte) 0);
+    startVector(1, length, 1);
+    bb.position(space -= length);
+    bb.put(s);
+    return endVector();
+  }
+
+  /**
+   * Create a byte array in the buffer.
+   *
+   * @param arr A source array with data
+   * @return The offset in the buffer where the encoded array starts.
+   */
+  public int createByteVector(byte[] arr) {
+    int length = arr.length;
+    startVector(1, length, 1);
+    bb.position(space -= length);
+    bb.put(arr);
+    return endVector();
+  }
+
+  /**
+   * Create a byte array in the buffer.
+   *
+   * @param arr a source array with data.
+   * @param offset the offset in the source array to start copying from.
+   * @param length the number of bytes to copy from the source array.
+   * @return The offset in the buffer where the encoded array starts.
+   */
+  public int createByteVector(byte[] arr, int offset, int length) {
+    startVector(1, length, 1);
+    bb.position(space -= length);
+    bb.put(arr, offset, length);
+    return endVector();
+  }
+
+  /**
+   * Create a byte array in the buffer.
+   *
+   * <p>The source {@link ByteBuffer} position is advanced by {@link ByteBuffer#remaining()} places
+   * after this call.
+   *
+   * @param byteBuffer A source {@link ByteBuffer} with data.
+   * @return The offset in the buffer where the encoded array starts.
+   */
+  public int createByteVector(ByteBuffer byteBuffer) {
+    int length = byteBuffer.remaining();
+    startVector(1, length, 1);
+    bb.position(space -= length);
+    bb.put(byteBuffer);
+    return endVector();
+  }
+
+  /// @cond FLATBUFFERS_INTERNAL
+  /** Should not be accessing the final buffer before it is finished. */
+  public void finished() {
+    if (!finished)
+      throw new AssertionError(
+          "FlatBuffers: you can only access the serialized buffer after it has been"
+              + " finished by FlatBufferBuilder.finish().");
+  }
+
+  /**
+   * Should not be creating any other object, string or vector while an object is being constructed.
+   */
+  public void notNested() {
+    if (nested) throw new AssertionError("FlatBuffers: object serialization must not be nested.");
+  }
+
+  /**
+   * Structures are always stored inline, they need to be created right where they're used. You'll
+   * get this assertion failure if you created it elsewhere.
+   *
+   * @param obj The offset of the created object.
+   */
+  public void Nested(int obj) {
+    if (obj != offset()) throw new AssertionError("FlatBuffers: struct must be serialized inline.");
+  }
+
+  /**
+   * Start encoding a new object in the buffer. Users will not usually need to call this directly.
+   * The `FlatBuffers` compiler will generate helper methods that call this method internally.
+   *
+   * <p>For example, using the "Monster" code found on the "landing page". An object of type
+   * `Monster` can be created using the following code:
+   *
+   * <pre>{@code
+   * int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] {
+   *   fbb.createString("test1"),
+   *   fbb.createString("test2")
+   * });
+   *
+   * Monster.startMonster(fbb);
+   * Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0,
+   *   Color.Green, (short)5, (byte)6));
+   * Monster.addHp(fbb, (short)80);
+   * Monster.addName(fbb, str);
+   * Monster.addInventory(fbb, inv);
+   * Monster.addTestType(fbb, (byte)Any.Monster);
+   * Monster.addTest(fbb, mon2);
+   * Monster.addTest4(fbb, test4);
+   * Monster.addTestarrayofstring(fbb, testArrayOfString);
+   * int mon = Monster.endMonster(fbb);
+   * }</pre>
+   *
+   * <p>Here:
+   *
+   * <ul>
+   *   <li>The call to `Monster#startMonster(FlatBufferBuilder)` will call this method with the
+   *       right number of fields set.
+   *   <li>`Monster#endMonster(FlatBufferBuilder)` will ensure {@link #endObject()} is called.
+   * </ul>
+   *
+   * <p>It's not recommended to call this method directly. If it's called manually, you must ensure
+   * to audit all calls to it whenever fields are added or removed from your schema. This is
+   * automatically done by the code generated by the `FlatBuffers` compiler.
+   *
+   * @param numfields The number of fields found in this object.
+   */
+  public void startTable(int numfields) {
+    notNested();
+    if (vtable == null || vtable.length < numfields) vtable = new int[numfields];
+    vtable_in_use = numfields;
+    Arrays.fill(vtable, 0, vtable_in_use, 0);
+    nested = true;
+    object_start = offset();
+  }
+
+  /**
+   * Add a `boolean` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `boolean` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `boolean` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addBoolean(int o, boolean x, boolean d) {
+    if (force_defaults || x != d) {
+      addBoolean(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a `byte` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `byte` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `byte` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addByte(int o, byte x, int d) {
+    if (force_defaults || x != d) {
+      addByte(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a `short` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `short` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `short` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addShort(int o, short x, int d) {
+    if (force_defaults || x != d) {
+      addShort(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add an `int` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x An `int` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d An `int` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addInt(int o, int x, int d) {
+    if (force_defaults || x != d) {
+      addInt(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a `long` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `long` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `long` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addLong(int o, long x, long d) {
+    if (force_defaults || x != d) {
+      addLong(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a `float` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `float` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `float` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addFloat(int o, float x, double d) {
+    if (force_defaults || x != d) {
+      addFloat(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a `double` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x A `double` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d A `double` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addDouble(int o, double x, double d) {
+    if (force_defaults || x != d) {
+      addDouble(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add an `offset` to a table at `o` into its vtable, with value `x` and default `d`.
+   *
+   * @param o The index into the vtable.
+   * @param x An `offset` to put into the buffer, depending on how defaults are handled. If
+   *     `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *     default value, it can be skipped.
+   * @param d An `offset` default value to compare against when `force_defaults` is `false`.
+   */
+  public void addOffset(int o, int x, int d) {
+    if (force_defaults || x != d) {
+      addOffset(x);
+      slot(o);
+    }
+  }
+
+  /**
+   * Add a struct to the table. Structs are stored inline, so nothing additional is being added.
+   *
+   * @param voffset The index into the vtable.
+   * @param x The offset of the created struct.
+   * @param d The default value is always `0`.
+   */
+  public void addStruct(int voffset, int x, int d) {
+    if (x != d) {
+      Nested(x);
+      slot(voffset);
+    }
+  }
+
+  /**
+   * Set the current vtable at `voffset` to the current location in the buffer.
+   *
+   * @param voffset The index into the vtable to store the offset relative to the end of the buffer.
+   */
+  public void slot(int voffset) {
+    vtable[voffset] = offset();
+  }
+
+  /**
+   * Finish off writing the object that is under construction.
+   *
+   * @return The offset to the object inside {@link #dataBuffer()}.
+   * @see #startTable(int)
+   */
+  public int endTable() {
+    if (vtable == null || !nested)
+      throw new AssertionError("FlatBuffers: endTable called without startTable");
+    addInt(0);
+    int vtableloc = offset();
+    // Write out the current vtable.
+    int i = vtable_in_use - 1;
+    // Trim trailing zeroes.
+    for (; i >= 0 && vtable[i] == 0; i--) {}
+    int trimmed_size = i + 1;
+    for (; i >= 0; i--) {
+      // Offset relative to the start of the table.
+      short off = (short) (vtable[i] != 0 ? vtableloc - vtable[i] : 0);
+      addShort(off);
+    }
+
+    final int standard_fields = 2; // The fields below:
+    addShort((short) (vtableloc - object_start));
+    addShort((short) ((trimmed_size + standard_fields) * SIZEOF_SHORT));
+
+    // Search for an existing vtable that matches the current one.
+    int existing_vtable = 0;
+    outer_loop:
+    for (i = 0; i < num_vtables; i++) {
+      int vt1 = bb.capacity() - vtables[i];
+      int vt2 = space;
+      short len = bb.getShort(vt1);
+      if (len == bb.getShort(vt2)) {
+        for (int j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {
+          if (bb.getShort(vt1 + j) != bb.getShort(vt2 + j)) {
+            continue outer_loop;
+          }
         }
+        existing_vtable = vtables[i];
+        break outer_loop;
+      }
     }
 
-    /**
-     * Doubles the size of the backing {@link ByteBuffer} and copies the old data towards the
-     * end of the new buffer (since we build the buffer backwards).
-     *
-     * @param bb The current buffer with the existing data.
-     * @param bb_factory The factory to be used for allocating the new internal buffer
-     * @return A new byte buffer with the old data copied copied to it.  The data is
-     * located at the end of the buffer.
-     */
-    static ByteBuffer growByteBuffer(ByteBuffer bb, ByteBufferFactory bb_factory) {
-        int old_buf_size = bb.capacity();
-
-        int new_buf_size;
-
-        if (old_buf_size == 0) {
-            new_buf_size = DEFAULT_BUFFER_SIZE;
-        }
-        else {
-            if (old_buf_size == MAX_BUFFER_SIZE) { // Ensure we don't grow beyond what fits in an int.
-                throw new AssertionError("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");
-            }
-            new_buf_size = (old_buf_size & 0xC0000000) != 0 ? MAX_BUFFER_SIZE : old_buf_size << 1;
-        }
-
-        bb.position(0);
-        ByteBuffer nbb = bb_factory.newByteBuffer(new_buf_size);
-        new_buf_size = nbb.clear().capacity(); // Ensure the returned buffer is treated as empty
-        nbb.position(new_buf_size - old_buf_size);
-        nbb.put(bb);
-        return nbb;
+    if (existing_vtable != 0) {
+      // Found a match:
+      // Remove the current vtable.
+      space = bb.capacity() - vtableloc;
+      // Point table to existing vtable.
+      bb.putInt(space, existing_vtable - vtableloc);
+    } else {
+      // No match:
+      // Add the location of the current vtable to the list of vtables.
+      if (num_vtables == vtables.length) vtables = Arrays.copyOf(vtables, num_vtables * 2);
+      vtables[num_vtables++] = offset();
+      // Point table to current vtable.
+      bb.putInt(bb.capacity() - vtableloc, offset() - vtableloc);
     }
 
-   /**
-    * Offset relative to the end of the buffer.
-    *
-    * @return Offset relative to the end of the buffer.
-    */
-    public int offset() {
-        return bb.capacity() - space;
+    nested = false;
+    return vtableloc;
+  }
+
+  /**
+   * Checks that a required field has been set in a given table that has just been constructed.
+   *
+   * @param table The offset to the start of the table from the `ByteBuffer` capacity.
+   * @param field The offset to the field in the vtable.
+   */
+  public void required(int table, int field) {
+    int table_start = bb.capacity() - table;
+    int vtable_start = table_start - bb.getInt(table_start);
+    boolean ok = bb.getShort(vtable_start + field) != 0;
+    // If this fails, the caller will show what field needs to be set.
+    if (!ok) throw new AssertionError("FlatBuffers: field " + field + " must be set");
+  }
+
+  /// @endcond
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`.
+   *
+   * @param root_table An offset to be added to the buffer.
+   * @param size_prefix Whether to prefix the size to the buffer.
+   */
+  protected void finish(int root_table, boolean size_prefix) {
+    prep(minalign, SIZEOF_INT + (size_prefix ? SIZEOF_INT : 0));
+    addOffset(root_table);
+    if (size_prefix) {
+      addInt(bb.capacity() - space);
+    }
+    bb.position(space);
+    finished = true;
+  }
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`.
+   *
+   * @param root_table An offset to be added to the buffer.
+   */
+  public void finish(int root_table) {
+    finish(root_table, false);
+  }
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`, with the size prefixed.
+   *
+   * @param root_table An offset to be added to the buffer.
+   */
+  public void finishSizePrefixed(int root_table) {
+    finish(root_table, true);
+  }
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`.
+   *
+   * @param root_table An offset to be added to the buffer.
+   * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
+   *     `root_table`.
+   * @param size_prefix Whether to prefix the size to the buffer.
+   */
+  protected void finish(int root_table, String file_identifier, boolean size_prefix) {
+    prep(minalign, SIZEOF_INT + FILE_IDENTIFIER_LENGTH + (size_prefix ? SIZEOF_INT : 0));
+    if (file_identifier.length() != FILE_IDENTIFIER_LENGTH)
+      throw new AssertionError(
+          "FlatBuffers: file identifier must be length " + FILE_IDENTIFIER_LENGTH);
+    for (int i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {
+      addByte((byte) file_identifier.charAt(i));
+    }
+    finish(root_table, size_prefix);
+  }
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`.
+   *
+   * @param root_table An offset to be added to the buffer.
+   * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
+   *     `root_table`.
+   */
+  public void finish(int root_table, String file_identifier) {
+    finish(root_table, file_identifier, false);
+  }
+
+  /**
+   * Finalize a buffer, pointing to the given `root_table`, with the size prefixed.
+   *
+   * @param root_table An offset to be added to the buffer.
+   * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
+   *     `root_table`.
+   */
+  public void finishSizePrefixed(int root_table, String file_identifier) {
+    finish(root_table, file_identifier, true);
+  }
+
+  /**
+   * In order to save space, fields that are set to their default value don't get serialized into
+   * the buffer. Forcing defaults provides a way to manually disable this optimization.
+   *
+   * @param forceDefaults When set to `true`, always serializes default values.
+   * @return Returns `this`.
+   */
+  public FlatBufferBuilder forceDefaults(boolean forceDefaults) {
+    this.force_defaults = forceDefaults;
+    return this;
+  }
+
+  /**
+   * Get the ByteBuffer representing the FlatBuffer. Only call this after you've called `finish()`.
+   * The actual data starts at the ByteBuffer's current position, not necessarily at `0`.
+   *
+   * @return The {@link ByteBuffer} representing the FlatBuffer
+   */
+  public ByteBuffer dataBuffer() {
+    finished();
+    return bb;
+  }
+
+  /**
+   * The FlatBuffer data doesn't start at offset 0 in the {@link ByteBuffer}, but now the {@code
+   * ByteBuffer}'s position is set to that location upon {@link #finish(int)}.
+   *
+   * @return The {@link ByteBuffer#position() position} the data starts in {@link #dataBuffer()}
+   * @deprecated This method should not be needed anymore, but is left here for the moment to
+   *     document this API change. It will be removed in the future.
+   */
+  @Deprecated
+  private int dataStart() {
+    finished();
+    return space;
+  }
+
+  /**
+   * A utility function to copy and return the ByteBuffer data from `start` to `start` + `length` as
+   * a `byte[]`.
+   *
+   * @param start Start copying at this offset.
+   * @param length How many bytes to copy.
+   * @return A range copy of the {@link #dataBuffer() data buffer}.
+   * @throws IndexOutOfBoundsException If the range of bytes is ouf of bound.
+   */
+  public byte[] sizedByteArray(int start, int length) {
+    finished();
+    byte[] array = new byte[length];
+    bb.position(start);
+    bb.get(array);
+    return array;
+  }
+
+  /**
+   * A utility function to copy and return the ByteBuffer data as a `byte[]`.
+   *
+   * @return A full copy of the {@link #dataBuffer() data buffer}.
+   */
+  public byte[] sizedByteArray() {
+    return sizedByteArray(space, bb.capacity() - space);
+  }
+
+  /**
+   * A utility function to return an InputStream to the ByteBuffer data
+   *
+   * @return An InputStream that starts at the beginning of the ByteBuffer data and can read to the
+   *     end of it.
+   */
+  public InputStream sizedInputStream() {
+    finished();
+    ByteBuffer duplicate = bb.duplicate();
+    duplicate.position(space);
+    duplicate.limit(bb.capacity());
+    return new ByteBufferBackedInputStream(duplicate);
+  }
+
+  /** A class that allows a user to create an InputStream from a ByteBuffer. */
+  static class ByteBufferBackedInputStream extends InputStream {
+
+    ByteBuffer buf;
+
+    public ByteBufferBackedInputStream(ByteBuffer buf) {
+      this.buf = buf;
     }
 
-   /**
-    * Add zero valued bytes to prepare a new entry to be added.
-    *
-    * @param byte_size Number of bytes to add.
-    */
-    public void pad(int byte_size) {
-        for (int i = 0; i < byte_size; i++) bb.put(--space, (byte)0);
+    public int read() throws IOException {
+      try {
+        return buf.get() & 0xFF;
+      } catch (BufferUnderflowException e) {
+        return -1;
+      }
     }
-
-   /**
-    * Prepare to write an element of `size` after `additional_bytes`
-    * have been written, e.g. if you write a string, you need to align such
-    * the int length field is aligned to {@link com.google.flatbuffers.Constants#SIZEOF_INT}, and
-    * the string data follows it directly.  If all you need to do is alignment, `additional_bytes`
-    * will be 0.
-    *
-    * @param size This is the of the new element to write.
-    * @param additional_bytes The padding size.
-    */
-    public void prep(int size, int additional_bytes) {
-        // Track the biggest thing we've ever aligned to.
-        if (size > minalign) minalign = size;
-        // Find the amount of alignment needed such that `size` is properly
-        // aligned after `additional_bytes`
-        int align_size = ((~(bb.capacity() - space + additional_bytes)) + 1) & (size - 1);
-        // Reallocate the buffer if needed.
-        while (space < align_size + size + additional_bytes) {
-            int old_buf_size = bb.capacity();
-            ByteBuffer old = bb;
-            bb = growByteBuffer(old, bb_factory);
-            if (old != bb) {
-                bb_factory.releaseByteBuffer(old);
-            }
-            space += bb.capacity() - old_buf_size;
-        }
-        pad(align_size);
-    }
-
-    /**
-     * Add a `boolean` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `boolean` to put into the buffer.
-     */
-    public void putBoolean(boolean x) { bb.put      (space -= Constants.SIZEOF_BYTE, (byte)(x ? 1 : 0)); }
-
-    /**
-     * Add a `byte` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `byte` to put into the buffer.
-     */
-    public void putByte   (byte    x) { bb.put      (space -= Constants.SIZEOF_BYTE, x); }
-
-    /**
-     * Add a `short` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `short` to put into the buffer.
-     */
-    public void putShort  (short   x) { bb.putShort (space -= Constants.SIZEOF_SHORT, x); }
-
-    /**
-     * Add an `int` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x An `int` to put into the buffer.
-     */
-    public void putInt    (int     x) { bb.putInt   (space -= Constants.SIZEOF_INT, x); }
-
-    /**
-     * Add a `long` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `long` to put into the buffer.
-     */
-    public void putLong   (long    x) { bb.putLong  (space -= Constants.SIZEOF_LONG, x); }
-
-    /**
-     * Add a `float` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `float` to put into the buffer.
-     */
-    public void putFloat  (float   x) { bb.putFloat (space -= Constants.SIZEOF_FLOAT, x); }
-
-    /**
-     * Add a `double` to the buffer, backwards from the current location. Doesn't align nor
-     * check for space.
-     *
-     * @param x A `double` to put into the buffer.
-     */
-    public void putDouble (double  x) { bb.putDouble(space -= Constants.SIZEOF_DOUBLE, x); }
-    /// @endcond
-
-    /**
-     * Add a `boolean` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `boolean` to put into the buffer.
-     */
-    public void addBoolean(boolean x) { prep(Constants.SIZEOF_BYTE, 0); putBoolean(x); }
-
-    /**
-     * Add a `byte` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `byte` to put into the buffer.
-     */
-    public void addByte   (byte    x) { prep(Constants.SIZEOF_BYTE, 0); putByte   (x); }
-
-    /**
-     * Add a `short` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `short` to put into the buffer.
-     */
-    public void addShort  (short   x) { prep(Constants.SIZEOF_SHORT, 0); putShort  (x); }
-
-    /**
-     * Add an `int` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x An `int` to put into the buffer.
-     */
-    public void addInt    (int     x) { prep(Constants.SIZEOF_INT, 0); putInt    (x); }
-
-    /**
-     * Add a `long` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `long` to put into the buffer.
-     */
-    public void addLong   (long    x) { prep(Constants.SIZEOF_LONG, 0); putLong   (x); }
-
-    /**
-     * Add a `float` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `float` to put into the buffer.
-     */
-    public void addFloat  (float   x) { prep(Constants.SIZEOF_FLOAT, 0); putFloat  (x); }
-
-    /**
-     * Add a `double` to the buffer, properly aligned, and grows the buffer (if necessary).
-     *
-     * @param x A `double` to put into the buffer.
-     */
-    public void addDouble (double  x) { prep(Constants.SIZEOF_DOUBLE, 0); putDouble (x); }
-
-   /**
-    * Adds on offset, relative to where it will be written.
-    *
-    * @param off The offset to add.
-    */
-    public void addOffset(int off) {
-        prep(SIZEOF_INT, 0);  // Ensure alignment is already done.
-        assert off <= offset();
-        off = offset() - off + SIZEOF_INT;
-        putInt(off);
-    }
-
-   /// @cond FLATBUFFERS_INTERNAL
-   /**
-    * Start a new array/vector of objects.  Users usually will not call
-    * this directly.  The `FlatBuffers` compiler will create a start/end
-    * method for vector types in generated code.
-    * <p>
-    * The expected sequence of calls is:
-    * <ol>
-    * <li>Start the array using this method.</li>
-    * <li>Call {@link #addOffset(int)} `num_elems` number of times to set
-    * the offset of each element in the array.</li>
-    * <li>Call {@link #endVector()} to retrieve the offset of the array.</li>
-    * </ol>
-    * <p>
-    * For example, to create an array of strings, do:
-    * <pre>{@code
-    * // Need 10 strings
-    * FlatBufferBuilder builder = new FlatBufferBuilder(existingBuffer);
-    * int[] offsets = new int[10];
-    *
-    * for (int i = 0; i < 10; i++) {
-    *   offsets[i] = fbb.createString(" " + i);
-    * }
-    *
-    * // Have the strings in the buffer, but don't have a vector.
-    * // Add a vector that references the newly created strings:
-    * builder.startVector(4, offsets.length, 4);
-    *
-    * // Add each string to the newly created vector
-    * // The strings are added in reverse order since the buffer
-    * // is filled in back to front
-    * for (int i = offsets.length - 1; i >= 0; i--) {
-    *   builder.addOffset(offsets[i]);
-    * }
-    *
-    * // Finish off the vector
-    * int offsetOfTheVector = fbb.endVector();
-    * }</pre>
-    *
-    * @param elem_size The size of each element in the array.
-    * @param num_elems The number of elements in the array.
-    * @param alignment The alignment of the array.
-    */
-    public void startVector(int elem_size, int num_elems, int alignment) {
-        notNested();
-        vector_num_elems = num_elems;
-        prep(SIZEOF_INT, elem_size * num_elems);
-        prep(alignment, elem_size * num_elems); // Just in case alignment > int.
-        nested = true;
-    }
-
-   /**
-    * Finish off the creation of an array and all its elements.  The array
-    * must be created with {@link #startVector(int, int, int)}.
-    *
-    * @return The offset at which the newly created array starts.
-    * @see #startVector(int, int, int)
-    */
-    public int endVector() {
-        if (!nested)
-            throw new AssertionError("FlatBuffers: endVector called without startVector");
-        nested = false;
-        putInt(vector_num_elems);
-        return offset();
-    }
-    /// @endcond
-
-    /**
-     * Create a new array/vector and return a ByteBuffer to be filled later.
-     * Call {@link #endVector} after this method to get an offset to the beginning
-     * of vector.
-     *
-     * @param elem_size the size of each element in bytes.
-     * @param num_elems number of elements in the vector.
-     * @param alignment byte alignment.
-     * @return ByteBuffer with position and limit set to the space allocated for the array.
-     */
-    public ByteBuffer createUnintializedVector(int elem_size, int num_elems, int alignment) {
-        int length = elem_size * num_elems;
-        startVector(elem_size, num_elems, alignment);
-
-        bb.position(space -= length);
-
-        // Slice and limit the copy vector to point to the 'array'
-        ByteBuffer copy = bb.slice().order(ByteOrder.LITTLE_ENDIAN);
-        copy.limit(length);
-        return copy;
-    }
-
-   /**
-     * Create a vector of tables.
-     *
-     * @param offsets Offsets of the tables.
-     * @return Returns offset of the vector.
-     */
-    public int createVectorOfTables(int[] offsets) {
-        notNested();
-        startVector(Constants.SIZEOF_INT, offsets.length, Constants.SIZEOF_INT);
-        for(int i = offsets.length - 1; i >= 0; i--) addOffset(offsets[i]);
-        return endVector();
-    }
-
-    /**
-     * Create a vector of sorted by the key tables.
-     *
-     * @param obj Instance of the table subclass.
-     * @param offsets Offsets of the tables.
-     * @return Returns offset of the sorted vector.
-     */
-    public <T extends Table> int createSortedVectorOfTables(T obj, int[] offsets) {
-        obj.sortTables(offsets, bb);
-        return createVectorOfTables(offsets);
-    }
-
-    /**
-    * Encode the String `s` in the buffer using UTF-8. If a String with
-    * this exact contents has already been serialized using this method,
-    * instead simply returns the offset of the existing String.
-    *
-    * Usage of the method will incur into additional allocations,
-    * so it is advisable to use it only when it is known upfront that
-    * your message will have several repeated strings.
-    *
-    * @param s The String to encode.
-    * @return The offset in the buffer where the encoded String starts.
-    */
-    public int createSharedString(String s) {
-
-        if (string_pool == null) {
-            string_pool = new HashMap<>();
-            int offset = createString(s);
-            string_pool.put(s, offset);
-            return offset;
-
-        }
-
-        Integer offset = string_pool.get(s);
-
-        if(offset == null) {
-            offset = createString(s);
-            string_pool.put(s, offset);
-        }
-        return offset;
-    }
-
-   /**
-    * Encode the string `s` in the buffer using UTF-8.  If {@code s} is
-    * already a {@link CharBuffer}, this method is allocation free.
-    *
-    * @param s The string to encode.
-    * @return The offset in the buffer where the encoded string starts.
-    */
-    public int createString(CharSequence s) {
-        int length = utf8.encodedLength(s);
-        addByte((byte)0);
-        startVector(1, length, 1);
-        bb.position(space -= length);
-        utf8.encodeUtf8(s, bb);
-        return endVector();
-    }
-
-   /**
-    * Create a string in the buffer from an already encoded UTF-8 string in a ByteBuffer.
-    *
-    * @param s An already encoded UTF-8 string as a `ByteBuffer`.
-    * @return The offset in the buffer where the encoded string starts.
-    */
-    public int createString(ByteBuffer s) {
-        int length = s.remaining();
-        addByte((byte)0);
-        startVector(1, length, 1);
-        bb.position(space -= length);
-        bb.put(s);
-        return endVector();
-    }
-
-    /**
-     * Create a byte array in the buffer.
-     *
-     * @param arr A source array with data
-     * @return The offset in the buffer where the encoded array starts.
-     */
-    public int createByteVector(byte[] arr) {
-        int length = arr.length;
-        startVector(1, length, 1);
-        bb.position(space -= length);
-        bb.put(arr);
-        return endVector();
-    }
-
-    /**
-     * Create a byte array in the buffer.
-     *
-     * @param arr a source array with data.
-     * @param offset the offset in the source array to start copying from.
-     * @param length the number of bytes to copy from the source array.
-     * @return The offset in the buffer where the encoded array starts.
-     */
-    public int createByteVector(byte[] arr, int offset, int length) {
-        startVector(1, length, 1);
-        bb.position(space -= length);
-        bb.put(arr, offset, length);
-        return endVector();
-    }
-
-    /**
-     * Create a byte array in the buffer.
-     *
-     * The source {@link ByteBuffer} position is advanced by {@link ByteBuffer#remaining()} places
-     * after this call.
-     *
-     * @param byteBuffer A source {@link ByteBuffer} with data.
-     * @return The offset in the buffer where the encoded array starts.
-     */
-    public int createByteVector(ByteBuffer byteBuffer) {
-        int length = byteBuffer.remaining();
-        startVector(1, length, 1);
-        bb.position(space -= length);
-        bb.put(byteBuffer);
-        return endVector();
-    }
-
-   /// @cond FLATBUFFERS_INTERNAL
-   /**
-    * Should not be accessing the final buffer before it is finished.
-    */
-    public void finished() {
-        if (!finished)
-            throw new AssertionError(
-                "FlatBuffers: you can only access the serialized buffer after it has been" +
-                " finished by FlatBufferBuilder.finish().");
-    }
-
-   /**
-    * Should not be creating any other object, string or vector
-    * while an object is being constructed.
-    */
-    public void notNested() {
-        if (nested)
-            throw new AssertionError("FlatBuffers: object serialization must not be nested.");
-    }
-
-   /**
-    * Structures are always stored inline, they need to be created right
-    * where they're used.  You'll get this assertion failure if you
-    * created it elsewhere.
-    *
-    * @param obj The offset of the created object.
-    */
-    public void Nested(int obj) {
-        if (obj != offset())
-            throw new AssertionError("FlatBuffers: struct must be serialized inline.");
-    }
-
-   /**
-    * Start encoding a new object in the buffer.  Users will not usually need to
-    * call this directly. The `FlatBuffers` compiler will generate helper methods
-    * that call this method internally.
-    * <p>
-    * For example, using the "Monster" code found on the "landing page". An
-    * object of type `Monster` can be created using the following code:
-    *
-    * <pre>{@code
-    * int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] {
-    *   fbb.createString("test1"),
-    *   fbb.createString("test2")
-    * });
-    *
-    * Monster.startMonster(fbb);
-    * Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0,
-    *   Color.Green, (short)5, (byte)6));
-    * Monster.addHp(fbb, (short)80);
-    * Monster.addName(fbb, str);
-    * Monster.addInventory(fbb, inv);
-    * Monster.addTestType(fbb, (byte)Any.Monster);
-    * Monster.addTest(fbb, mon2);
-    * Monster.addTest4(fbb, test4);
-    * Monster.addTestarrayofstring(fbb, testArrayOfString);
-    * int mon = Monster.endMonster(fbb);
-    * }</pre>
-    * <p>
-    * Here:
-    * <ul>
-    * <li>The call to `Monster#startMonster(FlatBufferBuilder)` will call this
-    * method with the right number of fields set.</li>
-    * <li>`Monster#endMonster(FlatBufferBuilder)` will ensure {@link #endObject()} is called.</li>
-    * </ul>
-    * <p>
-    * It's not recommended to call this method directly.  If it's called manually, you must ensure
-    * to audit all calls to it whenever fields are added or removed from your schema.  This is
-    * automatically done by the code generated by the `FlatBuffers` compiler.
-    *
-    * @param numfields The number of fields found in this object.
-    */
-    public void startTable(int numfields) {
-        notNested();
-        if (vtable == null || vtable.length < numfields) vtable = new int[numfields];
-        vtable_in_use = numfields;
-        Arrays.fill(vtable, 0, vtable_in_use, 0);
-        nested = true;
-        object_start = offset();
-    }
-
-    /**
-     * Add a `boolean` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `boolean` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `boolean` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addBoolean(int o, boolean x, boolean d) { if(force_defaults || x != d) { addBoolean(x); slot(o); } }
-
-    /**
-     * Add a `byte` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `byte` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `byte` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addByte   (int o, byte    x, int     d) { if(force_defaults || x != d) { addByte   (x); slot(o); } }
-
-    /**
-     * Add a `short` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `short` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `short` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addShort  (int o, short   x, int     d) { if(force_defaults || x != d) { addShort  (x); slot(o); } }
-
-    /**
-     * Add an `int` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x An `int` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d An `int` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addInt    (int o, int     x, int     d) { if(force_defaults || x != d) { addInt    (x); slot(o); } }
-
-    /**
-     * Add a `long` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `long` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `long` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addLong   (int o, long    x, long    d) { if(force_defaults || x != d) { addLong   (x); slot(o); } }
-
-    /**
-     * Add a `float` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `float` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `float` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addFloat  (int o, float   x, double  d) { if(force_defaults || x != d) { addFloat  (x); slot(o); } }
-
-    /**
-     * Add a `double` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x A `double` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d A `double` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addDouble (int o, double  x, double  d) { if(force_defaults || x != d) { addDouble (x); slot(o); } }
-
-    /**
-     * Add an `offset` to a table at `o` into its vtable, with value `x` and default `d`.
-     *
-     * @param o The index into the vtable.
-     * @param x An `offset` to put into the buffer, depending on how defaults are handled. If
-     * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-     * default value, it can be skipped.
-     * @param d An `offset` default value to compare against when `force_defaults` is `false`.
-     */
-    public void addOffset (int o, int     x, int     d) { if(force_defaults || x != d) { addOffset (x); slot(o); } }
-
-    /**
-     * Add a struct to the table. Structs are stored inline, so nothing additional is being added.
-     *
-     * @param voffset The index into the vtable.
-     * @param x The offset of the created struct.
-     * @param d The default value is always `0`.
-     */
-    public void addStruct(int voffset, int x, int d) {
-        if(x != d) {
-            Nested(x);
-            slot(voffset);
-        }
-    }
-
-    /**
-     * Set the current vtable at `voffset` to the current location in the buffer.
-     *
-     * @param voffset The index into the vtable to store the offset relative to the end of the
-     * buffer.
-     */
-    public void slot(int voffset) {
-        vtable[voffset] = offset();
-    }
-
-   /**
-    * Finish off writing the object that is under construction.
-    *
-    * @return The offset to the object inside {@link #dataBuffer()}.
-    * @see #startTable(int)
-    */
-    public int endTable() {
-        if (vtable == null || !nested)
-            throw new AssertionError("FlatBuffers: endTable called without startTable");
-        addInt(0);
-        int vtableloc = offset();
-        // Write out the current vtable.
-        int i = vtable_in_use - 1;
-        // Trim trailing zeroes.
-        for (; i >= 0 && vtable[i] == 0; i--) {}
-        int trimmed_size = i + 1;
-        for (; i >= 0 ; i--) {
-            // Offset relative to the start of the table.
-            short off = (short)(vtable[i] != 0 ? vtableloc - vtable[i] : 0);
-            addShort(off);
-        }
-
-        final int standard_fields = 2; // The fields below:
-        addShort((short)(vtableloc - object_start));
-        addShort((short)((trimmed_size + standard_fields) * SIZEOF_SHORT));
-
-        // Search for an existing vtable that matches the current one.
-        int existing_vtable = 0;
-        outer_loop:
-        for (i = 0; i < num_vtables; i++) {
-            int vt1 = bb.capacity() - vtables[i];
-            int vt2 = space;
-            short len = bb.getShort(vt1);
-            if (len == bb.getShort(vt2)) {
-                for (int j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {
-                    if (bb.getShort(vt1 + j) != bb.getShort(vt2 + j)) {
-                        continue outer_loop;
-                    }
-                }
-                existing_vtable = vtables[i];
-                break outer_loop;
-            }
-        }
-
-        if (existing_vtable != 0) {
-            // Found a match:
-            // Remove the current vtable.
-            space = bb.capacity() - vtableloc;
-            // Point table to existing vtable.
-            bb.putInt(space, existing_vtable - vtableloc);
-        } else {
-            // No match:
-            // Add the location of the current vtable to the list of vtables.
-            if (num_vtables == vtables.length) vtables = Arrays.copyOf(vtables, num_vtables * 2);
-            vtables[num_vtables++] = offset();
-            // Point table to current vtable.
-            bb.putInt(bb.capacity() - vtableloc, offset() - vtableloc);
-        }
-
-        nested = false;
-        return vtableloc;
-    }
-
-    /**
-     * Checks that a required field has been set in a given table that has
-     * just been constructed.
-     *
-     * @param table The offset to the start of the table from the `ByteBuffer` capacity.
-     * @param field The offset to the field in the vtable.
-     */
-    public void required(int table, int field) {
-        int table_start = bb.capacity() - table;
-        int vtable_start = table_start - bb.getInt(table_start);
-        boolean ok = bb.getShort(vtable_start + field) != 0;
-        // If this fails, the caller will show what field needs to be set.
-        if (!ok)
-            throw new AssertionError("FlatBuffers: field " + field + " must be set");
-    }
-    /// @endcond
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`.
-     *
-     * @param root_table An offset to be added to the buffer.
-     * @param size_prefix Whether to prefix the size to the buffer.
-     */
-    protected void finish(int root_table, boolean size_prefix) {
-        prep(minalign, SIZEOF_INT + (size_prefix ? SIZEOF_INT : 0));
-        addOffset(root_table);
-        if (size_prefix) {
-            addInt(bb.capacity() - space);
-        }
-        bb.position(space);
-        finished = true;
-    }
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`.
-     *
-     * @param root_table An offset to be added to the buffer.
-     */
-    public void finish(int root_table) {
-        finish(root_table, false);
-    }
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`, with the size prefixed.
-     *
-     * @param root_table An offset to be added to the buffer.
-     */
-    public void finishSizePrefixed(int root_table) {
-        finish(root_table, true);
-    }
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`.
-     *
-     * @param root_table An offset to be added to the buffer.
-     * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
-     * `root_table`.
-     * @param size_prefix Whether to prefix the size to the buffer.
-     */
-    protected void finish(int root_table, String file_identifier, boolean size_prefix) {
-        prep(minalign, SIZEOF_INT + FILE_IDENTIFIER_LENGTH + (size_prefix ? SIZEOF_INT : 0));
-        if (file_identifier.length() != FILE_IDENTIFIER_LENGTH)
-            throw new AssertionError("FlatBuffers: file identifier must be length " +
-                                     FILE_IDENTIFIER_LENGTH);
-        for (int i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {
-            addByte((byte)file_identifier.charAt(i));
-        }
-        finish(root_table, size_prefix);
-    }
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`.
-     *
-     * @param root_table An offset to be added to the buffer.
-     * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
-     * `root_table`.
-     */
-    public void finish(int root_table, String file_identifier) {
-        finish(root_table, file_identifier, false);
-    }
-
-    /**
-     * Finalize a buffer, pointing to the given `root_table`, with the size prefixed.
-     *
-     * @param root_table An offset to be added to the buffer.
-     * @param file_identifier A FlatBuffer file identifier to be added to the buffer before
-     * `root_table`.
-     */
-    public void finishSizePrefixed(int root_table, String file_identifier) {
-        finish(root_table, file_identifier, true);
-    }
-
-    /**
-     * In order to save space, fields that are set to their default value
-     * don't get serialized into the buffer. Forcing defaults provides a
-     * way to manually disable this optimization.
-     *
-     * @param forceDefaults When set to `true`, always serializes default values.
-     * @return Returns `this`.
-     */
-    public FlatBufferBuilder forceDefaults(boolean forceDefaults){
-        this.force_defaults = forceDefaults;
-        return this;
-    }
-
-    /**
-     * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
-     * called `finish()`. The actual data starts at the ByteBuffer's current position,
-     * not necessarily at `0`.
-     *
-     * @return The {@link ByteBuffer} representing the FlatBuffer
-     */
-    public ByteBuffer dataBuffer() {
-        finished();
-        return bb;
-    }
-
-   /**
-    * The FlatBuffer data doesn't start at offset 0 in the {@link ByteBuffer}, but
-    * now the {@code ByteBuffer}'s position is set to that location upon {@link #finish(int)}.
-    *
-    * @return The {@link ByteBuffer#position() position} the data starts in {@link #dataBuffer()}
-    * @deprecated This method should not be needed anymore, but is left
-    * here for the moment to document this API change. It will be removed in the future.
-    */
-    @Deprecated
-    private int dataStart() {
-        finished();
-        return space;
-    }
-
-   /**
-    * A utility function to copy and return the ByteBuffer data from `start` to
-    * `start` + `length` as a `byte[]`.
-    *
-    * @param start Start copying at this offset.
-    * @param length How many bytes to copy.
-    * @return A range copy of the {@link #dataBuffer() data buffer}.
-    * @throws IndexOutOfBoundsException If the range of bytes is ouf of bound.
-    */
-    public byte[] sizedByteArray(int start, int length){
-        finished();
-        byte[] array = new byte[length];
-        bb.position(start);
-        bb.get(array);
-        return array;
-    }
-
-   /**
-    * A utility function to copy and return the ByteBuffer data as a `byte[]`.
-    *
-    * @return A full copy of the {@link #dataBuffer() data buffer}.
-    */
-    public byte[] sizedByteArray() {
-        return sizedByteArray(space, bb.capacity() - space);
-    }
-
-    /**
-     * A utility function to return an InputStream to the ByteBuffer data
-     *
-     * @return An InputStream that starts at the beginning of the ByteBuffer data
-     *         and can read to the end of it.
-     */
-    public InputStream sizedInputStream() {
-        finished();
-        ByteBuffer duplicate = bb.duplicate();
-        duplicate.position(space);
-        duplicate.limit(bb.capacity());
-        return new ByteBufferBackedInputStream(duplicate);
-    }
-
-    /**
-     * A class that allows a user to create an InputStream from a ByteBuffer.
-     */
-    static class ByteBufferBackedInputStream extends InputStream {
-
-        ByteBuffer buf;
-
-        public ByteBufferBackedInputStream(ByteBuffer buf) {
-            this.buf = buf;
-        }
-
-        public int read() throws IOException {
-            try {
-                return buf.get() & 0xFF;
-            } catch(BufferUnderflowException e) {
-                return -1;
-            }
-        }
-    }
-
+  }
 }
 
 /// @}
diff --git a/java/src/main/java/com/google/flatbuffers/FlexBuffers.java b/java/src/main/java/com/google/flatbuffers/FlexBuffers.java
index 75a0595..89d9d1d 100644
--- a/java/src/main/java/com/google/flatbuffers/FlexBuffers.java
+++ b/java/src/main/java/com/google/flatbuffers/FlexBuffers.java
@@ -16,14 +16,11 @@
 
 package com.google.flatbuffers;
 
-
 import static com.google.flatbuffers.FlexBuffers.Unsigned.byteToUnsignedInt;
 import static com.google.flatbuffers.FlexBuffers.Unsigned.intToUnsignedLong;
 import static com.google.flatbuffers.FlexBuffers.Unsigned.shortToUnsignedInt;
 
-import java.math.BigInteger;
 import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
 
 /// @file
 /// @addtogroup flatbuffers_java_api
@@ -31,10 +28,11 @@
 
 /**
  * This class can be used to parse FlexBuffer messages.
- * <p>
- * For generating FlexBuffer messages, use {@link FlexBuffersBuilder}.
- * <p>
- * Example of usage:
+ *
+ * <p>For generating FlexBuffer messages, use {@link FlexBuffersBuilder}.
+ *
+ * <p>Example of usage:
+ *
  * <pre>
  * ReadBuf bb = ... // load message from file or network
  * FlexBuffers.Reference r = FlexBuffers.getRoot(bb); // Reads the root element
@@ -44,1178 +42,1262 @@
  */
 public class FlexBuffers {
 
-    // These are used as the upper 6 bits of a type field to indicate the actual
-    // type.
-    /** Represent a null type */
-    public static final int FBT_NULL = 0;
-    /** Represent a signed integer type */
-    public static final int FBT_INT = 1;
-    /** Represent a unsigned type */
-    public static final int FBT_UINT = 2;
-    /** Represent a float type */
-    public static final int FBT_FLOAT = 3; // Types above stored inline, types below store an offset.
-    /** Represent a key to a map type */
-    public static final int FBT_KEY = 4;
-    /** Represent a string type */
-    public static final int FBT_STRING = 5;
-    /** Represent a indirect signed integer type */
-    public static final int FBT_INDIRECT_INT = 6;
-    /** Represent a indirect unsigned integer type */
-    public static final int FBT_INDIRECT_UINT = 7;
-    /** Represent a indirect float type */
-    public static final int FBT_INDIRECT_FLOAT = 8;
-    /** Represent a map type */
-    public static final int FBT_MAP = 9;
-    /** Represent a vector type */
-    public static final int FBT_VECTOR = 10; // Untyped.
-    /** Represent a vector of signed integers type */
-    public static final int FBT_VECTOR_INT = 11;  // Typed any size  = stores no type table).
-    /** Represent a vector of unsigned integers type */
-    public static final int FBT_VECTOR_UINT = 12;
-    /** Represent a vector of floats type */
-    public static final int FBT_VECTOR_FLOAT = 13;
-    /** Represent a vector of keys type */
-    public static final int FBT_VECTOR_KEY = 14;
-    /** Represent a vector of strings type */
-    // DEPRECATED, use FBT_VECTOR or FBT_VECTOR_KEY instead.
-    // more info on thttps://github.com/google/flatbuffers/issues/5627.
-    public static final int FBT_VECTOR_STRING_DEPRECATED = 15;
+  // These are used as the upper 6 bits of a type field to indicate the actual
+  // type.
+  /** Represent a null type */
+  public static final int FBT_NULL = 0;
 
-    /// @cond FLATBUFFERS_INTERNAL
-    public static final int FBT_VECTOR_INT2 = 16;  // Typed tuple  = no type table; no size field).
-    public static final int FBT_VECTOR_UINT2 = 17;
-    public static final int FBT_VECTOR_FLOAT2 = 18;
-    public static final int FBT_VECTOR_INT3 = 19;  // Typed triple  = no type table; no size field).
-    public static final int FBT_VECTOR_UINT3 = 20;
-    public static final int FBT_VECTOR_FLOAT3 = 21;
-    public static final int FBT_VECTOR_INT4 = 22;  // Typed quad  = no type table; no size field).
-    public static final int FBT_VECTOR_UINT4 = 23;
-    public static final int FBT_VECTOR_FLOAT4 = 24;
-    /// @endcond FLATBUFFERS_INTERNAL
+  /** Represent a signed integer type */
+  public static final int FBT_INT = 1;
 
-    /** Represent a blob type */
-    public static final int FBT_BLOB = 25;
-    /** Represent a boolean type */
-    public static final int FBT_BOOL = 26;
-    /** Represent a vector of booleans type */
-    public static final int FBT_VECTOR_BOOL = 36;  // To Allow the same type of conversion of type to vector type
+  /** Represent a unsigned type */
+  public static final int FBT_UINT = 2;
 
-    private static final ReadBuf EMPTY_BB = new ArrayReadWriteBuf(new byte[] {0}, 1);
+  /** Represent a float type */
+  public static final int FBT_FLOAT = 3; // Types above stored inline, types below store an offset.
+
+  /** Represent a key to a map type */
+  public static final int FBT_KEY = 4;
+
+  /** Represent a string type */
+  public static final int FBT_STRING = 5;
+
+  /** Represent a indirect signed integer type */
+  public static final int FBT_INDIRECT_INT = 6;
+
+  /** Represent a indirect unsigned integer type */
+  public static final int FBT_INDIRECT_UINT = 7;
+
+  /** Represent a indirect float type */
+  public static final int FBT_INDIRECT_FLOAT = 8;
+
+  /** Represent a map type */
+  public static final int FBT_MAP = 9;
+
+  /** Represent a vector type */
+  public static final int FBT_VECTOR = 10; // Untyped.
+
+  /** Represent a vector of signed integers type */
+  public static final int FBT_VECTOR_INT = 11; // Typed any size  = stores no type table).
+
+  /** Represent a vector of unsigned integers type */
+  public static final int FBT_VECTOR_UINT = 12;
+
+  /** Represent a vector of floats type */
+  public static final int FBT_VECTOR_FLOAT = 13;
+
+  /** Represent a vector of keys type */
+  public static final int FBT_VECTOR_KEY = 14;
+
+  /** Represent a vector of strings type */
+  // DEPRECATED, use FBT_VECTOR or FBT_VECTOR_KEY instead.
+  // more info on thttps://github.com/google/flatbuffers/issues/5627.
+  public static final int FBT_VECTOR_STRING_DEPRECATED = 15;
+
+  /// @cond FLATBUFFERS_INTERNAL
+  public static final int FBT_VECTOR_INT2 = 16; // Typed tuple  = no type table; no size field).
+  public static final int FBT_VECTOR_UINT2 = 17;
+  public static final int FBT_VECTOR_FLOAT2 = 18;
+  public static final int FBT_VECTOR_INT3 = 19; // Typed triple  = no type table; no size field).
+  public static final int FBT_VECTOR_UINT3 = 20;
+  public static final int FBT_VECTOR_FLOAT3 = 21;
+  public static final int FBT_VECTOR_INT4 = 22; // Typed quad  = no type table; no size field).
+  public static final int FBT_VECTOR_UINT4 = 23;
+  public static final int FBT_VECTOR_FLOAT4 = 24;
+
+  /// @endcond FLATBUFFERS_INTERNAL
+
+  /** Represent a blob type */
+  public static final int FBT_BLOB = 25;
+
+  /** Represent a boolean type */
+  public static final int FBT_BOOL = 26;
+
+  /** Represent a vector of booleans type */
+  public static final int FBT_VECTOR_BOOL =
+      36; // To Allow the same type of conversion of type to vector type
+
+  private static final ReadBuf EMPTY_BB = new ArrayReadWriteBuf(new byte[] {0}, 1);
+
+  /**
+   * Checks where a type is a typed vector
+   *
+   * @param type type to be checked
+   * @return true if typed vector
+   */
+  static boolean isTypedVector(int type) {
+    return (type >= FBT_VECTOR_INT && type <= FBT_VECTOR_STRING_DEPRECATED)
+        || type == FBT_VECTOR_BOOL;
+  }
+
+  /**
+   * Check whether you can access type directly (no indirection) or not.
+   *
+   * @param type type to be checked
+   * @return true if inline type
+   */
+  static boolean isTypeInline(int type) {
+    return type <= FBT_FLOAT || type == FBT_BOOL;
+  }
+
+  static int toTypedVectorElementType(int original_type) {
+    return original_type - FBT_VECTOR_INT + FBT_INT;
+  }
+
+  /**
+   * Return a vector type our of a original element type
+   *
+   * @param type element type
+   * @param fixedLength size of element
+   * @return typed vector type
+   */
+  static int toTypedVector(int type, int fixedLength) {
+    assert (isTypedVectorElementType(type));
+    switch (fixedLength) {
+      case 0:
+        return type - FBT_INT + FBT_VECTOR_INT;
+      case 2:
+        return type - FBT_INT + FBT_VECTOR_INT2;
+      case 3:
+        return type - FBT_INT + FBT_VECTOR_INT3;
+      case 4:
+        return type - FBT_INT + FBT_VECTOR_INT4;
+      default:
+        assert (false);
+        return FBT_NULL;
+    }
+  }
+
+  static boolean isTypedVectorElementType(int type) {
+    return (type >= FBT_INT && type <= FBT_KEY) || type == FBT_BOOL;
+  }
+
+  // return position of the element that the offset is pointing to
+  private static int indirect(ReadBuf bb, int offset, int byteWidth) {
+    // we assume all offset fits on a int, since ReadBuf operates with that assumption
+    return (int) (offset - readUInt(bb, offset, byteWidth));
+  }
+
+  // read unsigned int with size byteWidth and return as a 64-bit integer
+  private static long readUInt(ReadBuf buff, int end, int byteWidth) {
+    switch (byteWidth) {
+      case 1:
+        return byteToUnsignedInt(buff.get(end));
+      case 2:
+        return shortToUnsignedInt(buff.getShort(end));
+      case 4:
+        return intToUnsignedLong(buff.getInt(end));
+      case 8:
+        return buff.getLong(
+            end); // We are passing signed long here. Losing information (user should know)
+      default:
+        return -1; // we should never reach here
+    }
+  }
+
+  // read signed int of size byteWidth and return as 32-bit int
+  private static int readInt(ReadBuf buff, int end, int byteWidth) {
+    return (int) readLong(buff, end, byteWidth);
+  }
+
+  // read signed int of size byteWidth and return as 64-bit int
+  private static long readLong(ReadBuf buff, int end, int byteWidth) {
+    switch (byteWidth) {
+      case 1:
+        return buff.get(end);
+      case 2:
+        return buff.getShort(end);
+      case 4:
+        return buff.getInt(end);
+      case 8:
+        return buff.getLong(end);
+      default:
+        return -1; // we should never reach here
+    }
+  }
+
+  private static double readDouble(ReadBuf buff, int end, int byteWidth) {
+    switch (byteWidth) {
+      case 4:
+        return buff.getFloat(end);
+      case 8:
+        return buff.getDouble(end);
+      default:
+        return -1; // we should never reach here
+    }
+  }
+
+  /**
+   * Reads a FlexBuffer message in ReadBuf and returns {@link Reference} to the root element.
+   *
+   * @param buffer ReadBuf containing FlexBuffer message
+   * @return {@link Reference} to the root object
+   */
+  @Deprecated
+  public static Reference getRoot(ByteBuffer buffer) {
+    return getRoot(
+        buffer.hasArray()
+            ? new ArrayReadWriteBuf(buffer.array(), buffer.limit())
+            : new ByteBufferReadWriteBuf(buffer));
+  }
+
+  /**
+   * Reads a FlexBuffer message in ReadBuf and returns {@link Reference} to the root element.
+   *
+   * @param buffer ReadBuf containing FlexBuffer message
+   * @return {@link Reference} to the root object
+   */
+  public static Reference getRoot(ReadBuf buffer) {
+    // See Finish() below for the serialization counterpart of this.
+    // The root ends at the end of the buffer, so we parse backwards from there.
+    int end = buffer.limit();
+    int byteWidth = buffer.get(--end);
+    int packetType = byteToUnsignedInt(buffer.get(--end));
+    end -= byteWidth; // The root data item.
+    return new Reference(buffer, end, byteWidth, packetType);
+  }
+
+  /** Represents an generic element in the buffer. */
+  public static class Reference {
+
+    private static final Reference NULL_REFERENCE = new Reference(EMPTY_BB, 0, 1, 0);
+    private ReadBuf bb;
+    private int end;
+    private int parentWidth;
+    private int byteWidth;
+    private int type;
+
+    Reference(ReadBuf bb, int end, int parentWidth, int packedType) {
+      this(bb, end, parentWidth, (1 << (packedType & 3)), packedType >> 2);
+    }
+
+    Reference(ReadBuf bb, int end, int parentWidth, int byteWidth, int type) {
+      this.bb = bb;
+      this.end = end;
+      this.parentWidth = parentWidth;
+      this.byteWidth = byteWidth;
+      this.type = type;
+    }
 
     /**
-     * Checks where a type is a typed vector
+     * Return element type
      *
-     * @param type type to be checked
-     * @return true if typed vector
+     * @return element type as integer
      */
-    static boolean isTypedVector(int type) {
-        return (type >= FBT_VECTOR_INT && type <= FBT_VECTOR_STRING_DEPRECATED) || type == FBT_VECTOR_BOOL;
+    public int getType() {
+      return type;
     }
 
     /**
-     * Check whether you can access type directly (no indirection) or not.
+     * Checks whether the element is null type
      *
-     * @param type type to be checked
-     * @return true if inline type
+     * @return true if null type
      */
-    static boolean isTypeInline(int type) {
-        return type <= FBT_FLOAT || type == FBT_BOOL;
-    }
-
-    static int toTypedVectorElementType(int original_type) {
-        return original_type - FBT_VECTOR_INT + FBT_INT;
+    public boolean isNull() {
+      return type == FBT_NULL;
     }
 
     /**
-     * Return a vector type our of a original element type
+     * Checks whether the element is boolean type
      *
-     * @param type        element type
-     * @param fixedLength size of element
-     * @return typed vector type
+     * @return true if boolean type
      */
-    static int toTypedVector(int type, int fixedLength) {
-        assert (isTypedVectorElementType(type));
-        switch (fixedLength) {
-            case 0: return type - FBT_INT + FBT_VECTOR_INT;
-            case 2: return type - FBT_INT + FBT_VECTOR_INT2;
-            case 3: return type - FBT_INT + FBT_VECTOR_INT3;
-            case 4: return type - FBT_INT + FBT_VECTOR_INT4;
-            default:
-                assert (false);
-                return FBT_NULL;
-        }
-    }
-
-    static boolean isTypedVectorElementType(int type) {
-        return (type >= FBT_INT && type <= FBT_KEY) || type == FBT_BOOL;
-    }
-
-    // return position of the element that the offset is pointing to
-    private static int indirect(ReadBuf bb, int offset, int byteWidth) {
-        // we assume all offset fits on a int, since ReadBuf operates with that assumption
-        return (int) (offset - readUInt(bb, offset, byteWidth));
-    }
-
-    // read unsigned int with size byteWidth and return as a 64-bit integer
-    private static long readUInt(ReadBuf buff, int end, int byteWidth) {
-        switch (byteWidth) {
-            case 1: return byteToUnsignedInt(buff.get(end));
-            case 2: return shortToUnsignedInt(buff.getShort(end));
-            case 4: return intToUnsignedLong(buff.getInt(end));
-            case 8: return buff.getLong(end); // We are passing signed long here. Losing information (user should know)
-            default: return -1; // we should never reach here
-        }
-    }
-
-    // read signed int of size byteWidth and return as 32-bit int
-    private static int readInt(ReadBuf buff, int end, int byteWidth) {
-        return (int) readLong(buff, end, byteWidth);
-    }
-
-    // read signed int of size byteWidth and return as 64-bit int
-    private static long readLong(ReadBuf buff, int end, int byteWidth) {
-        switch (byteWidth) {
-            case 1: return buff.get(end);
-            case 2: return buff.getShort(end);
-            case 4: return buff.getInt(end);
-            case 8: return buff.getLong(end);
-            default: return -1; // we should never reach here
-        }
-    }
-
-    private static double readDouble(ReadBuf buff, int end, int byteWidth) {
-        switch (byteWidth) {
-            case 4: return buff.getFloat(end);
-            case 8: return buff.getDouble(end);
-            default: return -1; // we should never reach here
-        }
+    public boolean isBoolean() {
+      return type == FBT_BOOL;
     }
 
     /**
-     * Reads a FlexBuffer message in ReadBuf and returns {@link Reference} to
-     * the root element.
-     * @param buffer ReadBuf containing FlexBuffer message
-     * @return {@link Reference} to the root object
-     */
-    @Deprecated
-    public static Reference getRoot(ByteBuffer buffer) {
-        return getRoot( buffer.hasArray() ? new ArrayReadWriteBuf(buffer.array(), buffer.limit()) : new ByteBufferReadWriteBuf(buffer));
-    }
-
-        /**
-     * Reads a FlexBuffer message in ReadBuf and returns {@link Reference} to
-     * the root element.
-     * @param buffer ReadBuf containing FlexBuffer message
-     * @return {@link Reference} to the root object
-     */
-    public static Reference getRoot(ReadBuf buffer) {
-        // See Finish() below for the serialization counterpart of this.
-        // The root ends at the end of the buffer, so we parse backwards from there.
-        int end = buffer.limit();
-        int byteWidth = buffer.get(--end);
-        int packetType = byteToUnsignedInt(buffer.get(--end));
-        end -= byteWidth;  // The root data item.
-        return new Reference(buffer, end, byteWidth, packetType);
-    }
-
-    /**
-     * Represents an generic element in the buffer.
-     */
-    public static class Reference {
-
-        private static final Reference NULL_REFERENCE = new Reference(EMPTY_BB, 0, 1, 0);
-        private ReadBuf bb;
-        private int end;
-        private int parentWidth;
-        private int byteWidth;
-        private int type;
-
-        Reference(ReadBuf bb, int end, int parentWidth, int packedType) {
-            this(bb, end, parentWidth, (1 << (packedType & 3)), packedType >> 2);
-        }
-
-        Reference(ReadBuf bb, int end, int parentWidth, int byteWidth, int type) {
-            this.bb = bb;
-            this.end = end;
-            this.parentWidth = parentWidth;
-            this.byteWidth = byteWidth;
-            this.type = type;
-        }
-
-        /**
-         * Return element type
-         * @return element type as integer
-         */
-        public int getType() {
-            return type;
-        }
-
-        /**
-         * Checks whether the element is null type
-         * @return true if null type
-         */
-        public boolean isNull() {
-            return type == FBT_NULL;
-        }
-
-        /**
-         * Checks whether the element is boolean type
-         * @return true if boolean type
-         */
-        public boolean isBoolean() {
-            return type == FBT_BOOL;
-        }
-
-        /**
-         * Checks whether the element type is numeric (signed/unsigned integers and floats)
-         * @return true if numeric type
-         */
-        public boolean isNumeric() {
-            return isIntOrUInt() || isFloat();
-        }
-
-        /**
-         * Checks whether the element type is signed or unsigned integers
-         * @return true if an integer type
-         */
-        public boolean isIntOrUInt() {
-            return isInt() || isUInt();
-        }
-
-        /**
-         * Checks whether the element type is float
-         * @return true if a float type
-         */
-        public boolean isFloat() {
-            return type == FBT_FLOAT || type == FBT_INDIRECT_FLOAT;
-        }
-
-        /**
-         * Checks whether the element type is signed integer
-         * @return true if a signed integer type
-         */
-        public boolean isInt() {
-            return type == FBT_INT || type == FBT_INDIRECT_INT;
-        }
-
-        /**
-         * Checks whether the element type is signed integer
-         * @return true if a signed integer type
-         */
-        public boolean isUInt() {
-            return type == FBT_UINT || type == FBT_INDIRECT_UINT;
-        }
-
-        /**
-         * Checks whether the element type is string
-         * @return true if a string type
-         */
-        public boolean isString() {
-            return type == FBT_STRING;
-        }
-
-        /**
-         * Checks whether the element type is key
-         * @return true if a key type
-         */
-        public boolean isKey() {
-            return type == FBT_KEY;
-        }
-
-        /**
-         * Checks whether the element type is vector
-         * @return true if a vector type
-         */
-        public boolean isVector() {
-            return type == FBT_VECTOR || type == FBT_MAP;
-        }
-
-        /**
-         * Checks whether the element type is typed vector
-         * @return true if a typed vector type
-         */
-        public boolean isTypedVector() {
-            return FlexBuffers.isTypedVector(type);
-        }
-
-        /**
-         * Checks whether the element type is a map
-         * @return true if a map type
-         */
-        public boolean isMap() {
-            return type == FBT_MAP;
-        }
-
-        /**
-         * Checks whether the element type is a blob
-         * @return true if a blob type
-         */
-        public boolean isBlob() {
-            return type == FBT_BLOB;
-        }
-
-        /**
-         * Returns element as 32-bit integer.
-         * <p> For vector element, it will return size of the vector</p>
-         * <p> For String element, it will type to be parsed as integer</p>
-         * <p> Unsigned elements will become negative</p>
-         * <p> Float elements will be casted to integer </p>
-         * @return 32-bit integer or 0 if fail to convert element to integer.
-         */
-        public int asInt() {
-            if (type == FBT_INT) {
-                // A fast path for the common case.
-                return readInt(bb, end, parentWidth);
-            } else
-                switch (type) {
-                    case FBT_INDIRECT_INT: return readInt(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_UINT: return (int) readUInt(bb, end, parentWidth);
-                    case FBT_INDIRECT_UINT: return (int) readUInt(bb, indirect(bb, end, parentWidth), parentWidth);
-                    case FBT_FLOAT: return (int) readDouble(bb, end, parentWidth);
-                    case FBT_INDIRECT_FLOAT: return (int) readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_NULL: return 0;
-                    case FBT_STRING: return Integer.parseInt(asString());
-                    case FBT_VECTOR: return asVector().size();
-                    case FBT_BOOL: return readInt(bb, end, parentWidth);
-                    default:
-                        // Convert other things to int.
-                        return 0;
-                }
-        }
-
-        /**
-         * Returns element as unsigned 64-bit integer.
-         * <p> For vector element, it will return size of the vector</p>
-         * <p> For String element, it will type to be parsed as integer</p>
-         * <p> Negative signed elements will become unsigned counterpart</p>
-         * <p> Float elements will be casted to integer </p>
-         * @return 64-bit integer or 0 if fail to convert element to integer.
-         */
-        public long asUInt() {
-            if (type == FBT_UINT) {
-                // A fast path for the common case.
-                return readUInt(bb, end, parentWidth);
-            } else
-                switch (type) {
-                    case FBT_INDIRECT_UINT: return readUInt(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_INT: return readLong(bb, end, parentWidth);
-                    case FBT_INDIRECT_INT: return readLong(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_FLOAT: return (long) readDouble(bb, end, parentWidth);
-                    case FBT_INDIRECT_FLOAT: return (long) readDouble(bb,  indirect(bb, end, parentWidth), parentWidth);
-                    case FBT_NULL: return 0;
-                    case FBT_STRING: return Long.parseLong(asString());
-                    case FBT_VECTOR: return asVector().size();
-                    case FBT_BOOL: return readInt(bb, end, parentWidth);
-                    default:
-                        // Convert other things to uint.
-                        return 0;
-                }
-        }
-
-        /**
-         * Returns element as 64-bit integer.
-         * <p> For vector element, it will return size of the vector</p>
-         * <p> For String element, it will type to be parsed as integer</p>
-         * <p> Unsigned elements will become negative</p>
-         * <p> Float elements will be casted to integer </p>
-         * @return 64-bit integer or 0 if fail to convert element to long.
-         */
-        public long asLong() {
-            if (type == FBT_INT) {
-                // A fast path for the common case.
-                return readLong(bb, end, parentWidth);
-            } else
-                switch (type) {
-                    case FBT_INDIRECT_INT: return readLong(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_UINT: return readUInt(bb, end, parentWidth);
-                    case FBT_INDIRECT_UINT: return readUInt(bb, indirect(bb, end, parentWidth), parentWidth);
-                    case FBT_FLOAT: return (long) readDouble(bb, end, parentWidth);
-                    case FBT_INDIRECT_FLOAT: return (long) readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_NULL: return 0;
-                    case FBT_STRING: {
-                        try {
-                            return Long.parseLong(asString());
-                        } catch (NumberFormatException nfe) {
-                            return 0; //same as C++ implementation
-                        }
-                    }
-                    case FBT_VECTOR: return asVector().size();
-                    case FBT_BOOL: return readInt(bb, end, parentWidth);
-                    default:
-                        // Convert other things to int.
-                        return 0;
-                }
-        }
-
-        /**
-         * Returns element as 64-bit integer.
-         * <p> For vector element, it will return size of the vector</p>
-         * <p> For String element, it will type to be parsed as integer</p>
-         * @return 64-bit integer or 0 if fail to convert element to long.
-         */
-        public double asFloat() {
-            if (type == FBT_FLOAT) {
-                // A fast path for the common case.
-                return readDouble(bb, end, parentWidth);
-            } else
-                switch (type) {
-                    case FBT_INDIRECT_FLOAT: return readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_INT: return readInt(bb, end, parentWidth);
-                    case FBT_UINT:
-                    case FBT_BOOL:
-                        return readUInt(bb, end, parentWidth);
-                    case FBT_INDIRECT_INT: return readInt(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_INDIRECT_UINT: return readUInt(bb, indirect(bb, end, parentWidth), byteWidth);
-                    case FBT_NULL: return 0.0;
-                    case FBT_STRING: return Double.parseDouble(asString());
-                    case FBT_VECTOR: return asVector().size();
-                    default:
-                        // Convert strings and other things to float.
-                        return 0;
-                }
-        }
-
-        /**
-         * Returns element as a {@link Key}
-         * @return key or {@link Key#empty()} if element is not a key
-         */
-        public Key asKey() {
-            if (isKey()) {
-                return new Key(bb, indirect(bb, end, parentWidth), byteWidth);
-            } else {
-                return Key.empty();
-            }
-        }
-
-        /**
-         * Returns element as a `String`
-         * @return element as `String` or empty `String` if fail
-         */
-        public String asString() {
-            if (isString()) {
-                int start = indirect(bb, end, parentWidth);
-                int size = (int) readUInt(bb, start - byteWidth, byteWidth);
-                return bb.getString(start, size);
-            }
-            else if (isKey()){
-                int start = indirect(bb, end, byteWidth);
-                for (int i = start; ; i++) {
-                    if (bb.get(i) == 0) {
-                        return bb.getString(start, i - start);
-                    }
-                }
-            } else {
-                return "";
-            }
-        }
-
-        /**
-         * Returns element as a {@link Map}
-         * @return element as {@link Map} or empty {@link Map} if fail
-         */
-        public Map asMap() {
-            if (isMap()) {
-                return new Map(bb, indirect(bb, end, parentWidth), byteWidth);
-            } else {
-                return Map.empty();
-            }
-        }
-
-        /**
-         * Returns element as a {@link Vector}
-         * @return element as {@link Vector} or empty {@link Vector} if fail
-         */
-        public Vector asVector() {
-            if (isVector()) {
-                return new Vector(bb, indirect(bb, end, parentWidth), byteWidth);
-            } else if(type == FlexBuffers.FBT_VECTOR_STRING_DEPRECATED) {
-                // deprecated. Should be treated as key vector
-                return new TypedVector(bb, indirect(bb, end, parentWidth), byteWidth, FlexBuffers.FBT_KEY);
-            } else if (FlexBuffers.isTypedVector(type)) {
-                return new TypedVector(bb, indirect(bb, end, parentWidth), byteWidth, FlexBuffers.toTypedVectorElementType(type));
-            } else {
-                return Vector.empty();
-            }
-        }
-
-        /**
-         * Returns element as a {@link Blob}
-         * @return element as {@link Blob} or empty {@link Blob} if fail
-         */
-        public Blob asBlob() {
-            if (isBlob() || isString()) {
-                return new Blob(bb, indirect(bb, end, parentWidth), byteWidth);
-            } else {
-                return Blob.empty();
-            }
-        }
-
-        /**
-         * Returns element as a boolean
-         * <p>If element type is not boolean, it will be casted to integer and compared against 0</p>
-         * @return element as boolean
-         */
-        public boolean asBoolean() {
-            if (isBoolean()) {
-                return bb.get(end) != 0;
-            }
-            return asUInt() != 0;
-        }
-
-        /**
-         * Returns text representation of the element (JSON)
-         * @return String containing text representation of the element
-         */
-        @Override
-        public String toString() {
-            return toString(new StringBuilder(128)).toString();
-        }
-
-        /**
-         * Appends a text(JSON) representation to a `StringBuilder`
-         */
-        StringBuilder toString(StringBuilder sb) {
-            //TODO: Original C++ implementation escape strings.
-            // probably we should do it as well.
-            switch (type) {
-                case FBT_NULL:
-                    return sb.append("null");
-                case FBT_INT:
-                case FBT_INDIRECT_INT:
-                    return sb.append(asLong());
-                case FBT_UINT:
-                case FBT_INDIRECT_UINT:
-                    return sb.append(asUInt());
-                case FBT_INDIRECT_FLOAT:
-                case FBT_FLOAT:
-                    return sb.append(asFloat());
-                case FBT_KEY:
-                    return asKey().toString(sb.append('"')).append('"');
-                case FBT_STRING:
-                    return sb.append('"').append(asString()).append('"');
-                case FBT_MAP:
-                    return asMap().toString(sb);
-                case FBT_VECTOR:
-                    return asVector().toString(sb);
-                case FBT_BLOB:
-                    return asBlob().toString(sb);
-                case FBT_BOOL:
-                    return sb.append(asBoolean());
-                case FBT_VECTOR_INT:
-                case FBT_VECTOR_UINT:
-                case FBT_VECTOR_FLOAT:
-                case FBT_VECTOR_KEY:
-                case FBT_VECTOR_STRING_DEPRECATED:
-                case FBT_VECTOR_BOOL:
-                    return sb.append(asVector());
-                case FBT_VECTOR_INT2:
-                case FBT_VECTOR_UINT2:
-                case FBT_VECTOR_FLOAT2:
-                case FBT_VECTOR_INT3:
-                case FBT_VECTOR_UINT3:
-                case FBT_VECTOR_FLOAT3:
-                case FBT_VECTOR_INT4:
-                case FBT_VECTOR_UINT4:
-                case FBT_VECTOR_FLOAT4:
-
-                    throw new FlexBufferException("not_implemented:" + type);
-                default:
-                    return sb;
-            }
-        }
-    }
-
-    /**
-     * Base class of all types below.
-     * Points into the data buffer and allows access to one type.
-     */
-    private static abstract class Object {
-        ReadBuf bb;
-        int end;
-        int byteWidth;
-
-        Object(ReadBuf buff, int end, int byteWidth) {
-            this.bb = buff;
-            this.end = end;
-            this.byteWidth = byteWidth;
-        }
-
-        @Override
-        public String toString() {
-            return toString(new StringBuilder(128)).toString();
-        }
-
-        public abstract StringBuilder toString(StringBuilder sb);
-    }
-
-    // Stores size in `byte_width_` bytes before end position.
-    private static abstract class Sized extends Object {
-
-        protected final int size;
-
-        Sized(ReadBuf buff, int end, int byteWidth) {
-            super(buff, end, byteWidth);
-            size = (int) readUInt(bb, end - byteWidth, byteWidth);
-        }
-
-        public int size() {
-            return size;
-        }
-    }
-
-    /**
-     * Represents a array of bytes element in the buffer
+     * Checks whether the element type is numeric (signed/unsigned integers and floats)
      *
-     * <p>It can be converted to `ReadBuf` using {@link data()},
-     * copied into a byte[] using {@link getBytes()} or
-     * have individual bytes accessed individually using {@link get(int)}</p>
+     * @return true if numeric type
      */
-    public static class Blob extends Sized {
-        static final Blob EMPTY = new Blob(EMPTY_BB, 1, 1);
-
-        Blob(ReadBuf buff, int end, int byteWidth) {
-            super(buff, end, byteWidth);
-        }
-
-        /** Return an empty {@link Blob} */
-        public static Blob empty() {
-            return EMPTY;
-        }
-
-        /**
-         * Return {@link Blob} as `ReadBuf`
-         * @return blob as `ReadBuf`
-         */
-        public ByteBuffer data() {
-            ByteBuffer dup = ByteBuffer.wrap(bb.data());
-            dup.position(end);
-            dup.limit(end + size());
-            return dup.asReadOnlyBuffer().slice();
-        }
-
-        /**
-         * Copy blob into a byte[]
-         * @return blob as a byte[]
-         */
-        public byte[] getBytes() {
-            int size = size();
-            byte[] result = new byte[size];
-            for (int i = 0; i < size; i++) {
-                result[i] = bb.get(end + i);
-            }
-            return result;
-        }
-
-        /**
-         * Return individual byte at a given position
-         * @param pos position of the byte to be read
-         */
-        public byte get(int pos) {
-            assert pos >=0 && pos <= size();
-            return bb.get(end + pos);
-        }
-
-        /**
-         * Returns a text(JSON) representation of the {@link Blob}
-         */
-        @Override
-        public String toString() {
-            return bb.getString(end, size());
-        }
-
-        /**
-         * Append a text(JSON) representation of the {@link Blob} into a `StringBuilder`
-         */
-        @Override
-        public StringBuilder toString(StringBuilder sb) {
-            sb.append('"');
-            sb.append(bb.getString(end, size()));
-            return sb.append('"');
-        }
+    public boolean isNumeric() {
+      return isIntOrUInt() || isFloat();
     }
 
     /**
-     * Represents a key element in the buffer. Keys are
-     * used to reference objects in a {@link Map}
+     * Checks whether the element type is signed or unsigned integers
+     *
+     * @return true if an integer type
      */
-    public static class Key extends Object {
-
-        private static final Key EMPTY = new Key(EMPTY_BB, 0, 0);
-
-        Key(ReadBuf buff, int end, int byteWidth) {
-            super(buff, end, byteWidth);
-        }
-
-        /**
-         * Return an empty {@link Key}
-         * @return empty {@link Key}
-         * */
-        public static Key empty() {
-            return Key.EMPTY;
-        }
-
-        /**
-         * Appends a text(JSON) representation to a `StringBuilder`
-         */
-        @Override
-        public StringBuilder toString(StringBuilder sb) {
-            return sb.append(toString());
-        }
-
-        @Override
-        public String toString() {
-            int size;
-            for (int i = end; ; i++) {
-                if (bb.get(i) == 0) {
-                    size = i - end;
-                    break;
-                }
-            }
-            return bb.getString(end, size);
-        }
-
-        int compareTo(byte[] other) {
-            int ia = end;
-            int io = 0;
-            byte c1, c2;
-            do {
-                c1 = bb.get(ia);
-                c2 = other[io];
-                if (c1 == '\0')
-                    return c1 - c2;
-                ia++;
-                io++;
-                if (io == other.length) {
-                    // in our buffer we have an additional \0 byte
-                    // but this does not exist in regular Java strings, so we return now
-                    int cmp = c1 - c2;
-                    if (cmp != 0 || bb.get(ia) == '\0') {
-                        return cmp;
-                    } else {
-                        return 1;
-                    }
-                }
-            }
-            while (c1 == c2);
-            return c1 - c2;
-        }
-
-        /**
-         *  Compare keys
-         *  @param obj other key to compare
-         *  @return true if keys are the same
-         */
-        @Override
-        public boolean equals(java.lang.Object obj) {
-            if (!(obj instanceof Key))
-                return false;
-
-            return ((Key) obj).end == end && ((Key) obj).byteWidth == byteWidth;
-        }
-
-        public int hashCode() {
-          return end ^ byteWidth;
-        }
+    public boolean isIntOrUInt() {
+      return isInt() || isUInt();
     }
 
     /**
-     * Map object representing a set of key-value pairs.
+     * Checks whether the element type is float
+     *
+     * @return true if a float type
      */
-    public static class Map extends Vector {
-        private static final Map EMPTY_MAP = new Map(EMPTY_BB, 1, 1);
-        // cache for converting UTF-8 codepoints into
-        // Java chars. Used to speed up String comparison
-        private final byte[] comparisonBuffer = new byte[4];
+    public boolean isFloat() {
+      return type == FBT_FLOAT || type == FBT_INDIRECT_FLOAT;
+    }
 
-        Map(ReadBuf bb, int end, int byteWidth) {
-            super(bb, end, byteWidth);
-        }
+    /**
+     * Checks whether the element type is signed integer
+     *
+     * @return true if a signed integer type
+     */
+    public boolean isInt() {
+      return type == FBT_INT || type == FBT_INDIRECT_INT;
+    }
 
-        /**
-         * Returns an empty {@link Map}
-         * @return an empty {@link Map}
-         */
-        public static Map empty() {
-            return EMPTY_MAP;
-        }
+    /**
+     * Checks whether the element type is signed integer
+     *
+     * @return true if a signed integer type
+     */
+    public boolean isUInt() {
+      return type == FBT_UINT || type == FBT_INDIRECT_UINT;
+    }
 
-        /**
-         * @param key access key to element on map
-         * @return reference to value in map
-         */
-        public Reference get(String key) {
-            int index = binarySearch(key);
-            if (index >= 0 && index < size) {
-                return get(index);
-            }
-            return Reference.NULL_REFERENCE;
-        }
+    /**
+     * Checks whether the element type is string
+     *
+     * @return true if a string type
+     */
+    public boolean isString() {
+      return type == FBT_STRING;
+    }
 
-        /**
-         * @param key access key to element on map. Keys are assumed to be encoded in UTF-8
-         * @return reference to value in map
-         */
-        public Reference get(byte[] key) {
-            int index = binarySearch(key);
-            if (index >= 0 && index < size) {
-                return get(index);
-            }
-            return Reference.NULL_REFERENCE;
-        }
+    /**
+     * Checks whether the element type is key
+     *
+     * @return true if a key type
+     */
+    public boolean isKey() {
+      return type == FBT_KEY;
+    }
 
-        /**
-         * Get a vector or keys in the map
-         *
-         * @return vector of keys
-         */
-        public KeyVector keys() {
-            final int num_prefixed_fields = 3;
-            int keysOffset = end - (byteWidth * num_prefixed_fields);
-            return new KeyVector(new TypedVector(bb,
-                    indirect(bb, keysOffset, byteWidth),
-                    readInt(bb, keysOffset + byteWidth, byteWidth),
-                    FBT_KEY));
-        }
+    /**
+     * Checks whether the element type is vector
+     *
+     * @return true if a vector type
+     */
+    public boolean isVector() {
+      return type == FBT_VECTOR || type == FBT_MAP;
+    }
 
-        /**
-         * @return {@code Vector} of values from map
-         */
-        public Vector values() {
-            return new Vector(bb, end, byteWidth);
-        }
+    /**
+     * Checks whether the element type is typed vector
+     *
+     * @return true if a typed vector type
+     */
+    public boolean isTypedVector() {
+      return FlexBuffers.isTypedVector(type);
+    }
 
-        /**
-         * Writes text (json) representation of map in a {@code StringBuilder}.
-         *
-         * @param builder {@code StringBuilder} to be appended to
-         * @return Same {@code StringBuilder} with appended text
-         */
-        public StringBuilder toString(StringBuilder builder) {
-            builder.append("{ ");
-            KeyVector keys = keys();
-            int size = size();
-            Vector vals = values();
-            for (int i = 0; i < size; i++) {
-                builder.append('"')
-                        .append(keys.get(i).toString())
-                        .append("\" : ");
-                builder.append(vals.get(i).toString());
-                if (i != size - 1)
-                    builder.append(", ");
-            }
-            builder.append(" }");
-            return builder;
-        }
+    /**
+     * Checks whether the element type is a map
+     *
+     * @return true if a map type
+     */
+    public boolean isMap() {
+      return type == FBT_MAP;
+    }
 
-        // Performs a binary search on a key vector and return index of the key in key vector
-        private int binarySearch(CharSequence searchedKey) {
-            int low = 0;
-            int high = size - 1;
-            final int num_prefixed_fields = 3;
-            int keysOffset = end - (byteWidth * num_prefixed_fields);
-            int keysStart = indirect(bb, keysOffset, byteWidth);
-            int keyByteWidth = readInt(bb, keysOffset + byteWidth, byteWidth);
-            while (low <= high) {
-                int mid = (low + high) >>> 1;
-                int keyPos = indirect(bb, keysStart + mid * keyByteWidth, keyByteWidth);
-                int cmp = compareCharSequence(keyPos, searchedKey);
-                if (cmp < 0)
-                    low = mid + 1;
-                else if (cmp > 0)
-                    high = mid - 1;
-                else
-                    return mid; // key found
-            }
-            return -(low + 1);  // key not found
-        }
+    /**
+     * Checks whether the element type is a blob
+     *
+     * @return true if a blob type
+     */
+    public boolean isBlob() {
+      return type == FBT_BLOB;
+    }
 
-        private int binarySearch(byte[] searchedKey) {
-            int low = 0;
-            int high = size - 1;
-            final int num_prefixed_fields = 3;
-            int keysOffset = end - (byteWidth * num_prefixed_fields);
-            int keysStart = indirect(bb, keysOffset, byteWidth);
-            int keyByteWidth = readInt(bb, keysOffset + byteWidth, byteWidth);
-
-            while (low <= high) {
-                int mid = (low + high) >>> 1;
-                int keyPos = indirect(bb, keysStart + mid * keyByteWidth, keyByteWidth);
-                int cmp = compareBytes(bb, keyPos, searchedKey);
-                if (cmp < 0)
-                    low = mid + 1;
-                else if (cmp > 0)
-                    high = mid - 1;
-                else
-                    return mid; // key found
-            }
-            return -(low + 1);  // key not found
-        }
-
-        // compares a byte[] against a FBT_KEY
-        private int compareBytes(ReadBuf bb, int start, byte[] other) {
-            int l1 = start;
-            int l2 = 0;
-            byte c1, c2;
-            do {
-                c1 = bb.get(l1);
-                c2 = other[l2];
-                if (c1 == '\0')
-                    return c1 - c2;
-                l1++;
-                l2++;
-                if (l2 == other.length) {
-                    // in our buffer we have an additional \0 byte
-                    // but this does not exist in regular Java strings, so we return now
-                    int cmp = c1 - c2;
-                    if (cmp != 0 || bb.get(l1) == '\0') {
-                        return cmp;
-                    } else {
-                        return 1;
-                    }
-                }
-            }
-            while (c1 == c2);
-            return c1 - c2;
-        }
-
-        // compares a CharSequence against a FBT_KEY
-        private int compareCharSequence(int start, CharSequence other) {
-            int bufferPos = start;
-            int otherPos = 0;
-            int limit = bb.limit();
-            int otherLimit = other.length();
-
-            // special loop for ASCII characters. Most of keys should be ASCII only, so this
-            // loop should be optimized for that.
-            // breaks if a multi-byte character is found
-            while (otherPos < otherLimit) {
-                char c2 = other.charAt(otherPos);
-
-                if (c2 >= 0x80) {
-                    // not a single byte codepoint
-                    break;
-                }
-
-                byte b = bb.get(bufferPos);
-
-                if (b == 0) {
-                    return -c2;
-                } else if (b < 0) {
-                    break;
-                } else if ((char) b != c2) {
-                    return b - c2;
-                }
-                ++bufferPos;
-                ++otherPos;
-            }
-
-            while (bufferPos < limit) {
-
-                int sizeInBuff = Utf8.encodeUtf8CodePoint(other, otherPos, comparisonBuffer);
-
-                if (sizeInBuff == 0) {
-                    // That means we finish with other and there are not more chars to
-                    // compare. String in the buffer is bigger.
-                    return bb.get(bufferPos);
-                }
-
-                for (int i = 0; i < sizeInBuff; i++) {
-                    byte bufferByte = bb.get(bufferPos++);
-                    byte otherByte = comparisonBuffer[i];
-                    if (bufferByte == 0) {
-                        // Our key is finished, so other is bigger
-                        return -otherByte;
-                    } else if (bufferByte != otherByte) {
-                        return bufferByte - otherByte;
-                    }
-                }
-
-                otherPos += sizeInBuff == 4 ? 2 : 1;
-            }
+    /**
+     * Returns element as 32-bit integer.
+     *
+     * <p>For vector element, it will return size of the vector
+     *
+     * <p>For String element, it will type to be parsed as integer
+     *
+     * <p>Unsigned elements will become negative
+     *
+     * <p>Float elements will be casted to integer
+     *
+     * @return 32-bit integer or 0 if fail to convert element to integer.
+     */
+    public int asInt() {
+      if (type == FBT_INT) {
+        // A fast path for the common case.
+        return readInt(bb, end, parentWidth);
+      } else
+        switch (type) {
+          case FBT_INDIRECT_INT:
+            return readInt(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_UINT:
+            return (int) readUInt(bb, end, parentWidth);
+          case FBT_INDIRECT_UINT:
+            return (int) readUInt(bb, indirect(bb, end, parentWidth), parentWidth);
+          case FBT_FLOAT:
+            return (int) readDouble(bb, end, parentWidth);
+          case FBT_INDIRECT_FLOAT:
+            return (int) readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_NULL:
+            return 0;
+          case FBT_STRING:
+            return Integer.parseInt(asString());
+          case FBT_VECTOR:
+            return asVector().size();
+          case FBT_BOOL:
+            return readInt(bb, end, parentWidth);
+          default:
+            // Convert other things to int.
             return 0;
         }
     }
 
     /**
-     * Object that represents a set of elements in the buffer
+     * Returns element as unsigned 64-bit integer.
+     *
+     * <p>For vector element, it will return size of the vector
+     *
+     * <p>For String element, it will type to be parsed as integer
+     *
+     * <p>Negative signed elements will become unsigned counterpart
+     *
+     * <p>Float elements will be casted to integer
+     *
+     * @return 64-bit integer or 0 if fail to convert element to integer.
      */
-    public static class Vector extends Sized {
-
-        private static final Vector EMPTY_VECTOR = new Vector(EMPTY_BB, 1, 1);
-
-        Vector(ReadBuf bb, int end, int byteWidth) {
-            super(bb, end, byteWidth);
-        }
-
-        /**
-         * Returns an empty {@link Map}
-         * @return an empty {@link Map}
-         */
-        public static Vector empty() {
-            return EMPTY_VECTOR;
-        }
-
-        /**
-         * Checks if the vector is empty
-         * @return true if vector is empty
-         */
-        public boolean isEmpty() {
-            return this == EMPTY_VECTOR;
-        }
-
-        /**
-         * Appends a text(JSON) representation to a `StringBuilder`
-         */
-        @Override
-        public StringBuilder toString(StringBuilder sb) {
-            sb.append("[ ");
-            int size = size();
-            for (int i = 0; i < size; i++) {
-                get(i).toString(sb);
-                if (i != size - 1) {
-                    sb.append(", ");
-                }
-            }
-            sb.append(" ]");
-            return sb;
-        }
-
-        /**
-         * Get a element in a vector by index
-         *
-         * @param index position of the element
-         * @return {@code Reference} to the element
-         */
-        public Reference get(int index) {
-            long len = size();
-            if (index >= len) {
-                return Reference.NULL_REFERENCE;
-            }
-            int packedType = byteToUnsignedInt(bb.get((int) (end + (len * byteWidth) + index)));
-            int obj_end = end + index * byteWidth;
-            return new Reference(bb, obj_end, byteWidth, packedType);
+    public long asUInt() {
+      if (type == FBT_UINT) {
+        // A fast path for the common case.
+        return readUInt(bb, end, parentWidth);
+      } else
+        switch (type) {
+          case FBT_INDIRECT_UINT:
+            return readUInt(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_INT:
+            return readLong(bb, end, parentWidth);
+          case FBT_INDIRECT_INT:
+            return readLong(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_FLOAT:
+            return (long) readDouble(bb, end, parentWidth);
+          case FBT_INDIRECT_FLOAT:
+            return (long) readDouble(bb, indirect(bb, end, parentWidth), parentWidth);
+          case FBT_NULL:
+            return 0;
+          case FBT_STRING:
+            return Long.parseLong(asString());
+          case FBT_VECTOR:
+            return asVector().size();
+          case FBT_BOOL:
+            return readInt(bb, end, parentWidth);
+          default:
+            // Convert other things to uint.
+            return 0;
         }
     }
 
     /**
-     * Object that represents a set of elements with the same type
+     * Returns element as 64-bit integer.
+     *
+     * <p>For vector element, it will return size of the vector
+     *
+     * <p>For String element, it will type to be parsed as integer
+     *
+     * <p>Unsigned elements will become negative
+     *
+     * <p>Float elements will be casted to integer
+     *
+     * @return 64-bit integer or 0 if fail to convert element to long.
      */
-    public static class TypedVector extends Vector {
-
-        private static final TypedVector EMPTY_VECTOR = new TypedVector(EMPTY_BB, 1, 1, FBT_INT);
-
-        private final int elemType;
-
-        TypedVector(ReadBuf bb, int end, int byteWidth, int elemType) {
-            super(bb, end, byteWidth);
-            this.elemType = elemType;
-        }
-
-        public static TypedVector empty() {
-            return EMPTY_VECTOR;
-        }
-
-        /**
-         * Returns whether the vector is empty
-         *
-         * @return true if empty
-         */
-        public boolean isEmptyVector() {
-            return this == EMPTY_VECTOR;
-        }
-
-        /**
-         * Return element type for all elements in the vector
-         *
-         * @return element type
-         */
-        public int getElemType() {
-            return elemType;
-        }
-
-        /**
-         * Get reference to an object in the {@code Vector}
-         *
-         * @param pos position of the object in {@code Vector}
-         * @return reference to element
-         */
-        @Override
-        public Reference get(int pos) {
-            int len = size();
-            if (pos >= len) return Reference.NULL_REFERENCE;
-            int childPos = end + pos * byteWidth;
-            return new Reference(bb, childPos, byteWidth, 1, elemType);
+    public long asLong() {
+      if (type == FBT_INT) {
+        // A fast path for the common case.
+        return readLong(bb, end, parentWidth);
+      } else
+        switch (type) {
+          case FBT_INDIRECT_INT:
+            return readLong(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_UINT:
+            return readUInt(bb, end, parentWidth);
+          case FBT_INDIRECT_UINT:
+            return readUInt(bb, indirect(bb, end, parentWidth), parentWidth);
+          case FBT_FLOAT:
+            return (long) readDouble(bb, end, parentWidth);
+          case FBT_INDIRECT_FLOAT:
+            return (long) readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_NULL:
+            return 0;
+          case FBT_STRING:
+            {
+              try {
+                return Long.parseLong(asString());
+              } catch (NumberFormatException nfe) {
+                return 0; // same as C++ implementation
+              }
+            }
+          case FBT_VECTOR:
+            return asVector().size();
+          case FBT_BOOL:
+            return readInt(bb, end, parentWidth);
+          default:
+            // Convert other things to int.
+            return 0;
         }
     }
 
     /**
-     * Represent a vector of keys in a map
+     * Returns element as 64-bit integer.
+     *
+     * <p>For vector element, it will return size of the vector
+     *
+     * <p>For String element, it will type to be parsed as integer
+     *
+     * @return 64-bit integer or 0 if fail to convert element to long.
      */
-    public static class KeyVector {
-
-        private final TypedVector vec;
-
-        KeyVector(TypedVector vec) {
-            this.vec = vec;
-        }
-
-        /**
-         * Return key
-         *
-         * @param pos position of the key in key vector
-         * @return key
-         */
-        public Key get(int pos) {
-            int len = size();
-            if (pos >= len) return Key.EMPTY;
-            int childPos = vec.end + pos * vec.byteWidth;
-            return new Key(vec.bb, indirect(vec.bb, childPos, vec.byteWidth), 1);
-        }
-
-        /**
-         * Returns size of key vector
-         *
-         * @return size
-         */
-        public int size() {
-            return vec.size();
-        }
-
-        /**
-         * Returns a text(JSON) representation
-         */
-        public String toString() {
-            StringBuilder b = new StringBuilder();
-            b.append('[');
-            for (int i = 0; i < vec.size(); i++) {
-                vec.get(i).toString(b);
-                if (i != vec.size() - 1) {
-                    b.append(", ");
-                }
-            }
-            return b.append("]").toString();
+    public double asFloat() {
+      if (type == FBT_FLOAT) {
+        // A fast path for the common case.
+        return readDouble(bb, end, parentWidth);
+      } else
+        switch (type) {
+          case FBT_INDIRECT_FLOAT:
+            return readDouble(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_INT:
+            return readInt(bb, end, parentWidth);
+          case FBT_UINT:
+          case FBT_BOOL:
+            return readUInt(bb, end, parentWidth);
+          case FBT_INDIRECT_INT:
+            return readInt(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_INDIRECT_UINT:
+            return readUInt(bb, indirect(bb, end, parentWidth), byteWidth);
+          case FBT_NULL:
+            return 0.0;
+          case FBT_STRING:
+            return Double.parseDouble(asString());
+          case FBT_VECTOR:
+            return asVector().size();
+          default:
+            // Convert strings and other things to float.
+            return 0;
         }
     }
 
-    public static class FlexBufferException extends RuntimeException {
-        FlexBufferException(String msg) {
-            super(msg);
-        }
+    /**
+     * Returns element as a {@link Key}
+     *
+     * @return key or {@link Key#empty()} if element is not a key
+     */
+    public Key asKey() {
+      if (isKey()) {
+        return new Key(bb, indirect(bb, end, parentWidth), byteWidth);
+      } else {
+        return Key.empty();
+      }
     }
 
-    static class Unsigned {
-
-        static int byteToUnsignedInt(byte x) {
-            return ((int) x) & 0xff;
+    /**
+     * Returns element as a `String`
+     *
+     * @return element as `String` or empty `String` if fail
+     */
+    public String asString() {
+      if (isString()) {
+        int start = indirect(bb, end, parentWidth);
+        int size = (int) readUInt(bb, start - byteWidth, byteWidth);
+        return bb.getString(start, size);
+      } else if (isKey()) {
+        int start = indirect(bb, end, byteWidth);
+        for (int i = start; ; i++) {
+          if (bb.get(i) == 0) {
+            return bb.getString(start, i - start);
+          }
         }
-
-        static int shortToUnsignedInt(short x) {
-            return ((int) x) & 0xffff;
-        }
-
-        static long intToUnsignedLong(int x) {
-            return ((long) x) & 0xffffffffL;
-        }
+      } else {
+        return "";
+      }
     }
+
+    /**
+     * Returns element as a {@link Map}
+     *
+     * @return element as {@link Map} or empty {@link Map} if fail
+     */
+    public Map asMap() {
+      if (isMap()) {
+        return new Map(bb, indirect(bb, end, parentWidth), byteWidth);
+      } else {
+        return Map.empty();
+      }
+    }
+
+    /**
+     * Returns element as a {@link Vector}
+     *
+     * @return element as {@link Vector} or empty {@link Vector} if fail
+     */
+    public Vector asVector() {
+      if (isVector()) {
+        return new Vector(bb, indirect(bb, end, parentWidth), byteWidth);
+      } else if (type == FlexBuffers.FBT_VECTOR_STRING_DEPRECATED) {
+        // deprecated. Should be treated as key vector
+        return new TypedVector(bb, indirect(bb, end, parentWidth), byteWidth, FlexBuffers.FBT_KEY);
+      } else if (FlexBuffers.isTypedVector(type)) {
+        return new TypedVector(
+            bb,
+            indirect(bb, end, parentWidth),
+            byteWidth,
+            FlexBuffers.toTypedVectorElementType(type));
+      } else {
+        return Vector.empty();
+      }
+    }
+
+    /**
+     * Returns element as a {@link Blob}
+     *
+     * @return element as {@link Blob} or empty {@link Blob} if fail
+     */
+    public Blob asBlob() {
+      if (isBlob() || isString()) {
+        return new Blob(bb, indirect(bb, end, parentWidth), byteWidth);
+      } else {
+        return Blob.empty();
+      }
+    }
+
+    /**
+     * Returns element as a boolean
+     *
+     * <p>If element type is not boolean, it will be casted to integer and compared against 0
+     *
+     * @return element as boolean
+     */
+    public boolean asBoolean() {
+      if (isBoolean()) {
+        return bb.get(end) != 0;
+      }
+      return asUInt() != 0;
+    }
+
+    /**
+     * Returns text representation of the element (JSON)
+     *
+     * @return String containing text representation of the element
+     */
+    @Override
+    public String toString() {
+      return toString(new StringBuilder(128)).toString();
+    }
+
+    /** Appends a text(JSON) representation to a `StringBuilder` */
+    StringBuilder toString(StringBuilder sb) {
+      // TODO: Original C++ implementation escape strings.
+      // probably we should do it as well.
+      switch (type) {
+        case FBT_NULL:
+          return sb.append("null");
+        case FBT_INT:
+        case FBT_INDIRECT_INT:
+          return sb.append(asLong());
+        case FBT_UINT:
+        case FBT_INDIRECT_UINT:
+          return sb.append(asUInt());
+        case FBT_INDIRECT_FLOAT:
+        case FBT_FLOAT:
+          return sb.append(asFloat());
+        case FBT_KEY:
+          return asKey().toString(sb.append('"')).append('"');
+        case FBT_STRING:
+          return sb.append('"').append(asString()).append('"');
+        case FBT_MAP:
+          return asMap().toString(sb);
+        case FBT_VECTOR:
+          return asVector().toString(sb);
+        case FBT_BLOB:
+          return asBlob().toString(sb);
+        case FBT_BOOL:
+          return sb.append(asBoolean());
+        case FBT_VECTOR_INT:
+        case FBT_VECTOR_UINT:
+        case FBT_VECTOR_FLOAT:
+        case FBT_VECTOR_KEY:
+        case FBT_VECTOR_STRING_DEPRECATED:
+        case FBT_VECTOR_BOOL:
+          return sb.append(asVector());
+        case FBT_VECTOR_INT2:
+        case FBT_VECTOR_UINT2:
+        case FBT_VECTOR_FLOAT2:
+        case FBT_VECTOR_INT3:
+        case FBT_VECTOR_UINT3:
+        case FBT_VECTOR_FLOAT3:
+        case FBT_VECTOR_INT4:
+        case FBT_VECTOR_UINT4:
+        case FBT_VECTOR_FLOAT4:
+          throw new FlexBufferException("not_implemented:" + type);
+        default:
+          return sb;
+      }
+    }
+  }
+
+  /** Base class of all types below. Points into the data buffer and allows access to one type. */
+  private abstract static class Object {
+    ReadBuf bb;
+    int end;
+    int byteWidth;
+
+    Object(ReadBuf buff, int end, int byteWidth) {
+      this.bb = buff;
+      this.end = end;
+      this.byteWidth = byteWidth;
+    }
+
+    @Override
+    public String toString() {
+      return toString(new StringBuilder(128)).toString();
+    }
+
+    public abstract StringBuilder toString(StringBuilder sb);
+  }
+
+  // Stores size in `byte_width_` bytes before end position.
+  private abstract static class Sized extends Object {
+
+    protected final int size;
+
+    Sized(ReadBuf buff, int end, int byteWidth) {
+      super(buff, end, byteWidth);
+      size = (int) readUInt(bb, end - byteWidth, byteWidth);
+    }
+
+    public int size() {
+      return size;
+    }
+  }
+
+  /**
+   * Represents a array of bytes element in the buffer
+   *
+   * <p>It can be converted to `ReadBuf` using {@link data()}, copied into a byte[] using {@link
+   * getBytes()} or have individual bytes accessed individually using {@link get(int)}
+   */
+  public static class Blob extends Sized {
+    static final Blob EMPTY = new Blob(EMPTY_BB, 1, 1);
+
+    Blob(ReadBuf buff, int end, int byteWidth) {
+      super(buff, end, byteWidth);
+    }
+
+    /** Return an empty {@link Blob} */
+    public static Blob empty() {
+      return EMPTY;
+    }
+
+    /**
+     * Return {@link Blob} as `ReadBuf`
+     *
+     * @return blob as `ReadBuf`
+     */
+    public ByteBuffer data() {
+      ByteBuffer dup = ByteBuffer.wrap(bb.data());
+      dup.position(end);
+      dup.limit(end + size());
+      return dup.asReadOnlyBuffer().slice();
+    }
+
+    /**
+     * Copy blob into a byte[]
+     *
+     * @return blob as a byte[]
+     */
+    public byte[] getBytes() {
+      int size = size();
+      byte[] result = new byte[size];
+      for (int i = 0; i < size; i++) {
+        result[i] = bb.get(end + i);
+      }
+      return result;
+    }
+
+    /**
+     * Return individual byte at a given position
+     *
+     * @param pos position of the byte to be read
+     */
+    public byte get(int pos) {
+      assert pos >= 0 && pos <= size();
+      return bb.get(end + pos);
+    }
+
+    /** Returns a text(JSON) representation of the {@link Blob} */
+    @Override
+    public String toString() {
+      return bb.getString(end, size());
+    }
+
+    /** Append a text(JSON) representation of the {@link Blob} into a `StringBuilder` */
+    @Override
+    public StringBuilder toString(StringBuilder sb) {
+      sb.append('"');
+      sb.append(bb.getString(end, size()));
+      return sb.append('"');
+    }
+  }
+
+  /** Represents a key element in the buffer. Keys are used to reference objects in a {@link Map} */
+  public static class Key extends Object {
+
+    private static final Key EMPTY = new Key(EMPTY_BB, 0, 0);
+
+    Key(ReadBuf buff, int end, int byteWidth) {
+      super(buff, end, byteWidth);
+    }
+
+    /**
+     * Return an empty {@link Key}
+     *
+     * @return empty {@link Key}
+     */
+    public static Key empty() {
+      return Key.EMPTY;
+    }
+
+    /** Appends a text(JSON) representation to a `StringBuilder` */
+    @Override
+    public StringBuilder toString(StringBuilder sb) {
+      return sb.append(toString());
+    }
+
+    @Override
+    public String toString() {
+      int size;
+      for (int i = end; ; i++) {
+        if (bb.get(i) == 0) {
+          size = i - end;
+          break;
+        }
+      }
+      return bb.getString(end, size);
+    }
+
+    int compareTo(byte[] other) {
+      int ia = end;
+      int io = 0;
+      byte c1, c2;
+      do {
+        c1 = bb.get(ia);
+        c2 = other[io];
+        if (c1 == '\0') return c1 - c2;
+        ia++;
+        io++;
+        if (io == other.length) {
+          // in our buffer we have an additional \0 byte
+          // but this does not exist in regular Java strings, so we return now
+          int cmp = c1 - c2;
+          if (cmp != 0 || bb.get(ia) == '\0') {
+            return cmp;
+          } else {
+            return 1;
+          }
+        }
+      } while (c1 == c2);
+      return c1 - c2;
+    }
+
+    /**
+     * Compare keys
+     *
+     * @param obj other key to compare
+     * @return true if keys are the same
+     */
+    @Override
+    public boolean equals(java.lang.Object obj) {
+      if (!(obj instanceof Key)) return false;
+
+      return ((Key) obj).end == end && ((Key) obj).byteWidth == byteWidth;
+    }
+
+    public int hashCode() {
+      return end ^ byteWidth;
+    }
+  }
+
+  /** Map object representing a set of key-value pairs. */
+  public static class Map extends Vector {
+    private static final Map EMPTY_MAP = new Map(EMPTY_BB, 1, 1);
+    // cache for converting UTF-8 codepoints into
+    // Java chars. Used to speed up String comparison
+    private final byte[] comparisonBuffer = new byte[4];
+
+    Map(ReadBuf bb, int end, int byteWidth) {
+      super(bb, end, byteWidth);
+    }
+
+    /**
+     * Returns an empty {@link Map}
+     *
+     * @return an empty {@link Map}
+     */
+    public static Map empty() {
+      return EMPTY_MAP;
+    }
+
+    /**
+     * @param key access key to element on map
+     * @return reference to value in map
+     */
+    public Reference get(String key) {
+      int index = binarySearch(key);
+      if (index >= 0 && index < size) {
+        return get(index);
+      }
+      return Reference.NULL_REFERENCE;
+    }
+
+    /**
+     * @param key access key to element on map. Keys are assumed to be encoded in UTF-8
+     * @return reference to value in map
+     */
+    public Reference get(byte[] key) {
+      int index = binarySearch(key);
+      if (index >= 0 && index < size) {
+        return get(index);
+      }
+      return Reference.NULL_REFERENCE;
+    }
+
+    /**
+     * Get a vector or keys in the map
+     *
+     * @return vector of keys
+     */
+    public KeyVector keys() {
+      final int num_prefixed_fields = 3;
+      int keysOffset = end - (byteWidth * num_prefixed_fields);
+      return new KeyVector(
+          new TypedVector(
+              bb,
+              indirect(bb, keysOffset, byteWidth),
+              readInt(bb, keysOffset + byteWidth, byteWidth),
+              FBT_KEY));
+    }
+
+    /**
+     * @return {@code Vector} of values from map
+     */
+    public Vector values() {
+      return new Vector(bb, end, byteWidth);
+    }
+
+    /**
+     * Writes text (json) representation of map in a {@code StringBuilder}.
+     *
+     * @param builder {@code StringBuilder} to be appended to
+     * @return Same {@code StringBuilder} with appended text
+     */
+    public StringBuilder toString(StringBuilder builder) {
+      builder.append("{ ");
+      KeyVector keys = keys();
+      int size = size();
+      Vector vals = values();
+      for (int i = 0; i < size; i++) {
+        builder.append('"').append(keys.get(i).toString()).append("\" : ");
+        builder.append(vals.get(i).toString());
+        if (i != size - 1) builder.append(", ");
+      }
+      builder.append(" }");
+      return builder;
+    }
+
+    // Performs a binary search on a key vector and return index of the key in key vector
+    private int binarySearch(CharSequence searchedKey) {
+      int low = 0;
+      int high = size - 1;
+      final int num_prefixed_fields = 3;
+      int keysOffset = end - (byteWidth * num_prefixed_fields);
+      int keysStart = indirect(bb, keysOffset, byteWidth);
+      int keyByteWidth = readInt(bb, keysOffset + byteWidth, byteWidth);
+      while (low <= high) {
+        int mid = (low + high) >>> 1;
+        int keyPos = indirect(bb, keysStart + mid * keyByteWidth, keyByteWidth);
+        int cmp = compareCharSequence(keyPos, searchedKey);
+        if (cmp < 0) low = mid + 1;
+        else if (cmp > 0) high = mid - 1;
+        else return mid; // key found
+      }
+      return -(low + 1); // key not found
+    }
+
+    private int binarySearch(byte[] searchedKey) {
+      int low = 0;
+      int high = size - 1;
+      final int num_prefixed_fields = 3;
+      int keysOffset = end - (byteWidth * num_prefixed_fields);
+      int keysStart = indirect(bb, keysOffset, byteWidth);
+      int keyByteWidth = readInt(bb, keysOffset + byteWidth, byteWidth);
+
+      while (low <= high) {
+        int mid = (low + high) >>> 1;
+        int keyPos = indirect(bb, keysStart + mid * keyByteWidth, keyByteWidth);
+        int cmp = compareBytes(bb, keyPos, searchedKey);
+        if (cmp < 0) low = mid + 1;
+        else if (cmp > 0) high = mid - 1;
+        else return mid; // key found
+      }
+      return -(low + 1); // key not found
+    }
+
+    // compares a byte[] against a FBT_KEY
+    private int compareBytes(ReadBuf bb, int start, byte[] other) {
+      int l1 = start;
+      int l2 = 0;
+      byte c1, c2;
+      do {
+        c1 = bb.get(l1);
+        c2 = other[l2];
+        if (c1 == '\0') return c1 - c2;
+        l1++;
+        l2++;
+        if (l2 == other.length) {
+          // in our buffer we have an additional \0 byte
+          // but this does not exist in regular Java strings, so we return now
+          int cmp = c1 - c2;
+          if (cmp != 0 || bb.get(l1) == '\0') {
+            return cmp;
+          } else {
+            return 1;
+          }
+        }
+      } while (c1 == c2);
+      return c1 - c2;
+    }
+
+    // compares a CharSequence against a FBT_KEY
+    private int compareCharSequence(int start, CharSequence other) {
+      int bufferPos = start;
+      int otherPos = 0;
+      int limit = bb.limit();
+      int otherLimit = other.length();
+
+      // special loop for ASCII characters. Most of keys should be ASCII only, so this
+      // loop should be optimized for that.
+      // breaks if a multi-byte character is found
+      while (otherPos < otherLimit) {
+        char c2 = other.charAt(otherPos);
+
+        if (c2 >= 0x80) {
+          // not a single byte codepoint
+          break;
+        }
+
+        byte b = bb.get(bufferPos);
+
+        if (b == 0) {
+          return -c2;
+        } else if (b < 0) {
+          break;
+        } else if ((char) b != c2) {
+          return b - c2;
+        }
+        ++bufferPos;
+        ++otherPos;
+      }
+
+      while (bufferPos < limit) {
+
+        int sizeInBuff = Utf8.encodeUtf8CodePoint(other, otherPos, comparisonBuffer);
+
+        if (sizeInBuff == 0) {
+          // That means we finish with other and there are not more chars to
+          // compare. String in the buffer is bigger.
+          return bb.get(bufferPos);
+        }
+
+        for (int i = 0; i < sizeInBuff; i++) {
+          byte bufferByte = bb.get(bufferPos++);
+          byte otherByte = comparisonBuffer[i];
+          if (bufferByte == 0) {
+            // Our key is finished, so other is bigger
+            return -otherByte;
+          } else if (bufferByte != otherByte) {
+            return bufferByte - otherByte;
+          }
+        }
+
+        otherPos += sizeInBuff == 4 ? 2 : 1;
+      }
+      return 0;
+    }
+  }
+
+  /** Object that represents a set of elements in the buffer */
+  public static class Vector extends Sized {
+
+    private static final Vector EMPTY_VECTOR = new Vector(EMPTY_BB, 1, 1);
+
+    Vector(ReadBuf bb, int end, int byteWidth) {
+      super(bb, end, byteWidth);
+    }
+
+    /**
+     * Returns an empty {@link Map}
+     *
+     * @return an empty {@link Map}
+     */
+    public static Vector empty() {
+      return EMPTY_VECTOR;
+    }
+
+    /**
+     * Checks if the vector is empty
+     *
+     * @return true if vector is empty
+     */
+    public boolean isEmpty() {
+      return this == EMPTY_VECTOR;
+    }
+
+    /** Appends a text(JSON) representation to a `StringBuilder` */
+    @Override
+    public StringBuilder toString(StringBuilder sb) {
+      sb.append("[ ");
+      int size = size();
+      for (int i = 0; i < size; i++) {
+        get(i).toString(sb);
+        if (i != size - 1) {
+          sb.append(", ");
+        }
+      }
+      sb.append(" ]");
+      return sb;
+    }
+
+    /**
+     * Get a element in a vector by index
+     *
+     * @param index position of the element
+     * @return {@code Reference} to the element
+     */
+    public Reference get(int index) {
+      long len = size();
+      if (index >= len) {
+        return Reference.NULL_REFERENCE;
+      }
+      int packedType = byteToUnsignedInt(bb.get((int) (end + (len * byteWidth) + index)));
+      int obj_end = end + index * byteWidth;
+      return new Reference(bb, obj_end, byteWidth, packedType);
+    }
+  }
+
+  /** Object that represents a set of elements with the same type */
+  public static class TypedVector extends Vector {
+
+    private static final TypedVector EMPTY_VECTOR = new TypedVector(EMPTY_BB, 1, 1, FBT_INT);
+
+    private final int elemType;
+
+    TypedVector(ReadBuf bb, int end, int byteWidth, int elemType) {
+      super(bb, end, byteWidth);
+      this.elemType = elemType;
+    }
+
+    public static TypedVector empty() {
+      return EMPTY_VECTOR;
+    }
+
+    /**
+     * Returns whether the vector is empty
+     *
+     * @return true if empty
+     */
+    public boolean isEmptyVector() {
+      return this == EMPTY_VECTOR;
+    }
+
+    /**
+     * Return element type for all elements in the vector
+     *
+     * @return element type
+     */
+    public int getElemType() {
+      return elemType;
+    }
+
+    /**
+     * Get reference to an object in the {@code Vector}
+     *
+     * @param pos position of the object in {@code Vector}
+     * @return reference to element
+     */
+    @Override
+    public Reference get(int pos) {
+      int len = size();
+      if (pos >= len) return Reference.NULL_REFERENCE;
+      int childPos = end + pos * byteWidth;
+      return new Reference(bb, childPos, byteWidth, 1, elemType);
+    }
+  }
+
+  /** Represent a vector of keys in a map */
+  public static class KeyVector {
+
+    private final TypedVector vec;
+
+    KeyVector(TypedVector vec) {
+      this.vec = vec;
+    }
+
+    /**
+     * Return key
+     *
+     * @param pos position of the key in key vector
+     * @return key
+     */
+    public Key get(int pos) {
+      int len = size();
+      if (pos >= len) return Key.EMPTY;
+      int childPos = vec.end + pos * vec.byteWidth;
+      return new Key(vec.bb, indirect(vec.bb, childPos, vec.byteWidth), 1);
+    }
+
+    /**
+     * Returns size of key vector
+     *
+     * @return size
+     */
+    public int size() {
+      return vec.size();
+    }
+
+    /** Returns a text(JSON) representation */
+    public String toString() {
+      StringBuilder b = new StringBuilder();
+      b.append('[');
+      for (int i = 0; i < vec.size(); i++) {
+        vec.get(i).toString(b);
+        if (i != vec.size() - 1) {
+          b.append(", ");
+        }
+      }
+      return b.append("]").toString();
+    }
+  }
+
+  public static class FlexBufferException extends RuntimeException {
+    FlexBufferException(String msg) {
+      super(msg);
+    }
+  }
+
+  static class Unsigned {
+
+    static int byteToUnsignedInt(byte x) {
+      return ((int) x) & 0xff;
+    }
+
+    static int shortToUnsignedInt(short x) {
+      return ((int) x) & 0xffff;
+    }
+
+    static long intToUnsignedLong(int x) {
+      return ((long) x) & 0xffffffffL;
+    }
+  }
 }
 /// @}
diff --git a/java/src/main/java/com/google/flatbuffers/FlexBuffersBuilder.java b/java/src/main/java/com/google/flatbuffers/FlexBuffersBuilder.java
index 60ab535..57a6e6f 100644
--- a/java/src/main/java/com/google/flatbuffers/FlexBuffersBuilder.java
+++ b/java/src/main/java/com/google/flatbuffers/FlexBuffersBuilder.java
@@ -16,787 +16,823 @@
 
 package com.google.flatbuffers;
 
+import static com.google.flatbuffers.FlexBuffers.*;
+import static com.google.flatbuffers.FlexBuffers.Unsigned.byteToUnsignedInt;
+import static com.google.flatbuffers.FlexBuffers.Unsigned.intToUnsignedLong;
+import static com.google.flatbuffers.FlexBuffers.Unsigned.shortToUnsignedInt;
+
 import java.math.BigInteger;
 import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 
-import static com.google.flatbuffers.FlexBuffers.*;
-import static com.google.flatbuffers.FlexBuffers.Unsigned.byteToUnsignedInt;
-import static com.google.flatbuffers.FlexBuffers.Unsigned.intToUnsignedLong;
-import static com.google.flatbuffers.FlexBuffers.Unsigned.shortToUnsignedInt;
-
 /// @file
 /// @addtogroup flatbuffers_java_api
 /// @{
 
 /**
  * Helper class that builds FlexBuffers
- * <p> This class presents all necessary APIs to create FlexBuffers. A `ByteBuffer` will be used to store the
- * data. It can be created internally, or passed down in the constructor.</p>
+ *
+ * <p>This class presents all necessary APIs to create FlexBuffers. A `ByteBuffer` will be used to
+ * store the data. It can be created internally, or passed down in the constructor.
  *
  * <p>There are some limitations when compared to original implementation in C++. Most notably:
+ *
  * <ul>
- *   <li><p> No support for mutations (might change in the future).</p></li>
- *   <li><p> Buffer size limited to {@link Integer#MAX_VALUE}</p></li>
- *   <li><p> Since Java does not support unsigned type, all unsigned operations accepts an immediate higher representation
- *   of similar type.</p></li>
+ *   <li>
+ *       <p>No support for mutations (might change in the future).
+ *   <li>
+ *       <p>Buffer size limited to {@link Integer#MAX_VALUE}
+ *   <li>
+ *       <p>Since Java does not support unsigned type, all unsigned operations accepts an immediate
+ *       higher representation of similar type.
  * </ul>
- * </p>
  */
 public class FlexBuffersBuilder {
 
-    /**
-     * No keys or strings will be shared
-     */
-    public static final int BUILDER_FLAG_NONE = 0;
-    /**
-     * Keys will be shared between elements. Identical keys will only be serialized once, thus possibly saving space.
-     * But serialization performance might be slower and consumes more memory.
-     */
-    public static final int BUILDER_FLAG_SHARE_KEYS = 1;
-    /**
-     * Strings will be shared between elements. Identical strings will only be serialized once, thus possibly saving space.
-     * But serialization performance might be slower and consumes more memory. This is ideal if you expect many repeated
-     * strings on the message.
-     */
-    public static final int BUILDER_FLAG_SHARE_STRINGS = 2;
-    /**
-     * Strings and keys will be shared between elements.
-     */
-    public static final int BUILDER_FLAG_SHARE_KEYS_AND_STRINGS = 3;
-    /**
-     * Reserved for the future.
-     */
-    public static final int BUILDER_FLAG_SHARE_KEY_VECTORS = 4;
-    /**
-     * Reserved for the future.
-     */
-    public static final int BUILDER_FLAG_SHARE_ALL = 7;
+  /** No keys or strings will be shared */
+  public static final int BUILDER_FLAG_NONE = 0;
 
-    /// @cond FLATBUFFERS_INTERNAL
-    private static final int WIDTH_8 = 0;
-    private static final int WIDTH_16 = 1;
-    private static final int WIDTH_32 = 2;
-    private static final int WIDTH_64 = 3;
-    private final ReadWriteBuf bb;
-    private final ArrayList<Value> stack = new ArrayList<>();
-    private final HashMap<String, Integer> keyPool = new HashMap<>();
-    private final HashMap<String, Integer> stringPool = new HashMap<>();
-    private final int flags;
-    private boolean finished = false;
+  /**
+   * Keys will be shared between elements. Identical keys will only be serialized once, thus
+   * possibly saving space. But serialization performance might be slower and consumes more memory.
+   */
+  public static final int BUILDER_FLAG_SHARE_KEYS = 1;
 
-    // A lambda to sort map keys
-    private Comparator<Value> keyComparator = new Comparator<Value>() {
+  /**
+   * Strings will be shared between elements. Identical strings will only be serialized once, thus
+   * possibly saving space. But serialization performance might be slower and consumes more memory.
+   * This is ideal if you expect many repeated strings on the message.
+   */
+  public static final int BUILDER_FLAG_SHARE_STRINGS = 2;
+
+  /** Strings and keys will be shared between elements. */
+  public static final int BUILDER_FLAG_SHARE_KEYS_AND_STRINGS = 3;
+
+  /** Reserved for the future. */
+  public static final int BUILDER_FLAG_SHARE_KEY_VECTORS = 4;
+
+  /** Reserved for the future. */
+  public static final int BUILDER_FLAG_SHARE_ALL = 7;
+
+  /// @cond FLATBUFFERS_INTERNAL
+  private static final int WIDTH_8 = 0;
+  private static final int WIDTH_16 = 1;
+  private static final int WIDTH_32 = 2;
+  private static final int WIDTH_64 = 3;
+  private final ReadWriteBuf bb;
+  private final ArrayList<Value> stack = new ArrayList<>();
+  private final HashMap<String, Integer> keyPool = new HashMap<>();
+  private final HashMap<String, Integer> stringPool = new HashMap<>();
+  private final int flags;
+  private boolean finished = false;
+
+  // A lambda to sort map keys
+  private Comparator<Value> keyComparator =
+      new Comparator<Value>() {
         @Override
         public int compare(Value o1, Value o2) {
-            int ia = o1.key;
-            int io =  o2.key;
-            byte c1, c2;
-            do {
-                c1 = bb.get(ia);
-                c2 = bb.get(io);
-                if (c1 == 0)
-                    return c1 - c2;
-                ia++;
-                io++;
-            }
-            while (c1 == c2);
-            return c1 - c2;
+          int ia = o1.key;
+          int io = o2.key;
+          byte c1, c2;
+          do {
+            c1 = bb.get(ia);
+            c2 = bb.get(io);
+            if (c1 == 0) return c1 - c2;
+            ia++;
+            io++;
+          } while (c1 == c2);
+          return c1 - c2;
         }
-    };
-    /// @endcond
+      };
 
-    /**
-     * Constructs a newly allocated {@code FlexBuffersBuilder} with {@link #BUILDER_FLAG_SHARE_KEYS} set.
-     * @param bufSize size of buffer in bytes.
-     */
-    public FlexBuffersBuilder(int bufSize) {
-        this(new ArrayReadWriteBuf(bufSize), BUILDER_FLAG_SHARE_KEYS);
+  /// @endcond
+
+  /**
+   * Constructs a newly allocated {@code FlexBuffersBuilder} with {@link #BUILDER_FLAG_SHARE_KEYS}
+   * set.
+   *
+   * @param bufSize size of buffer in bytes.
+   */
+  public FlexBuffersBuilder(int bufSize) {
+    this(new ArrayReadWriteBuf(bufSize), BUILDER_FLAG_SHARE_KEYS);
+  }
+
+  /**
+   * Constructs a newly allocated {@code FlexBuffersBuilder} with {@link #BUILDER_FLAG_SHARE_KEYS}
+   * set.
+   */
+  public FlexBuffersBuilder() {
+    this(256);
+  }
+
+  /**
+   * Constructs a newly allocated {@code FlexBuffersBuilder}.
+   *
+   * @param bb `ByteBuffer` that will hold the message
+   * @param flags Share flags
+   */
+  @Deprecated
+  public FlexBuffersBuilder(ByteBuffer bb, int flags) {
+    this(new ArrayReadWriteBuf(bb.array()), flags);
+  }
+
+  public FlexBuffersBuilder(ReadWriteBuf bb, int flags) {
+    this.bb = bb;
+    this.flags = flags;
+  }
+
+  /**
+   * Constructs a newly allocated {@code FlexBuffersBuilder}. By default same keys will be
+   * serialized only once
+   *
+   * @param bb `ByteBuffer` that will hold the message
+   */
+  public FlexBuffersBuilder(ByteBuffer bb) {
+    this(bb, BUILDER_FLAG_SHARE_KEYS);
+  }
+
+  /** Reset the FlexBuffersBuilder by purging all data that it holds. */
+  public void clear() {
+    bb.clear();
+    stack.clear();
+    keyPool.clear();
+    stringPool.clear();
+    finished = false;
+  }
+
+  /**
+   * Return `ByteBuffer` containing FlexBuffer message. {@code #finish()} must be called before
+   * calling this function otherwise an assert will trigger.
+   *
+   * @return `ByteBuffer` with finished message
+   */
+  public ReadWriteBuf getBuffer() {
+    assert (finished);
+    return bb;
+  }
+
+  /** Insert a null value into the buffer */
+  public void putNull() {
+    putNull(null);
+  }
+
+  /**
+   * Insert a null value into the buffer
+   *
+   * @param key key used to store element in map
+   */
+  public void putNull(String key) {
+    stack.add(Value.nullValue(putKey(key)));
+  }
+
+  /**
+   * Insert a single boolean into the buffer
+   *
+   * @param val true or false
+   */
+  public void putBoolean(boolean val) {
+    putBoolean(null, val);
+  }
+
+  /**
+   * Insert a single boolean into the buffer
+   *
+   * @param key key used to store element in map
+   * @param val true or false
+   */
+  public void putBoolean(String key, boolean val) {
+    stack.add(Value.bool(putKey(key), val));
+  }
+
+  private int putKey(String key) {
+    if (key == null) {
+      return -1;
     }
-
-    /**
-     * Constructs a newly allocated {@code FlexBuffersBuilder} with {@link #BUILDER_FLAG_SHARE_KEYS} set.
-     */
-    public FlexBuffersBuilder() {
-        this(256);
+    int pos = bb.writePosition();
+    if ((flags & BUILDER_FLAG_SHARE_KEYS) != 0) {
+      Integer keyFromPool = keyPool.get(key);
+      if (keyFromPool == null) {
+        byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);
+        bb.put(keyBytes, 0, keyBytes.length);
+        bb.put((byte) 0);
+        keyPool.put(key, pos);
+      } else {
+        pos = keyFromPool;
+      }
+    } else {
+      byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);
+      bb.put(keyBytes, 0, keyBytes.length);
+      bb.put((byte) 0);
+      keyPool.put(key, pos);
     }
+    return pos;
+  }
 
-    /**
-     * Constructs a newly allocated {@code FlexBuffersBuilder}.
-     *
-     * @param bb    `ByteBuffer` that will hold the message
-     * @param flags Share flags
-     */
-    @Deprecated
-    public FlexBuffersBuilder(ByteBuffer bb, int flags) {
-        this(new ArrayReadWriteBuf(bb.array()), flags);
+  /**
+   * Adds a integer into the buff
+   *
+   * @param val integer
+   */
+  public void putInt(int val) {
+    putInt(null, val);
+  }
+
+  /**
+   * Adds a integer into the buff
+   *
+   * @param key key used to store element in map
+   * @param val integer
+   */
+  public void putInt(String key, int val) {
+    putInt(key, (long) val);
+  }
+
+  /**
+   * Adds a integer into the buff
+   *
+   * @param key key used to store element in map
+   * @param val 64-bit integer
+   */
+  public void putInt(String key, long val) {
+    int iKey = putKey(key);
+    if (Byte.MIN_VALUE <= val && val <= Byte.MAX_VALUE) {
+      stack.add(Value.int8(iKey, (int) val));
+    } else if (Short.MIN_VALUE <= val && val <= Short.MAX_VALUE) {
+      stack.add(Value.int16(iKey, (int) val));
+    } else if (Integer.MIN_VALUE <= val && val <= Integer.MAX_VALUE) {
+      stack.add(Value.int32(iKey, (int) val));
+    } else {
+      stack.add(Value.int64(iKey, val));
     }
+  }
 
-    public FlexBuffersBuilder(ReadWriteBuf bb, int flags) {
-        this.bb = bb;
-        this.flags = flags;
+  /**
+   * Adds a 64-bit integer into the buff
+   *
+   * @param value integer
+   */
+  public void putInt(long value) {
+    putInt(null, value);
+  }
+
+  /**
+   * Adds a unsigned integer into the buff.
+   *
+   * @param value integer representing unsigned value
+   */
+  public void putUInt(int value) {
+    putUInt(null, (long) value);
+  }
+
+  /**
+   * Adds a unsigned integer (stored in a signed 64-bit integer) into the buff.
+   *
+   * @param value integer representing unsigned value
+   */
+  public void putUInt(long value) {
+    putUInt(null, value);
+  }
+
+  /**
+   * Adds a 64-bit unsigned integer (stored as {@link BigInteger}) into the buff. Warning: This
+   * operation might be very slow.
+   *
+   * @param value integer representing unsigned value
+   */
+  public void putUInt64(BigInteger value) {
+    putUInt64(null, value.longValue());
+  }
+
+  private void putUInt64(String key, long value) {
+    stack.add(Value.uInt64(putKey(key), value));
+  }
+
+  private void putUInt(String key, long value) {
+    int iKey = putKey(key);
+    Value vVal;
+
+    int width = widthUInBits(value);
+
+    if (width == WIDTH_8) {
+      vVal = Value.uInt8(iKey, (int) value);
+    } else if (width == WIDTH_16) {
+      vVal = Value.uInt16(iKey, (int) value);
+    } else if (width == WIDTH_32) {
+      vVal = Value.uInt32(iKey, (int) value);
+    } else {
+      vVal = Value.uInt64(iKey, value);
     }
+    stack.add(vVal);
+  }
 
-    /**
-     * Constructs a newly allocated {@code FlexBuffersBuilder}.
-     * By default same keys will be serialized only once
-     * @param bb `ByteBuffer` that will hold the message
-     */
-    public FlexBuffersBuilder(ByteBuffer bb) {
-        this(bb, BUILDER_FLAG_SHARE_KEYS);
-    }
+  /**
+   * Adds a 32-bit float into the buff.
+   *
+   * @param value float representing value
+   */
+  public void putFloat(float value) {
+    putFloat(null, value);
+  }
 
-    /**
-     * Reset the FlexBuffersBuilder by purging all data that it holds.
-     */
-    public void clear(){
-        bb.clear();
-        stack.clear();
-        keyPool.clear();
-        stringPool.clear();
-        finished = false;
-    }
+  /**
+   * Adds a 32-bit float into the buff.
+   *
+   * @param key key used to store element in map
+   * @param value float representing value
+   */
+  public void putFloat(String key, float val) {
+    stack.add(Value.float32(putKey(key), val));
+  }
 
-    /**
-     * Return `ByteBuffer` containing FlexBuffer message. {@code #finish()} must be called before calling this
-     * function otherwise an assert will trigger.
-     *
-     * @return `ByteBuffer` with finished message
-     */
-    public ReadWriteBuf getBuffer() {
-        assert (finished);
-        return bb;
-    }
+  /**
+   * Adds a 64-bit float into the buff.
+   *
+   * @param value float representing value
+   */
+  public void putFloat(double value) {
+    putFloat(null, value);
+  }
 
-    /**
-     * Insert a null value into the buffer
-     */
-    public void putNull() {
-        putNull(null);
-    }
+  /**
+   * Adds a 64-bit float into the buff.
+   *
+   * @param key key used to store element in map
+   * @param value float representing value
+   */
+  public void putFloat(String key, double val) {
+    stack.add(Value.float64(putKey(key), val));
+  }
 
-    /**
-     * Insert a null value into the buffer
-     * @param key key used to store element in map
-     */
-    public void putNull(String key) {
-        stack.add(Value.nullValue(putKey(key)));
-    }
+  /**
+   * Adds a String into the buffer
+   *
+   * @param value string
+   * @return start position of string in the buffer
+   */
+  public int putString(String value) {
+    return putString(null, value);
+  }
 
-    /**
-     * Insert a single boolean into the buffer
-     * @param val true or false
-     */
-    public void putBoolean(boolean val) {
-        putBoolean(null, val);
-    }
-
-    /**
-     * Insert a single boolean into the buffer
-     * @param key key used to store element in map
-     * @param val true or false
-     */
-    public void putBoolean(String key, boolean val) {
-        stack.add(Value.bool(putKey(key), val));
-    }
-
-    private int putKey(String key) {
-        if (key == null) {
-            return -1;
-        }
-        int pos = bb.writePosition();
-        if ((flags & BUILDER_FLAG_SHARE_KEYS) != 0) {
-            Integer keyFromPool = keyPool.get(key);
-            if (keyFromPool == null) {
-                byte[]  keyBytes = key.getBytes(StandardCharsets.UTF_8);
-                bb.put(keyBytes, 0, keyBytes.length);
-                bb.put((byte) 0);
-                keyPool.put(key, pos);
-            } else {
-                pos = keyFromPool;
-            }
-        } else {
-            byte[]  keyBytes = key.getBytes(StandardCharsets.UTF_8);
-            bb.put(keyBytes, 0, keyBytes.length);
-            bb.put((byte) 0);
-            keyPool.put(key, pos);
-        }
-        return pos;
-    }
-
-    /**
-     * Adds a integer into the buff
-     * @param val integer
-     */
-    public void putInt(int val) {
-        putInt(null, val);
-    }
-
-    /**
-     * Adds a integer into the buff
-     * @param key key used to store element in map
-     * @param val integer
-     */
-    public void putInt(String key, int val) {
-        putInt(key, (long) val);
-    }
-
-    /**
-     * Adds a integer into the buff
-     * @param key key used to store element in map
-     * @param val 64-bit integer
-     */
-    public void putInt(String key, long val) {
-        int iKey = putKey(key);
-        if (Byte.MIN_VALUE <= val && val <= Byte.MAX_VALUE) {
-            stack.add(Value.int8(iKey, (int) val));
-        } else if (Short.MIN_VALUE <= val && val <= Short.MAX_VALUE) {
-            stack.add(Value.int16(iKey, (int) val));
-        } else if (Integer.MIN_VALUE <= val && val <= Integer.MAX_VALUE) {
-            stack.add(Value.int32(iKey, (int) val));
-        } else {
-            stack.add(Value.int64(iKey, val));
-        }
-    }
-
-    /**
-     * Adds a 64-bit integer into the buff
-     * @param value integer
-     */
-    public void putInt(long value) {
-        putInt(null, value);
-    }
-
-    /**
-     * Adds a unsigned integer into the buff.
-     * @param value integer representing unsigned value
-     */
-    public void putUInt(int value) {
-        putUInt(null, (long) value);
-    }
-
-    /**
-     * Adds a unsigned integer (stored in a signed 64-bit integer) into the buff.
-     * @param value integer representing unsigned value
-     */
-    public void putUInt(long value) {
-        putUInt(null, value);
-    }
-
-    /**
-     * Adds a 64-bit unsigned integer (stored as {@link BigInteger}) into the buff.
-     * Warning: This operation might be very slow.
-     * @param value integer representing unsigned value
-     */
-    public void putUInt64(BigInteger value) {
-        putUInt64(null, value.longValue());
-    }
-
-    private void putUInt64(String key, long value) {
-        stack.add(Value.uInt64(putKey(key), value));
-    }
-
-    private void putUInt(String key, long value) {
-        int iKey = putKey(key);
-        Value vVal;
-
-        int width = widthUInBits(value);
-
-        if (width == WIDTH_8) {
-            vVal = Value.uInt8(iKey, (int)value);
-        } else if (width == WIDTH_16) {
-            vVal = Value.uInt16(iKey, (int)value);
-        } else if (width == WIDTH_32) {
-            vVal = Value.uInt32(iKey, (int)value);
-        } else {
-            vVal = Value.uInt64(iKey, value);
-        }
-        stack.add(vVal);
-    }
-
-    /**
-     * Adds a 32-bit float into the buff.
-     * @param value float representing value
-     */
-    public void putFloat(float value) {
-        putFloat(null, value);
-    }
-
-    /**
-     * Adds a 32-bit float into the buff.
-     * @param key key used to store element in map
-     * @param value float representing value
-     */
-    public void putFloat(String key, float val) {
-        stack.add(Value.float32(putKey(key), val));
-    }
-
-    /**
-     * Adds a 64-bit float into the buff.
-     * @param value float representing value
-     */
-    public void putFloat(double value) {
-        putFloat(null, value);
-    }
-
-    /**
-     * Adds a 64-bit float into the buff.
-     * @param key key used to store element in map
-     * @param value float representing value
-     */
-    public void putFloat(String key, double val) {
-        stack.add(Value.float64(putKey(key), val));
-    }
-
-    /**
-     * Adds a String into the buffer
-     * @param value string
-     * @return start position of string in the buffer
-     */
-    public int putString(String value) {
-        return putString(null, value);
-    }
-
-    /**
-     * Adds a String into the buffer
-     * @param key key used to store element in map
-     * @param value string
-     * @return start position of string in the buffer
-     */
-    public int putString(String key, String val) {
-        int iKey = putKey(key);
-        if ((flags & FlexBuffersBuilder.BUILDER_FLAG_SHARE_STRINGS) != 0) {
-            Integer i = stringPool.get(val);
-            if (i == null) {
-                Value value = writeString(iKey, val);
-                stringPool.put(val, (int) value.iValue);
-                stack.add(value);
-                return (int) value.iValue;
-            } else {
-                int bitWidth = widthUInBits(val.length());
-                stack.add(Value.blob(iKey, i, FBT_STRING, bitWidth));
-                return i;
-            }
-        } else {
-            Value value = writeString(iKey, val);
-            stack.add(value);
-            return (int) value.iValue;
-        }
-    }
-
-    private Value writeString(int key, String s) {
-        return writeBlob(key, s.getBytes(StandardCharsets.UTF_8), FBT_STRING, true);
-    }
-
-    // in bits to fit a unsigned int
-    static int widthUInBits(long len) {
-        if (len <= byteToUnsignedInt((byte)0xff)) return WIDTH_8;
-        if (len <= shortToUnsignedInt((short)0xffff)) return WIDTH_16;
-        if (len <= intToUnsignedLong(0xffff_ffff)) return WIDTH_32;
-        return WIDTH_64;
-    }
-
-    private Value writeBlob(int key, byte[] blob, int type, boolean trailing) {
-        int bitWidth = widthUInBits(blob.length);
-        int byteWidth = align(bitWidth);
-        writeInt(blob.length, byteWidth);
-        int sloc = bb.writePosition();
-        bb.put(blob, 0, blob.length);
-        if (trailing) {
-            bb.put((byte) 0);
-        }
-        return Value.blob(key, sloc, type, bitWidth);
-    }
-
-    // Align to prepare for writing a scalar with a certain size.
-    private int align(int alignment) {
-        int byteWidth = 1 << alignment;
-        int padBytes = Value.paddingBytes(bb.writePosition(), byteWidth);
-        while (padBytes-- != 0) {
-            bb.put((byte) 0);
-        }
-        return byteWidth;
-    }
-
-    private void writeInt(long value, int byteWidth) {
-        switch (byteWidth) {
-            case 1: bb.put((byte) value); break;
-            case 2: bb.putShort((short) value); break;
-            case 4: bb.putInt((int) value); break;
-            case 8: bb.putLong(value); break;
-        }
-    }
-
-    /**
-     * Adds a byte array into the message
-     * @param value byte array
-     * @return position in buffer as the start of byte array
-     */
-    public int putBlob(byte[] value) {
-        return putBlob(null, value);
-    }
-
-    /**
-     * Adds a byte array into the message
-     * @param key key used to store element in map
-     * @param value byte array
-     * @return position in buffer as the start of byte array
-     */
-    public int putBlob(String key, byte[] val) {
-        int iKey = putKey(key);
-        Value value = writeBlob(iKey, val, FBT_BLOB, false);
+  /**
+   * Adds a String into the buffer
+   *
+   * @param key key used to store element in map
+   * @param value string
+   * @return start position of string in the buffer
+   */
+  public int putString(String key, String val) {
+    int iKey = putKey(key);
+    if ((flags & FlexBuffersBuilder.BUILDER_FLAG_SHARE_STRINGS) != 0) {
+      Integer i = stringPool.get(val);
+      if (i == null) {
+        Value value = writeString(iKey, val);
+        stringPool.put(val, (int) value.iValue);
         stack.add(value);
         return (int) value.iValue;
+      } else {
+        int bitWidth = widthUInBits(val.length());
+        stack.add(Value.blob(iKey, i, FBT_STRING, bitWidth));
+        return i;
+      }
+    } else {
+      Value value = writeString(iKey, val);
+      stack.add(value);
+      return (int) value.iValue;
+    }
+  }
+
+  private Value writeString(int key, String s) {
+    return writeBlob(key, s.getBytes(StandardCharsets.UTF_8), FBT_STRING, true);
+  }
+
+  // in bits to fit a unsigned int
+  static int widthUInBits(long len) {
+    if (len <= byteToUnsignedInt((byte) 0xff)) return WIDTH_8;
+    if (len <= shortToUnsignedInt((short) 0xffff)) return WIDTH_16;
+    if (len <= intToUnsignedLong(0xffff_ffff)) return WIDTH_32;
+    return WIDTH_64;
+  }
+
+  private Value writeBlob(int key, byte[] blob, int type, boolean trailing) {
+    int bitWidth = widthUInBits(blob.length);
+    int byteWidth = align(bitWidth);
+    writeInt(blob.length, byteWidth);
+    int sloc = bb.writePosition();
+    bb.put(blob, 0, blob.length);
+    if (trailing) {
+      bb.put((byte) 0);
+    }
+    return Value.blob(key, sloc, type, bitWidth);
+  }
+
+  // Align to prepare for writing a scalar with a certain size.
+  private int align(int alignment) {
+    int byteWidth = 1 << alignment;
+    int padBytes = Value.paddingBytes(bb.writePosition(), byteWidth);
+    while (padBytes-- != 0) {
+      bb.put((byte) 0);
+    }
+    return byteWidth;
+  }
+
+  private void writeInt(long value, int byteWidth) {
+    switch (byteWidth) {
+      case 1:
+        bb.put((byte) value);
+        break;
+      case 2:
+        bb.putShort((short) value);
+        break;
+      case 4:
+        bb.putInt((int) value);
+        break;
+      case 8:
+        bb.putLong(value);
+        break;
+    }
+  }
+
+  /**
+   * Adds a byte array into the message
+   *
+   * @param value byte array
+   * @return position in buffer as the start of byte array
+   */
+  public int putBlob(byte[] value) {
+    return putBlob(null, value);
+  }
+
+  /**
+   * Adds a byte array into the message
+   *
+   * @param key key used to store element in map
+   * @param value byte array
+   * @return position in buffer as the start of byte array
+   */
+  public int putBlob(String key, byte[] val) {
+    int iKey = putKey(key);
+    Value value = writeBlob(iKey, val, FBT_BLOB, false);
+    stack.add(value);
+    return (int) value.iValue;
+  }
+
+  /**
+   * Start a new vector in the buffer.
+   *
+   * @return a reference indicating position of the vector in buffer. This reference must be passed
+   *     along when the vector is finished using endVector()
+   */
+  public int startVector() {
+    return stack.size();
+  }
+
+  /**
+   * Finishes a vector, but writing the information in the buffer
+   *
+   * @param key key used to store element in map
+   * @param start reference for beginning of the vector. Returned by {@link startVector()}
+   * @param typed boolean indicating whether vector is typed
+   * @param fixed boolean indicating whether vector is fixed
+   * @return Reference to the vector
+   */
+  public int endVector(String key, int start, boolean typed, boolean fixed) {
+    int iKey = putKey(key);
+    Value vec = createVector(iKey, start, stack.size() - start, typed, fixed, null);
+    // Remove temp elements and return vector.
+    while (stack.size() > start) {
+      stack.remove(stack.size() - 1);
+    }
+    stack.add(vec);
+    return (int) vec.iValue;
+  }
+
+  /**
+   * Finish writing the message into the buffer. After that no other element must be inserted into
+   * the buffer. Also, you must call this function before start using the FlexBuffer message
+   *
+   * @return `ByteBuffer` containing the FlexBuffer message
+   */
+  public ByteBuffer finish() {
+    // If you hit this assert, you likely have objects that were never included
+    // in a parent. You need to have exactly one root to finish a buffer.
+    // Check your Start/End calls are matched, and all objects are inside
+    // some other object.
+    assert (stack.size() == 1);
+    // Write root value.
+    int byteWidth = align(stack.get(0).elemWidth(bb.writePosition(), 0));
+    writeAny(stack.get(0), byteWidth);
+    // Write root type.
+    bb.put(stack.get(0).storedPackedType());
+    // Write root size. Normally determined by parent, but root has no parent :)
+    bb.put((byte) byteWidth);
+    this.finished = true;
+    return ByteBuffer.wrap(bb.data(), 0, bb.writePosition());
+  }
+
+  /*
+   * Create a vector based on the elements stored in the stack
+   *
+   * @param key    reference to its key
+   * @param start  element in the stack
+   * @param length size of the vector
+   * @param typed  whether is TypedVector or not
+   * @param fixed  whether is Fixed vector or not
+   * @param keys   Value representing key vector
+   * @return Value representing the created vector
+   */
+  private Value createVector(
+      int key, int start, int length, boolean typed, boolean fixed, Value keys) {
+    if (fixed & !typed)
+      throw new UnsupportedOperationException("Untyped fixed vector is not supported");
+
+    // Figure out smallest bit width we can store this vector with.
+    int bitWidth = Math.max(WIDTH_8, widthUInBits(length));
+    int prefixElems = 1;
+    if (keys != null) {
+      // If this vector is part of a map, we will pre-fix an offset to the keys
+      // to this vector.
+      bitWidth = Math.max(bitWidth, keys.elemWidth(bb.writePosition(), 0));
+      prefixElems += 2;
+    }
+    int vectorType = FBT_KEY;
+    // Check bit widths and types for all elements.
+    for (int i = start; i < stack.size(); i++) {
+      int elemWidth = stack.get(i).elemWidth(bb.writePosition(), i + prefixElems);
+      bitWidth = Math.max(bitWidth, elemWidth);
+      if (typed) {
+        if (i == start) {
+          vectorType = stack.get(i).type;
+          if (!FlexBuffers.isTypedVectorElementType(vectorType)) {
+            throw new FlexBufferException("TypedVector does not support this element type");
+          }
+        } else {
+          // If you get this assert, you are writing a typed vector with
+          // elements that are not all the same type.
+          assert (vectorType == stack.get(i).type);
+        }
+      }
+    }
+    // If you get this assert, your fixed types are not one of:
+    // Int / UInt / Float / Key.
+    assert (!fixed || FlexBuffers.isTypedVectorElementType(vectorType));
+
+    int byteWidth = align(bitWidth);
+    // Write vector. First the keys width/offset if available, and size.
+    if (keys != null) {
+      writeOffset(keys.iValue, byteWidth);
+      writeInt(1L << keys.minBitWidth, byteWidth);
+    }
+    if (!fixed) {
+      writeInt(length, byteWidth);
+    }
+    // Then the actual data.
+    int vloc = bb.writePosition();
+    for (int i = start; i < stack.size(); i++) {
+      writeAny(stack.get(i), byteWidth);
+    }
+    // Then the types.
+    if (!typed) {
+      for (int i = start; i < stack.size(); i++) {
+        bb.put(stack.get(i).storedPackedType(bitWidth));
+      }
+    }
+    return new Value(
+        key,
+        keys != null
+            ? FBT_MAP
+            : (typed ? FlexBuffers.toTypedVector(vectorType, fixed ? length : 0) : FBT_VECTOR),
+        bitWidth,
+        vloc);
+  }
+
+  private void writeOffset(long val, int byteWidth) {
+    int reloff = (int) (bb.writePosition() - val);
+    assert (byteWidth == 8 || reloff < 1L << (byteWidth * 8));
+    writeInt(reloff, byteWidth);
+  }
+
+  private void writeAny(final Value val, int byteWidth) {
+    switch (val.type) {
+      case FBT_NULL:
+      case FBT_BOOL:
+      case FBT_INT:
+      case FBT_UINT:
+        writeInt(val.iValue, byteWidth);
+        break;
+      case FBT_FLOAT:
+        writeDouble(val.dValue, byteWidth);
+        break;
+      default:
+        writeOffset(val.iValue, byteWidth);
+        break;
+    }
+  }
+
+  private void writeDouble(double val, int byteWidth) {
+    if (byteWidth == 4) {
+      bb.putFloat((float) val);
+    } else if (byteWidth == 8) {
+      bb.putDouble(val);
+    }
+  }
+
+  /**
+   * Start a new map in the buffer.
+   *
+   * @return a reference indicating position of the map in buffer. This reference must be passed
+   *     along when the map is finished using endMap()
+   */
+  public int startMap() {
+    return stack.size();
+  }
+
+  /**
+   * Finishes a map, but writing the information in the buffer
+   *
+   * @param key key used to store element in map
+   * @param start reference for beginning of the map. Returned by {@link startMap()}
+   * @return Reference to the map
+   */
+  public int endMap(String key, int start) {
+    int iKey = putKey(key);
+
+    Collections.sort(stack.subList(start, stack.size()), keyComparator);
+
+    Value keys = createKeyVector(start, stack.size() - start);
+    Value vec = createVector(iKey, start, stack.size() - start, false, false, keys);
+    // Remove temp elements and return map.
+    while (stack.size() > start) {
+      stack.remove(stack.size() - 1);
+    }
+    stack.add(vec);
+    return (int) vec.iValue;
+  }
+
+  private Value createKeyVector(int start, int length) {
+    // Figure out smallest bit width we can store this vector with.
+    int bitWidth = Math.max(WIDTH_8, widthUInBits(length));
+    int prefixElems = 1;
+    // Check bit widths and types for all elements.
+    for (int i = start; i < stack.size(); i++) {
+      int elemWidth =
+          Value.elemWidth(FBT_KEY, WIDTH_8, stack.get(i).key, bb.writePosition(), i + prefixElems);
+      bitWidth = Math.max(bitWidth, elemWidth);
     }
 
-    /**
-     * Start a new vector in the buffer.
-     * @return a reference indicating position of the vector in buffer. This
-     * reference must be passed along when the vector is finished using endVector()
-     */
-    public int startVector() {
-        return stack.size();
+    int byteWidth = align(bitWidth);
+    // Write vector. First the keys width/offset if available, and size.
+    writeInt(length, byteWidth);
+    // Then the actual data.
+    int vloc = bb.writePosition();
+    for (int i = start; i < stack.size(); i++) {
+      int pos = stack.get(i).key;
+      assert (pos != -1);
+      writeOffset(stack.get(i).key, byteWidth);
+    }
+    // Then the types.
+    return new Value(-1, FlexBuffers.toTypedVector(FBT_KEY, 0), bitWidth, vloc);
+  }
+
+  private static class Value {
+    final int type;
+    // for scalars, represents scalar size in bytes
+    // for vectors, represents the size
+    // for string, length
+    final int minBitWidth;
+    // float value
+    final double dValue;
+    // integer value
+    long iValue;
+    // position of the key associated with this value in buffer
+    int key;
+
+    Value(int key, int type, int bitWidth, long iValue) {
+      this.key = key;
+      this.type = type;
+      this.minBitWidth = bitWidth;
+      this.iValue = iValue;
+      this.dValue = Double.MIN_VALUE;
     }
 
-    /**
-     * Finishes a vector, but writing the information in the buffer
-     * @param key   key used to store element in map
-     * @param start reference for beginning of the vector. Returned by {@link startVector()}
-     * @param typed boolean indicating whether vector is typed
-     * @param fixed boolean indicating whether vector is fixed
-     * @return      Reference to the vector
-     */
-    public int endVector(String key, int start, boolean typed, boolean fixed) {
-        int iKey = putKey(key);
-        Value vec = createVector(iKey, start, stack.size() - start, typed, fixed, null);
-        // Remove temp elements and return vector.
-        while (stack.size() > start) {
-            stack.remove(stack.size() - 1);
-        }
-        stack.add(vec);
-        return (int) vec.iValue;
+    Value(int key, int type, int bitWidth, double dValue) {
+      this.key = key;
+      this.type = type;
+      this.minBitWidth = bitWidth;
+      this.dValue = dValue;
+      this.iValue = Long.MIN_VALUE;
     }
 
-    /**
-     * Finish writing the message into the buffer. After that no other element must
-     * be inserted into the buffer. Also, you must call this function before start using the
-     * FlexBuffer message
-     * @return `ByteBuffer` containing the FlexBuffer message
-     */
-    public ByteBuffer finish() {
-        // If you hit this assert, you likely have objects that were never included
-        // in a parent. You need to have exactly one root to finish a buffer.
-        // Check your Start/End calls are matched, and all objects are inside
-        // some other object.
-        assert (stack.size() == 1);
-        // Write root value.
-        int byteWidth = align(stack.get(0).elemWidth(bb.writePosition(), 0));
-        writeAny(stack.get(0), byteWidth);
-        // Write root type.
-        bb.put(stack.get(0).storedPackedType());
-        // Write root size. Normally determined by parent, but root has no parent :)
-        bb.put((byte) byteWidth);
-        this.finished = true;
-        return ByteBuffer.wrap(bb.data(), 0, bb.writePosition());
+    static Value nullValue(int key) {
+      return new Value(key, FBT_NULL, WIDTH_8, 0);
     }
 
-    /*
-     * Create a vector based on the elements stored in the stack
-     *
-     * @param key    reference to its key
-     * @param start  element in the stack
-     * @param length size of the vector
-     * @param typed  whether is TypedVector or not
-     * @param fixed  whether is Fixed vector or not
-     * @param keys   Value representing key vector
-     * @return Value representing the created vector
-     */
-    private Value createVector(int key, int start, int length, boolean typed, boolean fixed, Value keys) {
-        if (fixed & !typed)
-            throw new UnsupportedOperationException("Untyped fixed vector is not supported");
-
-        // Figure out smallest bit width we can store this vector with.
-        int bitWidth = Math.max(WIDTH_8, widthUInBits(length));
-        int prefixElems = 1;
-        if (keys != null) {
-            // If this vector is part of a map, we will pre-fix an offset to the keys
-            // to this vector.
-            bitWidth = Math.max(bitWidth, keys.elemWidth(bb.writePosition(), 0));
-            prefixElems += 2;
-        }
-        int vectorType = FBT_KEY;
-        // Check bit widths and types for all elements.
-        for (int i = start; i < stack.size(); i++) {
-            int elemWidth = stack.get(i).elemWidth(bb.writePosition(), i + prefixElems);
-            bitWidth = Math.max(bitWidth, elemWidth);
-            if (typed) {
-                if (i == start) {
-                    vectorType = stack.get(i).type;
-                    if (!FlexBuffers.isTypedVectorElementType(vectorType)) {
-                        throw new FlexBufferException("TypedVector does not support this element type");
-                    }
-                } else {
-                    // If you get this assert, you are writing a typed vector with
-                    // elements that are not all the same type.
-                    assert (vectorType == stack.get(i).type);
-                }
-            }
-        }
-        // If you get this assert, your fixed types are not one of:
-        // Int / UInt / Float / Key.
-        assert (!fixed || FlexBuffers.isTypedVectorElementType(vectorType));
-
-        int byteWidth = align(bitWidth);
-        // Write vector. First the keys width/offset if available, and size.
-        if (keys != null) {
-            writeOffset(keys.iValue, byteWidth);
-            writeInt(1L << keys.minBitWidth, byteWidth);
-        }
-        if (!fixed) {
-            writeInt(length, byteWidth);
-        }
-        // Then the actual data.
-        int vloc = bb.writePosition();
-        for (int i = start; i < stack.size(); i++) {
-            writeAny(stack.get(i), byteWidth);
-        }
-        // Then the types.
-        if (!typed) {
-            for (int i = start; i < stack.size(); i++) {
-                bb.put(stack.get(i).storedPackedType(bitWidth));
-            }
-        }
-        return new Value(key, keys != null ? FBT_MAP
-                : (typed ? FlexBuffers.toTypedVector(vectorType, fixed ? length : 0)
-                : FBT_VECTOR), bitWidth, vloc);
+    static Value bool(int key, boolean b) {
+      return new Value(key, FBT_BOOL, WIDTH_8, b ? 1 : 0);
     }
 
-    private void writeOffset(long val, int byteWidth) {
-        int reloff = (int) (bb.writePosition() - val);
-        assert (byteWidth == 8 || reloff < 1L << (byteWidth * 8));
-        writeInt(reloff, byteWidth);
+    static Value blob(int key, int position, int type, int bitWidth) {
+      return new Value(key, type, bitWidth, position);
     }
 
-    private void writeAny(final Value val, int byteWidth) {
-        switch (val.type) {
-            case FBT_NULL:
-            case FBT_BOOL:
-            case FBT_INT:
-            case FBT_UINT:
-                writeInt(val.iValue, byteWidth);
-                break;
-            case FBT_FLOAT:
-                writeDouble(val.dValue, byteWidth);
-                break;
-            default:
-                writeOffset(val.iValue, byteWidth);
-                break;
-        }
+    static Value int8(int key, int value) {
+      return new Value(key, FBT_INT, WIDTH_8, value);
     }
 
-    private void writeDouble(double val, int byteWidth) {
-        if (byteWidth == 4) {
-            bb.putFloat((float) val);
-        } else if (byteWidth == 8) {
-            bb.putDouble(val);
-        }
+    static Value int16(int key, int value) {
+      return new Value(key, FBT_INT, WIDTH_16, value);
     }
 
-    /**
-     * Start a new map in the buffer.
-     * @return a reference indicating position of the map in buffer. This
-     * reference must be passed along when the map is finished using endMap()
-     */
-    public int startMap() {
-        return stack.size();
+    static Value int32(int key, int value) {
+      return new Value(key, FBT_INT, WIDTH_32, value);
     }
 
-    /**
-     * Finishes a map, but writing the information in the buffer
-     * @param key   key used to store element in map
-     * @param start reference for beginning of the map. Returned by {@link startMap()}
-     * @return      Reference to the map
-     */
-    public int endMap(String key, int start) {
-        int iKey = putKey(key);
-
-        Collections.sort(stack.subList(start, stack.size()), keyComparator);
-
-        Value keys = createKeyVector(start, stack.size() - start);
-        Value vec = createVector(iKey, start, stack.size() - start, false, false, keys);
-        // Remove temp elements and return map.
-        while (stack.size() > start) {
-            stack.remove(stack.size() - 1);
-        }
-        stack.add(vec);
-        return (int) vec.iValue;
+    static Value int64(int key, long value) {
+      return new Value(key, FBT_INT, WIDTH_64, value);
     }
 
-    private Value createKeyVector(int start, int length) {
-        // Figure out smallest bit width we can store this vector with.
-        int bitWidth = Math.max(WIDTH_8, widthUInBits(length));
-        int prefixElems = 1;
-        // Check bit widths and types for all elements.
-        for (int i = start; i < stack.size(); i++) {
-            int elemWidth = Value.elemWidth(FBT_KEY, WIDTH_8, stack.get(i).key, bb.writePosition(), i + prefixElems);
-            bitWidth = Math.max(bitWidth, elemWidth);
-        }
-
-        int byteWidth = align(bitWidth);
-        // Write vector. First the keys width/offset if available, and size.
-        writeInt(length, byteWidth);
-        // Then the actual data.
-        int vloc = bb.writePosition();
-        for (int i = start; i < stack.size(); i++) {
-            int pos = stack.get(i).key;
-            assert(pos != -1);
-            writeOffset(stack.get(i).key, byteWidth);
-        }
-        // Then the types.
-        return new Value(-1, FlexBuffers.toTypedVector(FBT_KEY,0), bitWidth, vloc);
+    static Value uInt8(int key, int value) {
+      return new Value(key, FBT_UINT, WIDTH_8, value);
     }
 
-    private static class Value {
-        final int type;
-        // for scalars, represents scalar size in bytes
-        // for vectors, represents the size
-        // for string, length
-        final int minBitWidth;
-        // float value
-        final double dValue;
-        // integer value
-        long iValue;
-        // position of the key associated with this value in buffer
-        int key;
-
-        Value(int key, int type, int bitWidth, long iValue) {
-            this.key = key;
-            this.type = type;
-            this.minBitWidth = bitWidth;
-            this.iValue = iValue;
-            this.dValue = Double.MIN_VALUE;
-        }
-
-        Value(int key, int type, int bitWidth, double dValue) {
-            this.key = key;
-            this.type = type;
-            this.minBitWidth = bitWidth;
-            this.dValue = dValue;
-            this.iValue = Long.MIN_VALUE;
-        }
-
-        static Value nullValue(int key) {
-            return new Value(key, FBT_NULL, WIDTH_8, 0);
-        }
-
-        static Value bool(int key, boolean b) {
-            return new Value(key, FBT_BOOL, WIDTH_8, b ? 1 : 0);
-        }
-
-        static Value blob(int key, int position, int type, int bitWidth) {
-            return new Value(key, type, bitWidth, position);
-        }
-
-        static Value int8(int key, int value) {
-            return new Value(key, FBT_INT, WIDTH_8, value);
-        }
-
-        static Value int16(int key, int value) {
-            return new Value(key, FBT_INT, WIDTH_16, value);
-        }
-
-        static Value int32(int key, int value) {
-            return new Value(key, FBT_INT, WIDTH_32, value);
-        }
-
-        static Value int64(int key, long value) {
-            return new Value(key, FBT_INT, WIDTH_64, value);
-        }
-
-        static Value uInt8(int key, int value) {
-            return new Value(key, FBT_UINT, WIDTH_8, value);
-        }
-
-        static Value uInt16(int key, int value) {
-            return new Value(key, FBT_UINT, WIDTH_16, value);
-        }
-
-        static Value uInt32(int key, int value) {
-            return new Value(key, FBT_UINT, WIDTH_32, value);
-        }
-
-        static Value uInt64(int key, long value) {
-            return new Value(key, FBT_UINT, WIDTH_64, value);
-        }
-
-        static Value float32(int key, float value) {
-            return new Value(key, FBT_FLOAT, WIDTH_32, value);
-        }
-
-        static Value float64(int key, double value) {
-            return new Value(key, FBT_FLOAT, WIDTH_64, value);
-        }
-
-        private byte storedPackedType() {
-            return storedPackedType(WIDTH_8);
-        }
-
-        private byte storedPackedType(int parentBitWidth) {
-            return packedType(storedWidth(parentBitWidth), type);
-        }
-
-        private static byte packedType(int bitWidth, int type) {
-            return (byte) (bitWidth | (type << 2));
-        }
-
-        private int storedWidth(int parentBitWidth) {
-            if (FlexBuffers.isTypeInline(type)) {
-                return Math.max(minBitWidth, parentBitWidth);
-            } else {
-                return minBitWidth;
-            }
-        }
-
-        private int elemWidth(int bufSize, int elemIndex) {
-            return elemWidth(type, minBitWidth, iValue, bufSize, elemIndex);
-        }
-
-        private static int elemWidth(int type, int minBitWidth, long iValue, int bufSize, int elemIndex) {
-            if (FlexBuffers.isTypeInline(type)) {
-                return minBitWidth;
-            } else {
-                // We have an absolute offset, but want to store a relative offset
-                // elem_index elements beyond the current buffer end. Since whether
-                // the relative offset fits in a certain byte_width depends on
-                // the size of the elements before it (and their alignment), we have
-                // to test for each size in turn.
-
-                // Original implementation checks for largest scalar
-                // which is long unsigned int
-                for (int byteWidth = 1; byteWidth <= 32; byteWidth *= 2) {
-                    // Where are we going to write this offset?
-                    int offsetLoc = bufSize + paddingBytes(bufSize, byteWidth) + (elemIndex * byteWidth);
-                    // Compute relative offset.
-                    long offset = offsetLoc - iValue;
-                    // Does it fit?
-                    int bitWidth = widthUInBits(offset);
-                    if (((1L) << bitWidth) == byteWidth)
-                        return bitWidth;
-                }
-                assert (false);  // Must match one of the sizes above.
-                return WIDTH_64;
-            }
-        }
-
-        private static int paddingBytes(int bufSize, int scalarSize) {
-            return ((~bufSize) + 1) & (scalarSize - 1);
-        }
+    static Value uInt16(int key, int value) {
+      return new Value(key, FBT_UINT, WIDTH_16, value);
     }
+
+    static Value uInt32(int key, int value) {
+      return new Value(key, FBT_UINT, WIDTH_32, value);
+    }
+
+    static Value uInt64(int key, long value) {
+      return new Value(key, FBT_UINT, WIDTH_64, value);
+    }
+
+    static Value float32(int key, float value) {
+      return new Value(key, FBT_FLOAT, WIDTH_32, value);
+    }
+
+    static Value float64(int key, double value) {
+      return new Value(key, FBT_FLOAT, WIDTH_64, value);
+    }
+
+    private byte storedPackedType() {
+      return storedPackedType(WIDTH_8);
+    }
+
+    private byte storedPackedType(int parentBitWidth) {
+      return packedType(storedWidth(parentBitWidth), type);
+    }
+
+    private static byte packedType(int bitWidth, int type) {
+      return (byte) (bitWidth | (type << 2));
+    }
+
+    private int storedWidth(int parentBitWidth) {
+      if (FlexBuffers.isTypeInline(type)) {
+        return Math.max(minBitWidth, parentBitWidth);
+      } else {
+        return minBitWidth;
+      }
+    }
+
+    private int elemWidth(int bufSize, int elemIndex) {
+      return elemWidth(type, minBitWidth, iValue, bufSize, elemIndex);
+    }
+
+    private static int elemWidth(
+        int type, int minBitWidth, long iValue, int bufSize, int elemIndex) {
+      if (FlexBuffers.isTypeInline(type)) {
+        return minBitWidth;
+      } else {
+        // We have an absolute offset, but want to store a relative offset
+        // elem_index elements beyond the current buffer end. Since whether
+        // the relative offset fits in a certain byte_width depends on
+        // the size of the elements before it (and their alignment), we have
+        // to test for each size in turn.
+
+        // Original implementation checks for largest scalar
+        // which is long unsigned int
+        for (int byteWidth = 1; byteWidth <= 32; byteWidth *= 2) {
+          // Where are we going to write this offset?
+          int offsetLoc = bufSize + paddingBytes(bufSize, byteWidth) + (elemIndex * byteWidth);
+          // Compute relative offset.
+          long offset = offsetLoc - iValue;
+          // Does it fit?
+          int bitWidth = widthUInBits(offset);
+          if (((1L) << bitWidth) == byteWidth) return bitWidth;
+        }
+        assert (false); // Must match one of the sizes above.
+        return WIDTH_64;
+      }
+    }
+
+    private static int paddingBytes(int bufSize, int scalarSize) {
+      return ((~bufSize) + 1) & (scalarSize - 1);
+    }
+  }
 }
 
 /// @}
diff --git a/java/src/main/java/com/google/flatbuffers/FloatVector.java b/java/src/main/java/com/google/flatbuffers/FloatVector.java
index 5c505ba..76a10ae 100644
--- a/java/src/main/java/com/google/flatbuffers/FloatVector.java
+++ b/java/src/main/java/com/google/flatbuffers/FloatVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of float values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of float values. */
 public final class FloatVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public FloatVector __assign(int _vector, ByteBuffer _bb) {
-    __reset(_vector, Constants.SIZEOF_FLOAT, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_FLOAT, _bb);
+    return this;
   }
 
   /**
@@ -43,7 +41,7 @@
    * @param j The index from which the float value will be read.
    * @return the float value at the given index.
    */
-  public float get(int j) { 
+  public float get(int j) {
     return bb.getFloat(__element(j));
   }
 }
diff --git a/java/src/main/java/com/google/flatbuffers/IntVector.java b/java/src/main/java/com/google/flatbuffers/IntVector.java
index 85549f4..4e40056 100644
--- a/java/src/main/java/com/google/flatbuffers/IntVector.java
+++ b/java/src/main/java/com/google/flatbuffers/IntVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of signed or unsigned 32-bit values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of signed or unsigned 32-bit values. */
 public final class IntVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public IntVector __assign(int _vector, ByteBuffer _bb) {
-    __reset(_vector, Constants.SIZEOF_INT, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_INT, _bb);
+    return this;
   }
 
   /**
diff --git a/java/src/main/java/com/google/flatbuffers/LongVector.java b/java/src/main/java/com/google/flatbuffers/LongVector.java
index 0ca5ab8..e56d9f0 100644
--- a/java/src/main/java/com/google/flatbuffers/LongVector.java
+++ b/java/src/main/java/com/google/flatbuffers/LongVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of long values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of long values. */
 public final class LongVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public LongVector __assign(int _vector, ByteBuffer _bb) {
-    __reset(_vector, Constants.SIZEOF_LONG, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_LONG, _bb);
+    return this;
   }
 
   /**
diff --git a/java/src/main/java/com/google/flatbuffers/ReadBuf.java b/java/src/main/java/com/google/flatbuffers/ReadBuf.java
index 751361f..9c77782 100644
--- a/java/src/main/java/com/google/flatbuffers/ReadBuf.java
+++ b/java/src/main/java/com/google/flatbuffers/ReadBuf.java
@@ -1,12 +1,11 @@
 package com.google.flatbuffers;
 
-/**
- *  Represent a chunk of data, where FlexBuffers will read from.
- */
+/** Represent a chunk of data, where FlexBuffers will read from. */
 public interface ReadBuf {
 
   /**
    * Read boolean from data. Booleans as stored as single byte
+   *
    * @param index position of the element in ReadBuf
    * @return boolean element
    */
@@ -14,6 +13,7 @@
 
   /**
    * Read a byte from data.
+   *
    * @param index position of the element in ReadBuf
    * @return a byte
    */
@@ -21,6 +21,7 @@
 
   /**
    * Read a short from data.
+   *
    * @param index position of the element in ReadBuf
    * @return a short
    */
@@ -28,6 +29,7 @@
 
   /**
    * Read a 32-bit int from data.
+   *
    * @param index position of the element in ReadBuf
    * @return an int
    */
@@ -35,6 +37,7 @@
 
   /**
    * Read a 64-bit long from data.
+   *
    * @param index position of the element in ReadBuf
    * @return a long
    */
@@ -42,6 +45,7 @@
 
   /**
    * Read a 32-bit float from data.
+   *
    * @param index position of the element in ReadBuf
    * @return a float
    */
@@ -49,6 +53,7 @@
 
   /**
    * Read a 64-bit float from data.
+   *
    * @param index position of the element in ReadBuf
    * @return a double
    */
@@ -56,6 +61,7 @@
 
   /**
    * Read an UTF-8 string from data.
+   *
    * @param start initial element of the string
    * @param size size of the string in bytes.
    * @return a {@code String}
@@ -63,19 +69,19 @@
   String getString(int start, int size);
 
   /**
-   * Expose ReadBuf as an array of bytes.
-   * This method is meant to be as efficient as possible, so for a array-backed ReadBuf, it should
-   * return its own internal data. In case access to internal data is not possible,
-   * a copy of the data into an array of bytes might occur.
+   * Expose ReadBuf as an array of bytes. This method is meant to be as efficient as possible, so
+   * for a array-backed ReadBuf, it should return its own internal data. In case access to internal
+   * data is not possible, a copy of the data into an array of bytes might occur.
+   *
    * @return ReadBuf as an array of bytes
    */
   byte[] data();
 
   /**
-   * Defines the size of the message in the buffer. It also determines last position that buffer
-   * can be read. Last byte to be accessed is in position {@code limit() -1}.
+   * Defines the size of the message in the buffer. It also determines last position that buffer can
+   * be read. Last byte to be accessed is in position {@code limit() -1}.
+   *
    * @return indicate last position
    */
   int limit();
-
 }
diff --git a/java/src/main/java/com/google/flatbuffers/ReadWriteBuf.java b/java/src/main/java/com/google/flatbuffers/ReadWriteBuf.java
index 6eb43bd..a3d072f 100644
--- a/java/src/main/java/com/google/flatbuffers/ReadWriteBuf.java
+++ b/java/src/main/java/com/google/flatbuffers/ReadWriteBuf.java
@@ -6,137 +6,144 @@
  */
 public interface ReadWriteBuf extends ReadBuf {
 
-    /**
-     * Clears (resets) the buffer so that it can be reused. Write position will be set to the
-     * start.
-     */
-    void clear();
+  /**
+   * Clears (resets) the buffer so that it can be reused. Write position will be set to the start.
+   */
+  void clear();
 
-    /**
-     * Put a boolean into the buffer at {@code writePosition()} . Booleans as stored as single
-     * byte. Write position will be incremented.
-     * @return boolean element
-     */
-    void putBoolean(boolean value);
+  /**
+   * Put a boolean into the buffer at {@code writePosition()} . Booleans as stored as single byte.
+   * Write position will be incremented.
+   *
+   * @return boolean element
+   */
+  void putBoolean(boolean value);
 
-    /**
-     * Put an array of bytes into the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     * @param value the data to be copied
-     * @param start initial position on value to be copied
-     * @param length amount of bytes to be copied
-     */
-    void put (byte[] value, int start, int length);
+  /**
+   * Put an array of bytes into the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   *
+   * @param value the data to be copied
+   * @param start initial position on value to be copied
+   * @param length amount of bytes to be copied
+   */
+  void put(byte[] value, int start, int length);
 
-    /**
-     * Write a byte into the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void put(byte value);
+  /**
+   * Write a byte into the buffer at {@code writePosition()}. Write position will be incremented.
+   */
+  void put(byte value);
 
-    /**
-     * Write a 16-bit into in the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void putShort(short value);
+  /**
+   * Write a 16-bit into in the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   */
+  void putShort(short value);
 
-    /**
-     * Write a 32-bit into in the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void putInt(int value);
+  /**
+   * Write a 32-bit into in the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   */
+  void putInt(int value);
 
-    /**
-     * Write a 64-bit into in the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void putLong(long value);
+  /**
+   * Write a 64-bit into in the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   */
+  void putLong(long value);
 
-    /**
-     * Write a 32-bit float into the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void putFloat(float value);
+  /**
+   * Write a 32-bit float into the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   */
+  void putFloat(float value);
 
-    /**
-     * Write a 64-bit float into the buffer at {@code writePosition()}. Write position will be
-     * incremented.
-     */
-    void putDouble(double value);
+  /**
+   * Write a 64-bit float into the buffer at {@code writePosition()}. Write position will be
+   * incremented.
+   */
+  void putDouble(double value);
 
-    /**
-     * Write boolean into a given position on the buffer. Booleans as stored as single byte.
-     * @param index position of the element in buffer
-     */
-    void setBoolean(int index, boolean value);
+  /**
+   * Write boolean into a given position on the buffer. Booleans as stored as single byte.
+   *
+   * @param index position of the element in buffer
+   */
+  void setBoolean(int index, boolean value);
 
-    /**
-     * Read a byte from data.
-     * @param index position of the element in the buffer
-     * @return a byte
-     */
-    void set(int index, byte value);
+  /**
+   * Read a byte from data.
+   *
+   * @param index position of the element in the buffer
+   * @return a byte
+   */
+  void set(int index, byte value);
 
-    /**
-     * Write an array of bytes into the buffer.
-     * @param index initial position of the buffer to be written
-     * @param value the data to be copied
-     * @param start initial position on value to be copied
-     * @param length amount of bytes to be copied
-     */
-    void set(int index, byte[] value, int start, int length);
+  /**
+   * Write an array of bytes into the buffer.
+   *
+   * @param index initial position of the buffer to be written
+   * @param value the data to be copied
+   * @param start initial position on value to be copied
+   * @param length amount of bytes to be copied
+   */
+  void set(int index, byte[] value, int start, int length);
 
-    /**
-     * Read a short from data.
-     * @param index position of the element in ReadBuf
-     * @return a short
-     */
-    void setShort(int index, short value);
+  /**
+   * Read a short from data.
+   *
+   * @param index position of the element in ReadBuf
+   * @return a short
+   */
+  void setShort(int index, short value);
 
-    /**
-     * Read a 32-bit int from data.
-     * @param index position of the element in ReadBuf
-     * @return an int
-     */
-    void setInt(int index, int value);
+  /**
+   * Read a 32-bit int from data.
+   *
+   * @param index position of the element in ReadBuf
+   * @return an int
+   */
+  void setInt(int index, int value);
 
-    /**
-     * Read a 64-bit long from data.
-     * @param index position of the element in ReadBuf
-     * @return a long
-     */
-    void setLong(int index, long value);
+  /**
+   * Read a 64-bit long from data.
+   *
+   * @param index position of the element in ReadBuf
+   * @return a long
+   */
+  void setLong(int index, long value);
 
-    /**
-     * Read a 32-bit float from data.
-     * @param index position of the element in ReadBuf
-     * @return a float
-     */
-    void setFloat(int index, float value);
+  /**
+   * Read a 32-bit float from data.
+   *
+   * @param index position of the element in ReadBuf
+   * @return a float
+   */
+  void setFloat(int index, float value);
 
-    /**
-     * Read a 64-bit float from data.
-     * @param index position of the element in ReadBuf
-     * @return a double
-     */
-    void setDouble(int index, double value);
+  /**
+   * Read a 64-bit float from data.
+   *
+   * @param index position of the element in ReadBuf
+   * @return a double
+   */
+  void setDouble(int index, double value);
 
+  int writePosition();
 
-    int writePosition();
-    /**
-     * Defines the size of the message in the buffer. It also determines last position that buffer
-     * can be read or write. Last byte to be accessed is in position {@code limit() -1}.
-     * @return indicate last position
-     */
-    int limit();
+  /**
+   * Defines the size of the message in the buffer. It also determines last position that buffer can
+   * be read or write. Last byte to be accessed is in position {@code limit() -1}.
+   *
+   * @return indicate last position
+   */
+  int limit();
 
-    /**
-     * Request capacity of the buffer. In case buffer is already larger
-     * than the requested, this method will just return true. Otherwise
-     * It might try to resize the buffer.
-     *
-     * @return true if buffer is able to offer
-     * the requested capacity
-     */
-    boolean requestCapacity(int capacity);
+  /**
+   * Request capacity of the buffer. In case buffer is already larger than the requested, this
+   * method will just return true. Otherwise It might try to resize the buffer.
+   *
+   * @return true if buffer is able to offer the requested capacity
+   */
+  boolean requestCapacity(int capacity);
 }
diff --git a/java/src/main/java/com/google/flatbuffers/ShortVector.java b/java/src/main/java/com/google/flatbuffers/ShortVector.java
index b02ac3e..2d722f1 100644
--- a/java/src/main/java/com/google/flatbuffers/ShortVector.java
+++ b/java/src/main/java/com/google/flatbuffers/ShortVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of signed or unsigned 16-bit values.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of signed or unsigned 16-bit values. */
 public final class ShortVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -31,10 +28,11 @@
    * @param _vector Start data of a vector.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public ShortVector __assign(int _vector, ByteBuffer _bb) {
-    __reset(_vector, Constants.SIZEOF_SHORT, _bb); return this;
+    __reset(_vector, Constants.SIZEOF_SHORT, _bb);
+    return this;
   }
 
   /**
@@ -48,8 +46,8 @@
   }
 
   /**
-   * Reads the short at the given index, zero-extends it to type int, and returns the result,
-   * which is therefore in the range 0 through 65535.
+   * Reads the short at the given index, zero-extends it to type int, and returns the result, which
+   * is therefore in the range 0 through 65535.
    *
    * @param j The index from which the short value will be read.
    * @return the unsigned 16-bit at the given index.
diff --git a/java/src/main/java/com/google/flatbuffers/StringVector.java b/java/src/main/java/com/google/flatbuffers/StringVector.java
index 6c20775..d51239a 100644
--- a/java/src/main/java/com/google/flatbuffers/StringVector.java
+++ b/java/src/main/java/com/google/flatbuffers/StringVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of String.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of String. */
 public final class StringVector extends BaseVector {
   private Utf8 utf8 = Utf8.getDefault();
 
@@ -34,10 +31,11 @@
    * @param _element_size Size of a vector element.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public StringVector __assign(int _vector, int _element_size, ByteBuffer _bb) {
-    __reset(_vector, _element_size, _bb); return this;
+    __reset(_vector, _element_size, _bb);
+    return this;
   }
 
   /**
diff --git a/java/src/main/java/com/google/flatbuffers/Struct.java b/java/src/main/java/com/google/flatbuffers/Struct.java
index c92164f..f715b0a 100644
--- a/java/src/main/java/com/google/flatbuffers/Struct.java
+++ b/java/src/main/java/com/google/flatbuffers/Struct.java
@@ -20,22 +20,21 @@
 
 /// @cond FLATBUFFERS_INTERNAL
 
-/**
- * All structs in the generated code derive from this class, and add their own accessors.
- */
+/** All structs in the generated code derive from this class, and add their own accessors. */
 public class Struct {
   /** Used to hold the position of the `bb` buffer. */
   protected int bb_pos;
+
   /** The underlying ByteBuffer to hold the data of the Struct. */
   protected ByteBuffer bb;
 
   /**
    * Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
    *
-   * This method exists primarily to allow recycling Table instances without risking memory leaks
+   * <p>This method exists primarily to allow recycling Table instances without risking memory leaks
    * due to {@code ByteBuffer} references.
    */
-  protected void __reset(int _i, ByteBuffer _bb) { 
+  protected void __reset(int _i, ByteBuffer _bb) {
     bb = _bb;
     if (bb != null) {
       bb_pos = _i;
@@ -47,8 +46,8 @@
   /**
    * Resets internal state with a null {@code ByteBuffer} and a zero position.
    *
-   * This method exists primarily to allow recycling Struct instances without risking memory leaks
-   * due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
+   * <p>This method exists primarily to allow recycling Struct instances without risking memory
+   * leaks due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
    * again to a {@code ByteBuffer}.
    *
    * @param struct the instance to reset to initial state
diff --git a/java/src/main/java/com/google/flatbuffers/Table.java b/java/src/main/java/com/google/flatbuffers/Table.java
index 7f41639..5711aae 100644
--- a/java/src/main/java/com/google/flatbuffers/Table.java
+++ b/java/src/main/java/com/google/flatbuffers/Table.java
@@ -17,23 +17,26 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
+
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 
 /// @cond FLATBUFFERS_INTERNAL
 
-/**
- * All tables in the generated code derive from this class, and add their own accessors.
- */
+/** All tables in the generated code derive from this class, and add their own accessors. */
 public class Table {
   /** Used to hold the position of the `bb` buffer. */
   protected int bb_pos;
+
   /** The underlying ByteBuffer to hold the data of the Table. */
   protected ByteBuffer bb;
+
   /** Used to hold the vtable position. */
   private int vtable_start;
+
   /** Used to hold the vtable size. */
   private int vtable_size;
+
   Utf8 utf8 = Utf8.getDefault();
 
   /**
@@ -41,7 +44,9 @@
    *
    * @return Returns the Table's ByteBuffer.
    */
-  public ByteBuffer getByteBuffer() { return bb; }
+  public ByteBuffer getByteBuffer() {
+    return bb;
+  }
 
   /**
    * Look up a field in the vtable.
@@ -82,10 +87,10 @@
   /**
    * Create a Java `String` from UTF-8 data stored inside the FlatBuffer.
    *
-   * This allocates a new string and converts to wide chars upon each access,
-   * which is not very efficient. Instead, each FlatBuffer string also comes with an
-   * accessor based on __vector_as_bytebuffer below, which is much more efficient,
-   * assuming your Java program can handle UTF-8 data directly.
+   * <p>This allocates a new string and converts to wide chars upon each access, which is not very
+   * efficient. Instead, each FlatBuffer string also comes with an accessor based on
+   * __vector_as_bytebuffer below, which is much more efficient, assuming your Java program can
+   * handle UTF-8 data directly.
    *
    * @param offset An `int` index into the Table's ByteBuffer.
    * @return Returns a `String` from the data stored inside the FlatBuffer at `offset`.
@@ -97,10 +102,10 @@
   /**
    * Create a Java `String` from UTF-8 data stored inside the FlatBuffer.
    *
-   * This allocates a new string and converts to wide chars upon each access,
-   * which is not very efficient. Instead, each FlatBuffer string also comes with an
-   * accessor based on __vector_as_bytebuffer below, which is much more efficient,
-   * assuming your Java program can handle UTF-8 data directly.
+   * <p>This allocates a new string and converts to wide chars upon each access, which is not very
+   * efficient. Instead, each FlatBuffer string also comes with an accessor based on
+   * __vector_as_bytebuffer below, which is much more efficient, assuming your Java program can
+   * handle UTF-8 data directly.
    *
    * @param offset An `int` index into the Table's ByteBuffer.
    * @param bb Table ByteBuffer used to read a string at given offset.
@@ -133,15 +138,15 @@
    */
   protected int __vector(int offset) {
     offset += bb_pos;
-    return offset + bb.getInt(offset) + SIZEOF_INT;  // data starts after the length
+    return offset + bb.getInt(offset) + SIZEOF_INT; // data starts after the length
   }
 
   /**
    * Get a whole vector as a ByteBuffer.
    *
-   * This is efficient, since it only allocates a new {@link ByteBuffer} object,
-   * but does not actually copy the data, it still refers to the same bytes
-   * as the original ByteBuffer. Also useful with nested FlatBuffers, etc.
+   * <p>This is efficient, since it only allocates a new {@link ByteBuffer} object, but does not
+   * actually copy the data, it still refers to the same bytes as the original ByteBuffer. Also
+   * useful with nested FlatBuffers, etc.
    *
    * @param vector_offset The position of the vector in the byte buffer
    * @param elem_size The size of each element in the array
@@ -160,8 +165,8 @@
   /**
    * Initialize vector as a ByteBuffer.
    *
-   * This is more efficient than using duplicate, since it doesn't copy the data
-   * nor allocattes a new {@link ByteBuffer}, creating no garbage to be collected.
+   * <p>This is more efficient than using duplicate, since it doesn't copy the data nor allocattes a
+   * new {@link ByteBuffer}, creating no garbage to be collected.
    *
    * @param bb The {@link ByteBuffer} for the array
    * @param vector_offset The position of the vector in the byte buffer
@@ -205,17 +210,16 @@
   /**
    * Check if a {@link ByteBuffer} contains a file identifier.
    *
-   * @param bb A {@code ByteBuffer} to check if it contains the identifier
-   * `ident`.
+   * @param bb A {@code ByteBuffer} to check if it contains the identifier `ident`.
    * @param ident A `String` identifier of the FlatBuffer file.
    * @return True if the buffer contains the file identifier
    */
   protected static boolean __has_identifier(ByteBuffer bb, String ident) {
     if (ident.length() != FILE_IDENTIFIER_LENGTH)
-        throw new AssertionError("FlatBuffers: file identifier must be length " +
-                                 FILE_IDENTIFIER_LENGTH);
+      throw new AssertionError(
+          "FlatBuffers: file identifier must be length " + FILE_IDENTIFIER_LENGTH);
     for (int i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
-      if (ident.charAt(i) != (char)bb.get(bb.position() + SIZEOF_INT + i)) return false;
+      if (ident.charAt(i) != (char) bb.get(bb.position() + SIZEOF_INT + i)) return false;
     }
     return true;
   }
@@ -229,11 +233,13 @@
   protected void sortTables(int[] offsets, final ByteBuffer bb) {
     Integer[] off = new Integer[offsets.length];
     for (int i = 0; i < offsets.length; i++) off[i] = offsets[i];
-    java.util.Arrays.sort(off, new java.util.Comparator<Integer>() {
-      public int compare(Integer o1, Integer o2) {
-        return keysCompare(o1, o2, bb);
-      }
-    });
+    java.util.Arrays.sort(
+        off,
+        new java.util.Comparator<Integer>() {
+          public int compare(Integer o1, Integer o2) {
+            return keysCompare(o1, o2, bb);
+          }
+        });
     for (int i = 0; i < offsets.length; i++) offsets[i] = off[i];
   }
 
@@ -244,7 +250,9 @@
    * @param o2 An 'Integer' index of the second key into the bb.
    * @param bb A {@code ByteBuffer} to get the keys.
    */
-  protected int keysCompare(Integer o1, Integer o2, ByteBuffer bb) { return 0; }
+  protected int keysCompare(Integer o1, Integer o2, ByteBuffer bb) {
+    return 0;
+  }
 
   /**
    * Compare two strings in the buffer.
@@ -261,7 +269,7 @@
     int startPos_1 = offset_1 + SIZEOF_INT;
     int startPos_2 = offset_2 + SIZEOF_INT;
     int len = Math.min(len_1, len_2);
-    for(int i = 0; i < len; i++) {
+    for (int i = 0; i < len; i++) {
       if (bb.get(i + startPos_1) != bb.get(i + startPos_2))
         return bb.get(i + startPos_1) - bb.get(i + startPos_2);
     }
@@ -282,8 +290,7 @@
     int startPos_1 = offset_1 + Constants.SIZEOF_INT;
     int len = Math.min(len_1, len_2);
     for (int i = 0; i < len; i++) {
-      if (bb.get(i + startPos_1) != key[i])
-        return bb.get(i + startPos_1) - key[i];
+      if (bb.get(i + startPos_1) != key[i]) return bb.get(i + startPos_1) - key[i];
     }
     return len_1 - len_2;
   }
@@ -291,10 +298,10 @@
   /**
    * Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
    *
-   * This method exists primarily to allow recycling Table instances without risking memory leaks
+   * <p>This method exists primarily to allow recycling Table instances without risking memory leaks
    * due to {@code ByteBuffer} references.
    */
-  protected void __reset(int _i, ByteBuffer _bb) { 
+  protected void __reset(int _i, ByteBuffer _bb) {
     bb = _bb;
     if (bb != null) {
       bb_pos = _i;
@@ -310,9 +317,9 @@
   /**
    * Resets the internal state with a null {@code ByteBuffer} and a zero position.
    *
-   * This method exists primarily to allow recycling Table instances without risking memory leaks
-   * due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
-   * again to a {@code ByteBuffer}.
+   * <p>This method exists primarily to allow recycling Table instances without risking memory leaks
+   * due to {@code ByteBuffer} references. The instance will be unusable until it is assigned again
+   * to a {@code ByteBuffer}.
    */
   public void __reset() {
     __reset(0, null);
diff --git a/java/src/main/java/com/google/flatbuffers/UnionVector.java b/java/src/main/java/com/google/flatbuffers/UnionVector.java
index 986cfea..3634bb8 100644
--- a/java/src/main/java/com/google/flatbuffers/UnionVector.java
+++ b/java/src/main/java/com/google/flatbuffers/UnionVector.java
@@ -17,13 +17,10 @@
 package com.google.flatbuffers;
 
 import static com.google.flatbuffers.Constants.*;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
 
-/**
- * Helper type for accessing vector of unions.
- */
+import java.nio.ByteBuffer;
+
+/** Helper type for accessing vector of unions. */
 public final class UnionVector extends BaseVector {
   /**
    * Assigns vector access object to vector data.
@@ -32,13 +29,13 @@
    * @param _element_size Size of a vector element.
    * @param _bb Table's ByteBuffer.
    * @return Returns current vector access object assigned to vector data whose offset is stored at
-   *         `vector`.
+   *     `vector`.
    */
   public UnionVector __assign(int _vector, int _element_size, ByteBuffer _bb) {
-    __reset(_vector, _element_size, _bb); return this;
+    __reset(_vector, _element_size, _bb);
+    return this;
   }
 
-
   /**
    * Initialize any Table-derived type to point to the union at the given `index`.
    *
diff --git a/java/src/main/java/com/google/flatbuffers/Utf8.java b/java/src/main/java/com/google/flatbuffers/Utf8.java
index e8af8ad..314ca03 100644
--- a/java/src/main/java/com/google/flatbuffers/Utf8.java
+++ b/java/src/main/java/com/google/flatbuffers/Utf8.java
@@ -16,22 +16,22 @@
 
 package com.google.flatbuffers;
 
-import java.nio.ByteBuffer;
-
 import static java.lang.Character.MAX_SURROGATE;
-import static java.lang.Character.MIN_SURROGATE;
 import static java.lang.Character.MIN_HIGH_SURROGATE;
 import static java.lang.Character.MIN_LOW_SURROGATE;
 import static java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT;
+import static java.lang.Character.MIN_SURROGATE;
 import static java.lang.Character.isSurrogatePair;
 import static java.lang.Character.toCodePoint;
 
+import java.nio.ByteBuffer;
+
 public abstract class Utf8 {
 
   /**
-   * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string,
-   * this method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in
-   * both time and space.
+   * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string, this
+   * method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in both
+   * time and space.
    *
    * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired
    *     surrogates)
@@ -60,6 +60,7 @@
 
   /**
    * Get the default UTF-8 processor.
+   *
    * @return the default processor
    */
   public static Utf8 getDefault() {
@@ -71,6 +72,7 @@
 
   /**
    * Set the default instance of the UTF-8 processor.
+   *
    * @param instance the new instance to use
    */
   public static void setDefault(Utf8 instance) {
@@ -79,6 +81,7 @@
 
   /**
    * Encode a Java's CharSequence UTF8 codepoint into a byte array.
+   *
    * @param in CharSequence to be encoded
    * @param start start position of the first char in the codepoint
    * @param out byte array of 4 bytes to be filled
@@ -94,11 +97,11 @@
     }
 
     char c = in.charAt(start);
-     if (c < 0x80) {
-       // One byte (0xxx xxxx)
-       out[0] = (byte) c;
-       return 1;
-     } else if (c < 0x800) {
+    if (c < 0x80) {
+      // One byte (0xxx xxxx)
+      out[0] = (byte) c;
+      return 1;
+    } else if (c < 0x800) {
       // Two bytes (110x xxxx 10xx xxxx)
       out[0] = (byte) (0xC0 | (c >>> 6));
       out[1] = (byte) (0x80 | (0x3F & c));
@@ -107,7 +110,7 @@
       // Three bytes (1110 xxxx 10xx xxxx 10xx xxxx)
       // Maximum single-char code point is 0xFFFF, 16 bits.
       out[0] = (byte) (0xE0 | (c >>> 12));
-      out[1] =(byte) (0x80 | (0x3F & (c >>> 6)));
+      out[1] = (byte) (0x80 | (0x3F & (c >>> 6)));
       out[2] = (byte) (0x80 | (0x3F & c));
       return 3;
     } else {
@@ -115,7 +118,7 @@
       // Minimum code point represented by a surrogate pair is 0x10000, 17 bits, four UTF-8
       // bytes
       final char low;
-      if (start + 1 == inLength || !isSurrogatePair(c, (low = in.charAt(start+1)))) {
+      if (start + 1 == inLength || !isSurrogatePair(c, (low = in.charAt(start + 1)))) {
         throw new UnpairedSurrogateException(start, inLength);
       }
       int codePoint = toCodePoint(c, low);
@@ -134,23 +137,17 @@
    */
   static class DecodeUtil {
 
-    /**
-     * Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'.
-     */
+    /** Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'. */
     static boolean isOneByte(byte b) {
       return b >= 0;
     }
 
-    /**
-     * Returns whether this is a two-byte codepoint with the form '10XXXXXX'.
-     */
+    /** Returns whether this is a two-byte codepoint with the form '10XXXXXX'. */
     static boolean isTwoBytes(byte b) {
       return b < (byte) 0xE0;
     }
 
-    /**
-     * Returns whether this is a three-byte codepoint with the form '110XXXXX'.
-     */
+    /** Returns whether this is a three-byte codepoint with the form '110XXXXX'. */
     static boolean isThreeBytes(byte b) {
       return b < (byte) 0xF0;
     }
@@ -159,8 +156,7 @@
       resultArr[resultPos] = (char) byte1;
     }
 
-    static void handleTwoBytes(
-        byte byte1, byte byte2, char[] resultArr, int resultPos)
+    static void handleTwoBytes(byte byte1, byte byte2, char[] resultArr, int resultPos)
         throws IllegalArgumentException {
       // Simultaneously checks for illegal trailing-byte in leading position (<= '11000000') and
       // overlong 2-byte, '11000001'.
@@ -177,58 +173,56 @@
         byte byte1, byte byte2, byte byte3, char[] resultArr, int resultPos)
         throws IllegalArgumentException {
       if (isNotTrailingByte(byte2)
-              // overlong? 5 most significant bits must not all be zero
-              || (byte1 == (byte) 0xE0 && byte2 < (byte) 0xA0)
-              // check for illegal surrogate codepoints
-              || (byte1 == (byte) 0xED && byte2 >= (byte) 0xA0)
-              || isNotTrailingByte(byte3)) {
+          // overlong? 5 most significant bits must not all be zero
+          || (byte1 == (byte) 0xE0 && byte2 < (byte) 0xA0)
+          // check for illegal surrogate codepoints
+          || (byte1 == (byte) 0xED && byte2 >= (byte) 0xA0)
+          || isNotTrailingByte(byte3)) {
         throw new IllegalArgumentException("Invalid UTF-8");
       }
-      resultArr[resultPos] = (char)
-                                 (((byte1 & 0x0F) << 12) | (trailingByteValue(byte2) << 6) | trailingByteValue(byte3));
+      resultArr[resultPos] =
+          (char)
+              (((byte1 & 0x0F) << 12) | (trailingByteValue(byte2) << 6) | trailingByteValue(byte3));
     }
 
     static void handleFourBytes(
         byte byte1, byte byte2, byte byte3, byte byte4, char[] resultArr, int resultPos)
-        throws IllegalArgumentException{
+        throws IllegalArgumentException {
       if (isNotTrailingByte(byte2)
-              // Check that 1 <= plane <= 16.  Tricky optimized form of:
-              //   valid 4-byte leading byte?
-              // if (byte1 > (byte) 0xF4 ||
-              //   overlong? 4 most significant bits must not all be zero
-              //     byte1 == (byte) 0xF0 && byte2 < (byte) 0x90 ||
-              //   codepoint larger than the highest code point (U+10FFFF)?
-              //     byte1 == (byte) 0xF4 && byte2 > (byte) 0x8F)
-              || (((byte1 << 28) + (byte2 - (byte) 0x90)) >> 30) != 0
-              || isNotTrailingByte(byte3)
-              || isNotTrailingByte(byte4)) {
+          // Check that 1 <= plane <= 16.  Tricky optimized form of:
+          //   valid 4-byte leading byte?
+          // if (byte1 > (byte) 0xF4 ||
+          //   overlong? 4 most significant bits must not all be zero
+          //     byte1 == (byte) 0xF0 && byte2 < (byte) 0x90 ||
+          //   codepoint larger than the highest code point (U+10FFFF)?
+          //     byte1 == (byte) 0xF4 && byte2 > (byte) 0x8F)
+          || (((byte1 << 28) + (byte2 - (byte) 0x90)) >> 30) != 0
+          || isNotTrailingByte(byte3)
+          || isNotTrailingByte(byte4)) {
         throw new IllegalArgumentException("Invalid UTF-8");
       }
-      int codepoint = ((byte1 & 0x07) << 18)
-                          | (trailingByteValue(byte2) << 12)
-                          | (trailingByteValue(byte3) << 6)
-                          | trailingByteValue(byte4);
+      int codepoint =
+          ((byte1 & 0x07) << 18)
+              | (trailingByteValue(byte2) << 12)
+              | (trailingByteValue(byte3) << 6)
+              | trailingByteValue(byte4);
       resultArr[resultPos] = DecodeUtil.highSurrogate(codepoint);
       resultArr[resultPos + 1] = DecodeUtil.lowSurrogate(codepoint);
     }
 
-    /**
-     * Returns whether the byte is not a valid continuation of the form '10XXXXXX'.
-     */
+    /** Returns whether the byte is not a valid continuation of the form '10XXXXXX'. */
     private static boolean isNotTrailingByte(byte b) {
       return b > (byte) 0xBF;
     }
 
-    /**
-     * Returns the actual value of the trailing byte (removes the prefix '10') for composition.
-     */
+    /** Returns the actual value of the trailing byte (removes the prefix '10') for composition. */
     private static int trailingByteValue(byte b) {
       return b & 0x3F;
     }
 
     private static char highSurrogate(int codePoint) {
-      return (char) ((MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT >>> 10))
-                         + (codePoint >>> 10));
+      return (char)
+          ((MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT >>> 10)) + (codePoint >>> 10));
     }
 
     private static char lowSurrogate(int codePoint) {
@@ -236,7 +230,8 @@
     }
   }
 
-  // These UTF-8 handling methods are copied from Guava's Utf8Unsafe class with a modification to throw
+  // These UTF-8 handling methods are copied from Guava's Utf8Unsafe class with a modification to
+  // throw
   // a protocol buffer local exception. This exception is then caught in CodedOutputStream so it can
   // fallback to more lenient behavior.
   static class UnpairedSurrogateException extends IllegalArgumentException {
diff --git a/java/src/main/java/com/google/flatbuffers/Utf8Old.java b/java/src/main/java/com/google/flatbuffers/Utf8Old.java
index c568105..c99d662 100644
--- a/java/src/main/java/com/google/flatbuffers/Utf8Old.java
+++ b/java/src/main/java/com/google/flatbuffers/Utf8Old.java
@@ -25,8 +25,8 @@
 import java.nio.charset.StandardCharsets;
 
 /**
- * This class implements the Utf8 API using the Java Utf8 encoder. Use
- * Utf8.setDefault(new Utf8Old()); to use it.
+ * This class implements the Utf8 API using the Java Utf8 encoder. Use Utf8.setDefault(new
+ * Utf8Old()); to use it.
  */
 public class Utf8Old extends Utf8 {
 
@@ -64,8 +64,7 @@
     }
     cache.lastOutput.clear();
     cache.lastInput = in;
-    CharBuffer wrap = (in instanceof CharBuffer) ?
-                          (CharBuffer) in : CharBuffer.wrap(in);
+    CharBuffer wrap = (in instanceof CharBuffer) ? (CharBuffer) in : CharBuffer.wrap(in);
     CoderResult result = cache.encoder.encode(wrap, cache.lastOutput, true);
     if (result.isError()) {
       try {
diff --git a/java/src/main/java/com/google/flatbuffers/Utf8Safe.java b/java/src/main/java/com/google/flatbuffers/Utf8Safe.java
index 060379f..bd6dd83 100644
--- a/java/src/main/java/com/google/flatbuffers/Utf8Safe.java
+++ b/java/src/main/java/com/google/flatbuffers/Utf8Safe.java
@@ -1,41 +1,39 @@
 package com.google.flatbuffers;
 
-import java.nio.ByteBuffer;
 import static java.lang.Character.MAX_SURROGATE;
 import static java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT;
 import static java.lang.Character.MIN_SURROGATE;
 import static java.lang.Character.isSurrogatePair;
 import static java.lang.Character.toCodePoint;
 
+import java.nio.ByteBuffer;
+
 /**
- * A set of low-level, high-performance static utility methods related
- * to the UTF-8 character encoding.  This class has no dependencies
- * outside of the core JDK libraries.
+ * A set of low-level, high-performance static utility methods related to the UTF-8 character
+ * encoding. This class has no dependencies outside of the core JDK libraries.
  *
- * <p>There are several variants of UTF-8.  The one implemented by
- * this class is the restricted definition of UTF-8 introduced in
- * Unicode 3.1, which mandates the rejection of "overlong" byte
- * sequences as well as rejection of 3-byte surrogate codepoint byte
- * sequences.  Note that the UTF-8 decoder included in Oracle's JDK
- * has been modified to also reject "overlong" byte sequences, but (as
- * of 2011) still accepts 3-byte surrogate codepoint byte sequences.
+ * <p>There are several variants of UTF-8. The one implemented by this class is the restricted
+ * definition of UTF-8 introduced in Unicode 3.1, which mandates the rejection of "overlong" byte
+ * sequences as well as rejection of 3-byte surrogate codepoint byte sequences. Note that the UTF-8
+ * decoder included in Oracle's JDK has been modified to also reject "overlong" byte sequences, but
+ * (as of 2011) still accepts 3-byte surrogate codepoint byte sequences.
  *
- * <p>The byte sequences considered valid by this class are exactly
- * those that can be roundtrip converted to Strings and back to bytes
- * using the UTF-8 charset, without loss: <pre> {@code
+ * <p>The byte sequences considered valid by this class are exactly those that can be roundtrip
+ * converted to Strings and back to bytes using the UTF-8 charset, without loss:
+ *
+ * <pre>{@code
  * Arrays.equals(bytes, new String(bytes, Internal.UTF_8).getBytes(Internal.UTF_8))
  * }</pre>
  *
- * <p>See the Unicode Standard,</br>
- * Table 3-6. <em>UTF-8 Bit Distribution</em>,</br>
- * Table 3-7. <em>Well Formed UTF-8 Byte Sequences</em>.
+ * <p>See the Unicode Standard,</br> Table 3-6. <em>UTF-8 Bit Distribution</em>,</br> Table 3-7.
+ * <em>Well Formed UTF-8 Byte Sequences</em>.
  */
-final public class Utf8Safe extends Utf8 {
+public final class Utf8Safe extends Utf8 {
 
   /**
-   * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string,
-   * this method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in
-   * both time and space.
+   * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string, this
+   * method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in both
+   * time and space.
    *
    * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired
    *     surrogates)
@@ -55,7 +53,7 @@
     for (; i < utf16Length; i++) {
       char c = sequence.charAt(i);
       if (c < 0x800) {
-        utf8Length += ((0x7f - c) >>> 31);  // branch free!
+        utf8Length += ((0x7f - c) >>> 31); // branch free!
       } else {
         utf8Length += encodedLengthGeneral(sequence, i);
         break;
@@ -64,8 +62,8 @@
 
     if (utf8Length < utf16Length) {
       // Necessary and sufficient condition for overflow because of maximum 3x expansion
-      throw new IllegalArgumentException("UTF-8 length does not fit in int: "
-                                             + (utf8Length + (1L << 32)));
+      throw new IllegalArgumentException(
+          "UTF-8 length does not fit in int: " + (utf8Length + (1L << 32)));
     }
     return utf8Length;
   }
@@ -167,13 +165,11 @@
     return new String(resultArr, 0, resultPos);
   }
 
-  public static String decodeUtf8Buffer(ByteBuffer buffer, int offset,
-                                         int length) {
+  public static String decodeUtf8Buffer(ByteBuffer buffer, int offset, int length) {
     // Bitwise OR combines the sign bits so any negative value fails the check.
     if ((offset | length | buffer.limit() - offset - length) < 0) {
       throw new ArrayIndexOutOfBoundsException(
-          String.format("buffer limit=%d, index=%d, limit=%d", buffer.limit(),
-              offset, length));
+          String.format("buffer limit=%d, index=%d, limit=%d", buffer.limit(), offset, length));
     }
 
     final int limit = offset + length;
@@ -212,8 +208,7 @@
         if (offset >= limit) {
           throw new IllegalArgumentException("Invalid UTF-8");
         }
-        DecodeUtil.handleTwoBytes(
-            byte1, /* byte2 */ buffer.get(offset++), resultArr, resultPos++);
+        DecodeUtil.handleTwoBytes(byte1, /* byte2 */ buffer.get(offset++), resultArr, resultPos++);
       } else if (DecodeUtil.isThreeBytes(byte1)) {
         if (offset >= limit - 1) {
           throw new IllegalArgumentException("Invalid UTF-8");
@@ -263,7 +258,6 @@
     }
   }
 
-
   private static void encodeUtf8Buffer(CharSequence in, ByteBuffer out) {
     final int inLength = in.length();
     int outIx = out.position();
@@ -335,8 +329,7 @@
     }
   }
 
-  private static int encodeUtf8Array(CharSequence in, byte[] out,
-                                     int offset, int length) {
+  private static int encodeUtf8Array(CharSequence in, byte[] out, int offset, int length) {
     int utf16Length = in.length();
     int j = offset;
     int i = 0;
@@ -366,8 +359,7 @@
         // Minimum code point represented by a surrogate pair is 0x10000, 17 bits,
         // four UTF-8 bytes
         final char low;
-        if (i + 1 == in.length()
-                || !Character.isSurrogatePair(c, (low = in.charAt(++i)))) {
+        if (i + 1 == in.length() || !Character.isSurrogatePair(c, (low = in.charAt(++i)))) {
           throw new UnpairedSurrogateException((i - 1), utf16Length);
         }
         int codePoint = Character.toCodePoint(c, low);
@@ -379,8 +371,7 @@
         // If we are surrogates and we're not a surrogate pair, always throw an
         // UnpairedSurrogateException instead of an ArrayOutOfBoundsException.
         if ((Character.MIN_SURROGATE <= c && c <= Character.MAX_SURROGATE)
-                && (i + 1 == in.length()
-                        || !Character.isSurrogatePair(c, in.charAt(i + 1)))) {
+            && (i + 1 == in.length() || !Character.isSurrogatePair(c, in.charAt(i + 1)))) {
           throw new UnpairedSurrogateException(i, utf16Length);
         }
         throw new ArrayIndexOutOfBoundsException("Failed writing " + c + " at index " + j);
@@ -402,8 +393,7 @@
   public void encodeUtf8(CharSequence in, ByteBuffer out) {
     if (out.hasArray()) {
       int start = out.arrayOffset();
-      int end = encodeUtf8Array(in, out.array(), start + out.position(),
-          out.remaining());
+      int end = encodeUtf8Array(in, out.array(), start + out.position(), out.remaining());
       out.position(end - start);
     } else {
       encodeUtf8Buffer(in, out);
diff --git a/java/src/test/java/JavaTest.java b/java/src/test/java/JavaTest.java
index c392e04..4e12db8 100644
--- a/java/src/test/java/JavaTest.java
+++ b/java/src/test/java/JavaTest.java
@@ -1,28 +1,23 @@
-
-import static com.google.flatbuffers.Constants.*;
 import static com.google.common.truth.Truth.assertThat;
+import static com.google.flatbuffers.Constants.*;
 
 import DictionaryLookup.*;
 import MyGame.Example.*;
-import com.google.common.io.ByteStreams;
-import optional_scalars.ScalarStuff;
-import optional_scalars.OptionalByte;
 import NamespaceA.*;
 import NamespaceA.NamespaceB.*;
+import com.google.common.io.ByteStreams;
+import com.google.flatbuffers.ArrayReadWriteBuf;
 import com.google.flatbuffers.ByteBufferUtil;
 import com.google.flatbuffers.ByteVector;
 import com.google.flatbuffers.FlatBufferBuilder;
 import com.google.flatbuffers.FlexBuffers;
+import com.google.flatbuffers.FlexBuffers.FlexBufferException;
+import com.google.flatbuffers.FlexBuffers.KeyVector;
+import com.google.flatbuffers.FlexBuffers.Reference;
+import com.google.flatbuffers.FlexBuffers.Vector;
 import com.google.flatbuffers.FlexBuffersBuilder;
 import com.google.flatbuffers.StringVector;
 import com.google.flatbuffers.UnionVector;
-
-import com.google.flatbuffers.FlexBuffers.FlexBufferException;
-import com.google.flatbuffers.FlexBuffers.Reference;
-import com.google.flatbuffers.FlexBuffers.Vector;
-import com.google.flatbuffers.ArrayReadWriteBuf;
-import com.google.flatbuffers.FlexBuffers.KeyVector;
-
 import java.io.*;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
@@ -31,12 +26,13 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
+import optional_scalars.OptionalByte;
+import optional_scalars.ScalarStuff;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
-
 /*
  * Copyright 2014 Google Inc. All rights reserved.
  *
@@ -56,1478 +52,1514 @@
 @RunWith(JUnit4.class)
 public class JavaTest {
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
+  @Rule public TemporaryFolder tempFolder = new TemporaryFolder();
 
-    @org.junit.Test
-    public void mainTest() throws IOException {
-      // First, let's test reading a FlatBuffer generated by C++ code:
-      // This file was generated from monsterdata_test.json
-      byte[] data = ByteStreams.toByteArray(
-        JavaTest.class.getClassLoader().getResourceAsStream("monsterdata_test.mon"));
+  @org.junit.Test
+  public void mainTest() throws IOException {
+    // First, let's test reading a FlatBuffer generated by C++ code:
+    // This file was generated from monsterdata_test.json
+    byte[] data =
+        ByteStreams.toByteArray(
+            JavaTest.class.getClassLoader().getResourceAsStream("monsterdata_test.mon"));
 
-      // Now test it:
-      ByteBuffer bb = ByteBuffer.wrap(data);
-      TestBuffer(bb);
-      TestPackUnpack(bb);
+    // Now test it:
+    ByteBuffer bb = ByteBuffer.wrap(data);
+    TestBuffer(bb);
+    TestPackUnpack(bb);
+  }
+
+  @org.junit.Test
+  public void testFlatBufferBuilder() {
+    // We use an initial size of 1 to exercise the reallocation algorithm,
+    // normally a size larger than the typical FlatBuffer you generate would be
+    // better for performance.
+    FlatBufferBuilder fbb = new FlatBufferBuilder(1);
+    TestBuilderBasics(fbb, true);
+    TestBuilderBasics(fbb, false);
+    TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer());
+  }
+
+  @org.junit.Test
+  public void TestEnums() {
+    assertThat(Color.name(Color.Red)).isEqualTo("Red");
+    assertThat(Color.name(Color.Blue)).isEqualTo("Blue");
+    assertThat(Any.name(Any.NONE)).isEqualTo("NONE");
+    assertThat(Any.name(Any.Monster)).isEqualTo("Monster");
+  }
+
+  static void TestBuffer(ByteBuffer bb) {
+    assertThat(Monster.MonsterBufferHasIdentifier(bb)).isEqualTo(true);
+
+    Monster monster = Monster.getRootAsMonster(bb);
+
+    assertThat(monster.hp()).isEqualTo((short) 80);
+    // default
+    assertThat(monster.mana()).isEqualTo((short) 150);
+
+    assertThat(monster.name()).isEqualTo("MyMonster");
+    // monster.friendly() // can't access, deprecated
+
+    Vec3 pos = monster.pos();
+    assertThat(pos.x()).isEqualTo(1.0f);
+    assertThat(pos.y()).isEqualTo(2.0f);
+    assertThat(pos.z()).isEqualTo(3.0f);
+    assertThat(pos.test1()).isEqualTo(3.0);
+    // issue: int != byte
+    assertThat(pos.test2()).isEqualTo((int) Color.Green);
+    Test t = pos.test3();
+    assertThat(t.a()).isEqualTo((short) 5);
+    assertThat(t.b()).isEqualTo((byte) 6);
+
+    assertThat(monster.testType()).isEqualTo((byte) Any.Monster);
+    Monster monster2 = new Monster();
+    assertThat(monster.test(monster2) != null).isTrue();
+    assertThat(monster2.name()).isEqualTo("Fred");
+
+    assertThat(monster.inventoryLength()).isEqualTo(5);
+    int invsum = 0;
+    for (int i = 0; i < monster.inventoryLength(); i++) invsum += monster.inventory(i);
+    assertThat(invsum).isEqualTo(10);
+
+    // Method using a vector access object:
+    ByteVector inventoryVector = monster.inventoryVector();
+    assertThat(inventoryVector.length()).isEqualTo(5);
+    invsum = 0;
+    for (int i = 0; i < inventoryVector.length(); i++) invsum += inventoryVector.getAsUnsigned(i);
+    assertThat(invsum).isEqualTo(10);
+
+    // Alternative way of accessing a vector:
+    ByteBuffer ibb = monster.inventoryAsByteBuffer();
+    invsum = 0;
+    while (ibb.position() < ibb.limit()) invsum += ibb.get();
+    assertThat(invsum).isEqualTo(10);
+
+    Test test_0 = monster.test4(0);
+    Test test_1 = monster.test4(1);
+    assertThat(monster.test4Length()).isEqualTo(2);
+    assertThat(test_0.a() + test_0.b() + test_1.a() + test_1.b()).isEqualTo((Integer) 100);
+
+    Test.Vector test4Vector = monster.test4Vector();
+    test_0 = test4Vector.get(0);
+    test_1 = test4Vector.get(1);
+    assertThat(test4Vector.length()).isEqualTo(2);
+    assertThat(test_0.a() + test_0.b() + test_1.a() + test_1.b()).isEqualTo((Integer) 100);
+
+    assertThat(monster.testarrayofstringLength()).isEqualTo(2);
+    assertThat(monster.testarrayofstring(0)).isEqualTo("test1");
+    assertThat(monster.testarrayofstring(1)).isEqualTo("test2");
+
+    // Method using a vector access object:
+    StringVector testarrayofstringVector = monster.testarrayofstringVector();
+    assertThat(testarrayofstringVector.length()).isEqualTo(2);
+    assertThat(testarrayofstringVector.get(0)).isEqualTo("test1");
+    assertThat(testarrayofstringVector.get(1)).isEqualTo("test2");
+
+    assertThat(monster.testbool()).isEqualTo(true);
+  }
+
+  // this method checks additional fields not present in the binary buffer read from file
+  // these new tests are performed on top of the regular tests
+  static void TestExtendedBuffer(ByteBuffer bb) {
+    TestBuffer(bb);
+
+    Monster monster = Monster.getRootAsMonster(bb);
+
+    assertThat(monster.testhashu32Fnv1()).isEqualTo((Integer.MAX_VALUE + 1L));
+  }
+
+  @org.junit.Test
+  public void TestNamespaceNesting() {
+    // reference / manipulate these to verify compilation
+    FlatBufferBuilder fbb = new FlatBufferBuilder(1);
+
+    TableInNestedNS.startTableInNestedNS(fbb);
+    TableInNestedNS.addFoo(fbb, 1234);
+    int nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb);
+
+    TableInFirstNS.startTableInFirstNS(fbb);
+    TableInFirstNS.addFooTable(fbb, nestedTableOff);
+    int off = TableInFirstNS.endTableInFirstNS(fbb);
+  }
+
+  @org.junit.Test
+  public void TestNestedFlatBuffer() {
+    final String nestedMonsterName = "NestedMonsterName";
+    final short nestedMonsterHp = 600;
+    final short nestedMonsterMana = 1024;
+
+    FlatBufferBuilder fbb1 = new FlatBufferBuilder(16);
+    int str1 = fbb1.createString(nestedMonsterName);
+    Monster.startMonster(fbb1);
+    Monster.addName(fbb1, str1);
+    Monster.addHp(fbb1, nestedMonsterHp);
+    Monster.addMana(fbb1, nestedMonsterMana);
+    int monster1 = Monster.endMonster(fbb1);
+    Monster.finishMonsterBuffer(fbb1, monster1);
+    byte[] fbb1Bytes = fbb1.sizedByteArray();
+    fbb1 = null;
+
+    FlatBufferBuilder fbb2 = new FlatBufferBuilder(16);
+    int str2 = fbb2.createString("My Monster");
+    int nestedBuffer = Monster.createTestnestedflatbufferVector(fbb2, fbb1Bytes);
+    Monster.startMonster(fbb2);
+    Monster.addName(fbb2, str2);
+    Monster.addHp(fbb2, (short) 50);
+    Monster.addMana(fbb2, (short) 32);
+    Monster.addTestnestedflatbuffer(fbb2, nestedBuffer);
+    int monster = Monster.endMonster(fbb2);
+    Monster.finishMonsterBuffer(fbb2, monster);
+
+    // Now test the data extracted from the nested buffer
+    Monster mons = Monster.getRootAsMonster(fbb2.dataBuffer());
+    Monster nestedMonster = mons.testnestedflatbufferAsMonster();
+
+    assertThat(nestedMonsterMana).isEqualTo(nestedMonster.mana());
+    assertThat(nestedMonsterHp).isEqualTo(nestedMonster.hp());
+    assertThat(nestedMonsterName).isEqualTo(nestedMonster.name());
+  }
+
+  @org.junit.Test
+  public void TestCreateByteVector() {
+    FlatBufferBuilder fbb = new FlatBufferBuilder(16);
+    int str = fbb.createString("MyMonster");
+    byte[] inventory = new byte[] {0, 1, 2, 3, 4};
+    int vec = fbb.createByteVector(inventory);
+    Monster.startMonster(fbb);
+    Monster.addInventory(fbb, vec);
+    Monster.addName(fbb, str);
+    int monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat((Integer) monsterObject.inventory(1)).isEqualTo((int) inventory[1]);
+    assertThat(monsterObject.inventoryLength()).isEqualTo(inventory.length);
+    ByteVector inventoryVector = monsterObject.inventoryVector();
+    assertThat(inventoryVector.getAsUnsigned(1)).isEqualTo((int) inventory[1]);
+    assertThat(inventoryVector.length()).isEqualTo(inventory.length);
+
+    assertThat(ByteBuffer.wrap(inventory)).isEqualTo(monsterObject.inventoryAsByteBuffer());
+  }
+
+  @org.junit.Test
+  public void TestCreateUninitializedVector() {
+    FlatBufferBuilder fbb = new FlatBufferBuilder(16);
+    int str = fbb.createString("MyMonster");
+    byte[] inventory = new byte[] {0, 1, 2, 3, 4};
+    ByteBuffer bb = fbb.createUnintializedVector(1, inventory.length, 1);
+    for (byte i : inventory) {
+      bb.put(i);
     }
+    int vec = fbb.endVector();
+    Monster.startMonster(fbb);
+    Monster.addInventory(fbb, vec);
+    Monster.addName(fbb, str);
+    int monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
 
-    @org.junit.Test
-    public void testFlatBufferBuilder() {
-      // We use an initial size of 1 to exercise the reallocation algorithm,
-      // normally a size larger than the typical FlatBuffer you generate would be
-      // better for performance.
-      FlatBufferBuilder fbb = new FlatBufferBuilder(1);
-      TestBuilderBasics(fbb, true);
-      TestBuilderBasics(fbb, false);
-      TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer());
-    }
+    assertThat((Integer) monsterObject.inventory(1)).isEqualTo((int) inventory[1]);
+    assertThat(monsterObject.inventoryLength()).isEqualTo(inventory.length);
+    ByteVector inventoryVector = monsterObject.inventoryVector();
+    assertThat(inventoryVector.getAsUnsigned(1)).isEqualTo((int) inventory[1]);
+    assertThat(inventoryVector.length()).isEqualTo(inventory.length);
+    assertThat(ByteBuffer.wrap(inventory)).isEqualTo(monsterObject.inventoryAsByteBuffer());
+  }
 
-    @org.junit.Test
-    public void TestEnums() {
-      assertThat(Color.name(Color.Red)).isEqualTo("Red");
-      assertThat(Color.name(Color.Blue)).isEqualTo("Blue");
-      assertThat(Any.name(Any.NONE)).isEqualTo("NONE");
-      assertThat(Any.name(Any.Monster)).isEqualTo("Monster");
-    }
-
-    static void TestBuffer(ByteBuffer bb) {
-      assertThat(Monster.MonsterBufferHasIdentifier(bb)).isEqualTo(true);
-
-      Monster monster = Monster.getRootAsMonster(bb);
-
-      assertThat(monster.hp()).isEqualTo((short) 80);
-      // default
-      assertThat(monster.mana()).isEqualTo((short) 150);
-
-      assertThat(monster.name()).isEqualTo("MyMonster");
-      // monster.friendly() // can't access, deprecated
-
-        Vec3 pos = monster.pos();
-      assertThat(pos.x()).isEqualTo(1.0f);
-      assertThat(pos.y()).isEqualTo(2.0f);
-      assertThat(pos.z()).isEqualTo(3.0f);
-      assertThat(pos.test1()).isEqualTo(3.0);
-      // issue: int != byte
-      assertThat(pos.test2()).isEqualTo((int) Color.Green);
-      Test t = pos.test3();
-      assertThat(t.a()).isEqualTo((short) 5);
-      assertThat(t.b()).isEqualTo((byte) 6);
-
-      assertThat(monster.testType()).isEqualTo((byte) Any.Monster);
-      Monster monster2 = new Monster();
-      assertThat(monster.test(monster2) != null).isTrue();
-      assertThat(monster2.name()).isEqualTo("Fred");
-
-      assertThat(monster.inventoryLength()).isEqualTo(5);
-      int invsum = 0;
-        for (int i = 0; i < monster.inventoryLength(); i++)
-            invsum += monster.inventory(i);
-      assertThat(invsum).isEqualTo(10);
-
-      // Method using a vector access object:
-        ByteVector inventoryVector = monster.inventoryVector();
-      assertThat(inventoryVector.length()).isEqualTo(5);
-      invsum = 0;
-        for (int i = 0; i < inventoryVector.length(); i++)
-            invsum += inventoryVector.getAsUnsigned(i);
-      assertThat(invsum).isEqualTo(10);
-
-      // Alternative way of accessing a vector:
-        ByteBuffer ibb = monster.inventoryAsByteBuffer();
-        invsum = 0;
-        while (ibb.position() < ibb.limit())
-            invsum += ibb.get();
-      assertThat(invsum).isEqualTo(10);
-
-      Test test_0 = monster.test4(0);
-        Test test_1 = monster.test4(1);
-      assertThat(monster.test4Length()).isEqualTo(2);
-      assertThat(test_0.a() + test_0.b() + test_1.a() + test_1.b()).isEqualTo((Integer) 100);
-
-      Test.Vector test4Vector = monster.test4Vector();
-        test_0 = test4Vector.get(0);
-        test_1 = test4Vector.get(1);
-      assertThat(test4Vector.length()).isEqualTo(2);
-      assertThat(test_0.a() + test_0.b() + test_1.a() + test_1.b()).isEqualTo((Integer) 100);
-
-      assertThat(monster.testarrayofstringLength()).isEqualTo(2);
-      assertThat(monster.testarrayofstring(0)).isEqualTo("test1");
-      assertThat(monster.testarrayofstring(1)).isEqualTo("test2");
-
-      // Method using a vector access object:
-        StringVector testarrayofstringVector = monster.testarrayofstringVector();
-      assertThat(testarrayofstringVector.length()).isEqualTo(2);
-      assertThat(testarrayofstringVector.get(0)).isEqualTo("test1");
-      assertThat(testarrayofstringVector.get(1)).isEqualTo("test2");
-
-      assertThat(monster.testbool()).isEqualTo(true);
-    }
-
-    // this method checks additional fields not present in the binary buffer read from file
-    // these new tests are performed on top of the regular tests
-    static void TestExtendedBuffer(ByteBuffer bb) {
-        TestBuffer(bb);
-
-        Monster monster = Monster.getRootAsMonster(bb);
-
-      assertThat(monster.testhashu32Fnv1()).isEqualTo((Integer.MAX_VALUE + 1L));
-    }
-
-
-    @org.junit.Test public void TestNamespaceNesting() {
-        // reference / manipulate these to verify compilation
-        FlatBufferBuilder fbb = new FlatBufferBuilder(1);
-
-        TableInNestedNS.startTableInNestedNS(fbb);
-        TableInNestedNS.addFoo(fbb, 1234);
-        int nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb);
-
-        TableInFirstNS.startTableInFirstNS(fbb);
-        TableInFirstNS.addFooTable(fbb, nestedTableOff);
-        int off = TableInFirstNS.endTableInFirstNS(fbb);
-    }
-
-    @org.junit.Test public void TestNestedFlatBuffer() {
-        final String nestedMonsterName = "NestedMonsterName";
-        final short nestedMonsterHp = 600;
-        final short nestedMonsterMana = 1024;
-
-        FlatBufferBuilder fbb1 = new FlatBufferBuilder(16);
-        int str1 = fbb1.createString(nestedMonsterName);
-        Monster.startMonster(fbb1);
-        Monster.addName(fbb1, str1);
-        Monster.addHp(fbb1, nestedMonsterHp);
-        Monster.addMana(fbb1, nestedMonsterMana);
-        int monster1 = Monster.endMonster(fbb1);
-        Monster.finishMonsterBuffer(fbb1, monster1);
-        byte[] fbb1Bytes = fbb1.sizedByteArray();
-        fbb1 = null;
-
-        FlatBufferBuilder fbb2 = new FlatBufferBuilder(16);
-        int str2 = fbb2.createString("My Monster");
-        int nestedBuffer = Monster.createTestnestedflatbufferVector(fbb2, fbb1Bytes);
-        Monster.startMonster(fbb2);
-        Monster.addName(fbb2, str2);
-        Monster.addHp(fbb2, (short)50);
-        Monster.addMana(fbb2, (short)32);
-        Monster.addTestnestedflatbuffer(fbb2, nestedBuffer);
-        int monster = Monster.endMonster(fbb2);
-        Monster.finishMonsterBuffer(fbb2, monster);
-
-        // Now test the data extracted from the nested buffer
-        Monster mons = Monster.getRootAsMonster(fbb2.dataBuffer());
-        Monster nestedMonster = mons.testnestedflatbufferAsMonster();
-
-      assertThat(nestedMonsterMana).isEqualTo(nestedMonster.mana());
-      assertThat(nestedMonsterHp).isEqualTo(nestedMonster.hp());
-      assertThat(nestedMonsterName).isEqualTo(nestedMonster.name());
-    }
-
-    @org.junit.Test public void TestCreateByteVector() {
-        FlatBufferBuilder fbb = new FlatBufferBuilder(16);
-        int str = fbb.createString("MyMonster");
-        byte[] inventory = new byte[] { 0, 1, 2, 3, 4 };
-        int vec = fbb.createByteVector(inventory);
-        Monster.startMonster(fbb);
-        Monster.addInventory(fbb, vec);
-        Monster.addName(fbb, str);
-        int monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
-
-      assertThat((Integer) monsterObject.inventory(1)).isEqualTo((int)inventory[1]);
-      assertThat(monsterObject.inventoryLength()).isEqualTo(inventory.length);
-      ByteVector inventoryVector = monsterObject.inventoryVector();
-      assertThat(inventoryVector.getAsUnsigned(1)).isEqualTo((int)inventory[1]);
-      assertThat(inventoryVector.length()).isEqualTo(inventory.length);
-
-      assertThat(ByteBuffer.wrap(inventory)).isEqualTo(
-        monsterObject.inventoryAsByteBuffer());
-    }
-
-    @org.junit.Test public void TestCreateUninitializedVector() {
-        FlatBufferBuilder fbb = new FlatBufferBuilder(16);
-        int str = fbb.createString("MyMonster");
-        byte[] inventory = new byte[] { 0, 1, 2, 3, 4 };
-        ByteBuffer bb = fbb.createUnintializedVector(1, inventory.length, 1);
-        for (byte i:inventory) {
-            bb.put(i);
-        }
-        int vec = fbb.endVector();
-        Monster.startMonster(fbb);
-        Monster.addInventory(fbb, vec);
-        Monster.addName(fbb, str);
-        int monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
-
-      assertThat((Integer) monsterObject.inventory(1)).isEqualTo((int)inventory[1]);
-      assertThat(monsterObject.inventoryLength()).isEqualTo(inventory.length);
-      ByteVector inventoryVector = monsterObject.inventoryVector();
-      assertThat(inventoryVector.getAsUnsigned(1)).isEqualTo((int)inventory[1]);
-      assertThat(inventoryVector.length()).isEqualTo(inventory.length);
-      assertThat(ByteBuffer.wrap(inventory)).isEqualTo(
-        monsterObject.inventoryAsByteBuffer());
-    }
-
-    @org.junit.Test public void TestByteBufferFactory() throws IOException {
-      File file = tempFolder.newFile("javatest.bin");
-        final class MappedByteBufferFactory extends FlatBufferBuilder.ByteBufferFactory {
-            @Override
-            public ByteBuffer newByteBuffer(int capacity) {
-                ByteBuffer bb;
-                try {
-                    RandomAccessFile f = new RandomAccessFile(file, "rw");
-                    bb =  f.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, capacity).order(ByteOrder.LITTLE_ENDIAN);
-                    f.close();
-                } catch(Throwable e) {
-                    System.out.println("FlatBuffers test: couldn't map ByteBuffer to a file");
-                    bb = null;
-                }
-                return bb;
-            }
-        }
-
-        FlatBufferBuilder fbb = new FlatBufferBuilder(1, new MappedByteBufferFactory());
-
-        TestBuilderBasics(fbb, false);
-    }
-
-    @org.junit.Test public void TestSizedInputStream() {
-        // Test on default FlatBufferBuilder that uses HeapByteBuffer
-        FlatBufferBuilder fbb = new FlatBufferBuilder(1);
-
-        TestBuilderBasics(fbb, false);
-
-        InputStream in = fbb.sizedInputStream();
-        byte[] array = fbb.sizedByteArray();
-        int count = 0;
-        int currentVal = 0;
-
-        while (currentVal != -1 && count < array.length) {
-            try {
-                currentVal = in.read();
-            } catch(java.io.IOException e) {
-                System.out.println("FlatBuffers test: couldn't read from InputStream");
-                return;
-            }
-          assertThat((byte)currentVal).isEqualTo(array[count]);
-          count++;
-        }
-      assertThat(count).isEqualTo(array.length);
-    }
-
-    void TestBuilderBasics(FlatBufferBuilder fbb, boolean sizePrefix) {
-        int[] names = {fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma")};
-        int[] off = new int[3];
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, names[0]);
-        off[0] = Monster.endMonster(fbb);
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, names[1]);
-        off[1] = Monster.endMonster(fbb);
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, names[2]);
-        off[2] = Monster.endMonster(fbb);
-        int sortMons = fbb.createSortedVectorOfTables(new Monster(), off);
-
-        // We set up the same values as monsterdata.json:
-
-        int str = fbb.createString("MyMonster");
-
-        int inv = Monster.createInventoryVector(fbb, new byte[] { 0, 1, 2, 3, 4 });
-
-        int fred = fbb.createString("Fred");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, fred);
-        int mon2 = Monster.endMonster(fbb);
-
-        Monster.startTest4Vector(fbb, 2);
-        Test.createTest(fbb, (short)10, (byte)20);
-        Test.createTest(fbb, (short)30, (byte)40);
-        int test4 = fbb.endVector();
-
-        int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] {
-                fbb.createString("test1"),
-                fbb.createString("test2")
-        });
-
-        Monster.startMonster(fbb);
-        Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0,
-                Color.Green, (short)5, (byte)6));
-        Monster.addHp(fbb, (short)80);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, inv);
-        Monster.addTestType(fbb, (byte)Any.Monster);
-        Monster.addTest(fbb, mon2);
-        Monster.addTest4(fbb, test4);
-        Monster.addTestarrayofstring(fbb, testArrayOfString);
-        Monster.addTestbool(fbb, true);
-        Monster.addTesthashu32Fnv1(fbb, Integer.MAX_VALUE + 1L);
-        Monster.addTestarrayoftables(fbb, sortMons);
-        int mon = Monster.endMonster(fbb);
-
-        if (sizePrefix) {
-            Monster.finishSizePrefixedMonsterBuffer(fbb, mon);
-        } else {
-            Monster.finishMonsterBuffer(fbb, mon);
-        }
-
-        // Write the result to a file for debugging purposes:
-        // Note that the binaries are not necessarily identical, since the JSON
-        // parser may serialize in a slightly different order than the above
-        // Java code. They are functionally equivalent though.
-
+  @org.junit.Test
+  public void TestByteBufferFactory() throws IOException {
+    File file = tempFolder.newFile("javatest.bin");
+    final class MappedByteBufferFactory extends FlatBufferBuilder.ByteBufferFactory {
+      @Override
+      public ByteBuffer newByteBuffer(int capacity) {
+        ByteBuffer bb;
         try {
-            String filename = "monsterdata_java_wire" + (sizePrefix ? "_sp" : "") + ".mon";
-            FileChannel fc = new FileOutputStream(tempFolder.newFile(filename)).getChannel();
-            fc.write(fbb.dataBuffer().duplicate());
-            fc.close();
-        } catch(java.io.IOException e) {
-            System.out.println("FlatBuffers test: couldn't write file");
-            return;
+          RandomAccessFile f = new RandomAccessFile(file, "rw");
+          bb =
+              f.getChannel()
+                  .map(FileChannel.MapMode.READ_WRITE, 0, capacity)
+                  .order(ByteOrder.LITTLE_ENDIAN);
+          f.close();
+        } catch (Throwable e) {
+          System.out.println("FlatBuffers test: couldn't map ByteBuffer to a file");
+          bb = null;
         }
-
-        // Test it:
-        ByteBuffer dataBuffer = fbb.dataBuffer();
-        if (sizePrefix) {
-          assertThat(ByteBufferUtil.getSizePrefix(dataBuffer) + SIZE_PREFIX_LENGTH).isEqualTo(
-            dataBuffer.remaining());
-          dataBuffer = ByteBufferUtil.removeSizePrefix(dataBuffer);
-        }
-        TestExtendedBuffer(dataBuffer);
-
-        // Make sure it also works with read only ByteBuffers. This is slower,
-        // since creating strings incurs an additional copy
-        // (see Table.__string).
-        TestExtendedBuffer(dataBuffer.asReadOnlyBuffer());
-
-        //Attempt to mutate Monster fields and check whether the buffer has been mutated properly
-        // revert to original values after testing
-        Monster monster = Monster.getRootAsMonster(dataBuffer);
-
-        // mana is optional and does not exist in the buffer so the mutation should fail
-        // the mana field should retain its default value
-      assertThat(monster.mutateMana((short)10)).isFalse();
-      assertThat(monster.mana()).isEqualTo((short) 150);
-
-      // Accessing a vector of sorted by the key tables
-      assertThat(monster.testarrayoftables(0).name()).isEqualTo("Barney");
-      assertThat(monster.testarrayoftables(1).name()).isEqualTo("Frodo");
-      assertThat(monster.testarrayoftables(2).name()).isEqualTo("Wilma");
-      Monster.Vector testarrayoftablesVector = monster.testarrayoftablesVector();
-      assertThat(testarrayoftablesVector.get(0).name()).isEqualTo("Barney");
-      assertThat(testarrayoftablesVector.get(1).name()).isEqualTo("Frodo");
-      assertThat(testarrayoftablesVector.get(2).name()).isEqualTo("Wilma");
-
-      // Example of searching for a table by the key
-      assertThat(monster.testarrayoftablesByKey("Frodo").name()).isEqualTo("Frodo");
-      assertThat(monster.testarrayoftablesByKey("Barney").name()).isEqualTo("Barney");
-      assertThat(monster.testarrayoftablesByKey("Wilma").name()).isEqualTo("Wilma");
-      assertThat(testarrayoftablesVector.getByKey("Frodo").name()).isEqualTo("Frodo");
-      assertThat(testarrayoftablesVector.getByKey("Barney").name()).isEqualTo("Barney");
-      assertThat(testarrayoftablesVector.getByKey("Wilma").name()).isEqualTo("Wilma");
-
-      // testType is an existing field and mutating it should succeed
-      assertThat(monster.testType()).isEqualTo((byte) Any.Monster);
-
-      //mutate the inventory vector
-      assertThat(monster.mutateInventory(0, 1)).isTrue();
-      assertThat(monster.mutateInventory(1, 2)).isTrue();
-      assertThat(monster.mutateInventory(2, 3)).isTrue();
-      assertThat(monster.mutateInventory(3, 4)).isTrue();
-      assertThat(monster.mutateInventory(4, 5)).isTrue();
-
-      for (int i = 0; i < monster.inventoryLength(); i++) {
-        assertThat((Integer) monster.inventory(i)).isEqualTo(i + 1);
+        return bb;
       }
-        ByteVector inventoryVector =  monster.inventoryVector();
-        for (int i = 0; i < inventoryVector.length(); i++) {
-          assertThat((int)inventoryVector.get(i)).isEqualTo(i + 1);
-        }
-
-        //reverse mutation
-      assertThat(monster.mutateInventory(0, 0)).isTrue();
-      assertThat(monster.mutateInventory(1, 1)).isTrue();
-      assertThat(monster.mutateInventory(2, 2)).isTrue();
-      assertThat(monster.mutateInventory(3, 3)).isTrue();
-      assertThat(monster.mutateInventory(4, 4)).isTrue();
-
-      // get a struct field and edit one of its fields
-      Vec3 pos = monster.pos();
-      assertThat(pos.x()).isEqualTo(1.0f);
-      pos.mutateX(55.0f);
-      assertThat(pos.x()).isEqualTo(55.0f);
-      pos.mutateX(1.0f);
-      assertThat(pos.x()).isEqualTo(1.0f);
     }
 
-    @org.junit.Test public void TestVectorOfUnions() {
-        final FlatBufferBuilder fbb = new FlatBufferBuilder();
+    FlatBufferBuilder fbb = new FlatBufferBuilder(1, new MappedByteBufferFactory());
 
-        final int swordAttackDamage = 1;
+    TestBuilderBasics(fbb, false);
+  }
 
-        final int[] characterVector = new int[] {
-            Attacker.createAttacker(fbb, swordAttackDamage),
+  @org.junit.Test
+  public void TestSizedInputStream() {
+    // Test on default FlatBufferBuilder that uses HeapByteBuffer
+    FlatBufferBuilder fbb = new FlatBufferBuilder(1);
+
+    TestBuilderBasics(fbb, false);
+
+    InputStream in = fbb.sizedInputStream();
+    byte[] array = fbb.sizedByteArray();
+    int count = 0;
+    int currentVal = 0;
+
+    while (currentVal != -1 && count < array.length) {
+      try {
+        currentVal = in.read();
+      } catch (java.io.IOException e) {
+        System.out.println("FlatBuffers test: couldn't read from InputStream");
+        return;
+      }
+      assertThat((byte) currentVal).isEqualTo(array[count]);
+      count++;
+    }
+    assertThat(count).isEqualTo(array.length);
+  }
+
+  void TestBuilderBasics(FlatBufferBuilder fbb, boolean sizePrefix) {
+    int[] names = {
+      fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma")
+    };
+    int[] off = new int[3];
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, names[0]);
+    off[0] = Monster.endMonster(fbb);
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, names[1]);
+    off[1] = Monster.endMonster(fbb);
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, names[2]);
+    off[2] = Monster.endMonster(fbb);
+    int sortMons = fbb.createSortedVectorOfTables(new Monster(), off);
+
+    // We set up the same values as monsterdata.json:
+
+    int str = fbb.createString("MyMonster");
+
+    int inv = Monster.createInventoryVector(fbb, new byte[] {0, 1, 2, 3, 4});
+
+    int fred = fbb.createString("Fred");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, fred);
+    int mon2 = Monster.endMonster(fbb);
+
+    Monster.startTest4Vector(fbb, 2);
+    Test.createTest(fbb, (short) 10, (byte) 20);
+    Test.createTest(fbb, (short) 30, (byte) 40);
+    int test4 = fbb.endVector();
+
+    int testArrayOfString =
+        Monster.createTestarrayofstringVector(
+            fbb, new int[] {fbb.createString("test1"), fbb.createString("test2")});
+
+    Monster.startMonster(fbb);
+    Monster.addPos(
+        fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, Color.Green, (short) 5, (byte) 6));
+    Monster.addHp(fbb, (short) 80);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, inv);
+    Monster.addTestType(fbb, (byte) Any.Monster);
+    Monster.addTest(fbb, mon2);
+    Monster.addTest4(fbb, test4);
+    Monster.addTestarrayofstring(fbb, testArrayOfString);
+    Monster.addTestbool(fbb, true);
+    Monster.addTesthashu32Fnv1(fbb, Integer.MAX_VALUE + 1L);
+    Monster.addTestarrayoftables(fbb, sortMons);
+    int mon = Monster.endMonster(fbb);
+
+    if (sizePrefix) {
+      Monster.finishSizePrefixedMonsterBuffer(fbb, mon);
+    } else {
+      Monster.finishMonsterBuffer(fbb, mon);
+    }
+
+    // Write the result to a file for debugging purposes:
+    // Note that the binaries are not necessarily identical, since the JSON
+    // parser may serialize in a slightly different order than the above
+    // Java code. They are functionally equivalent though.
+
+    try {
+      String filename = "monsterdata_java_wire" + (sizePrefix ? "_sp" : "") + ".mon";
+      FileChannel fc = new FileOutputStream(tempFolder.newFile(filename)).getChannel();
+      fc.write(fbb.dataBuffer().duplicate());
+      fc.close();
+    } catch (java.io.IOException e) {
+      System.out.println("FlatBuffers test: couldn't write file");
+      return;
+    }
+
+    // Test it:
+    ByteBuffer dataBuffer = fbb.dataBuffer();
+    if (sizePrefix) {
+      assertThat(ByteBufferUtil.getSizePrefix(dataBuffer) + SIZE_PREFIX_LENGTH)
+          .isEqualTo(dataBuffer.remaining());
+      dataBuffer = ByteBufferUtil.removeSizePrefix(dataBuffer);
+    }
+    TestExtendedBuffer(dataBuffer);
+
+    // Make sure it also works with read only ByteBuffers. This is slower,
+    // since creating strings incurs an additional copy
+    // (see Table.__string).
+    TestExtendedBuffer(dataBuffer.asReadOnlyBuffer());
+
+    // Attempt to mutate Monster fields and check whether the buffer has been mutated properly
+    // revert to original values after testing
+    Monster monster = Monster.getRootAsMonster(dataBuffer);
+
+    // mana is optional and does not exist in the buffer so the mutation should fail
+    // the mana field should retain its default value
+    assertThat(monster.mutateMana((short) 10)).isFalse();
+    assertThat(monster.mana()).isEqualTo((short) 150);
+
+    // Accessing a vector of sorted by the key tables
+    assertThat(monster.testarrayoftables(0).name()).isEqualTo("Barney");
+    assertThat(monster.testarrayoftables(1).name()).isEqualTo("Frodo");
+    assertThat(monster.testarrayoftables(2).name()).isEqualTo("Wilma");
+    Monster.Vector testarrayoftablesVector = monster.testarrayoftablesVector();
+    assertThat(testarrayoftablesVector.get(0).name()).isEqualTo("Barney");
+    assertThat(testarrayoftablesVector.get(1).name()).isEqualTo("Frodo");
+    assertThat(testarrayoftablesVector.get(2).name()).isEqualTo("Wilma");
+
+    // Example of searching for a table by the key
+    assertThat(monster.testarrayoftablesByKey("Frodo").name()).isEqualTo("Frodo");
+    assertThat(monster.testarrayoftablesByKey("Barney").name()).isEqualTo("Barney");
+    assertThat(monster.testarrayoftablesByKey("Wilma").name()).isEqualTo("Wilma");
+    assertThat(testarrayoftablesVector.getByKey("Frodo").name()).isEqualTo("Frodo");
+    assertThat(testarrayoftablesVector.getByKey("Barney").name()).isEqualTo("Barney");
+    assertThat(testarrayoftablesVector.getByKey("Wilma").name()).isEqualTo("Wilma");
+
+    // testType is an existing field and mutating it should succeed
+    assertThat(monster.testType()).isEqualTo((byte) Any.Monster);
+
+    // mutate the inventory vector
+    assertThat(monster.mutateInventory(0, 1)).isTrue();
+    assertThat(monster.mutateInventory(1, 2)).isTrue();
+    assertThat(monster.mutateInventory(2, 3)).isTrue();
+    assertThat(monster.mutateInventory(3, 4)).isTrue();
+    assertThat(monster.mutateInventory(4, 5)).isTrue();
+
+    for (int i = 0; i < monster.inventoryLength(); i++) {
+      assertThat((Integer) monster.inventory(i)).isEqualTo(i + 1);
+    }
+    ByteVector inventoryVector = monster.inventoryVector();
+    for (int i = 0; i < inventoryVector.length(); i++) {
+      assertThat((int) inventoryVector.get(i)).isEqualTo(i + 1);
+    }
+
+    // reverse mutation
+    assertThat(monster.mutateInventory(0, 0)).isTrue();
+    assertThat(monster.mutateInventory(1, 1)).isTrue();
+    assertThat(monster.mutateInventory(2, 2)).isTrue();
+    assertThat(monster.mutateInventory(3, 3)).isTrue();
+    assertThat(monster.mutateInventory(4, 4)).isTrue();
+
+    // get a struct field and edit one of its fields
+    Vec3 pos = monster.pos();
+    assertThat(pos.x()).isEqualTo(1.0f);
+    pos.mutateX(55.0f);
+    assertThat(pos.x()).isEqualTo(55.0f);
+    pos.mutateX(1.0f);
+    assertThat(pos.x()).isEqualTo(1.0f);
+  }
+
+  @org.junit.Test
+  public void TestVectorOfUnions() {
+    final FlatBufferBuilder fbb = new FlatBufferBuilder();
+
+    final int swordAttackDamage = 1;
+
+    final int[] characterVector =
+        new int[] {
+          Attacker.createAttacker(fbb, swordAttackDamage),
         };
 
-        final byte[] characterTypeVector = new byte[]{
-            Character.MuLan,
+    final byte[] characterTypeVector =
+        new byte[] {
+          Character.MuLan,
         };
 
-        Movie.finishMovieBuffer(
+    Movie.finishMovieBuffer(
+        fbb,
+        Movie.createMovie(
             fbb,
-            Movie.createMovie(
-                fbb,
-                (byte)0,
-                (byte)0,
-                Movie.createCharactersTypeVector(fbb, characterTypeVector),
-                Movie.createCharactersVector(fbb, characterVector)
-            )
-        );
+            (byte) 0,
+            (byte) 0,
+            Movie.createCharactersTypeVector(fbb, characterTypeVector),
+            Movie.createCharactersVector(fbb, characterVector)));
 
-        final Movie movie = Movie.getRootAsMovie(fbb.dataBuffer());
-        ByteVector charactersTypeByteVector = movie.charactersTypeVector();
-        UnionVector charactersVector = movie.charactersVector();
+    final Movie movie = Movie.getRootAsMovie(fbb.dataBuffer());
+    ByteVector charactersTypeByteVector = movie.charactersTypeVector();
+    UnionVector charactersVector = movie.charactersVector();
 
-      assertThat(movie.charactersTypeLength()).isEqualTo(characterTypeVector.length);
-      assertThat(charactersTypeByteVector.length()).isEqualTo(characterTypeVector.length);
-      assertThat(movie.charactersLength()).isEqualTo(characterVector.length);
-      assertThat(charactersVector.length()).isEqualTo(characterVector.length);
+    assertThat(movie.charactersTypeLength()).isEqualTo(characterTypeVector.length);
+    assertThat(charactersTypeByteVector.length()).isEqualTo(characterTypeVector.length);
+    assertThat(movie.charactersLength()).isEqualTo(characterVector.length);
+    assertThat(charactersVector.length()).isEqualTo(characterVector.length);
 
-      assertThat((Byte) movie.charactersType(0)).isEqualTo(characterTypeVector[0]);
-      assertThat(charactersTypeByteVector.get(0)).isEqualTo(characterTypeVector[0]);
+    assertThat((Byte) movie.charactersType(0)).isEqualTo(characterTypeVector[0]);
+    assertThat(charactersTypeByteVector.get(0)).isEqualTo(characterTypeVector[0]);
 
-      assertThat(((Attacker)movie.characters(new Attacker(), 0)).swordAttackDamage()).isEqualTo(
-        swordAttackDamage);
+    assertThat(((Attacker) movie.characters(new Attacker(), 0)).swordAttackDamage())
+        .isEqualTo(swordAttackDamage);
+  }
+
+  @org.junit.Test
+  public void TestFixedLengthArrays() {
+    FlatBufferBuilder builder = new FlatBufferBuilder(0);
+
+    float a;
+    int[] b = new int[15];
+    byte c;
+    int[][] d_a = new int[2][2];
+    byte[] d_b = new byte[2];
+    byte[][] d_c = new byte[2][2];
+    long[][] d_d = new long[2][2];
+    int e;
+    long[] f = new long[2];
+
+    a = 0.5f;
+    for (int i = 0; i < 15; i++) b[i] = i;
+    c = 1;
+    d_a[0][0] = 1;
+    d_a[0][1] = 2;
+    d_a[1][0] = 3;
+    d_a[1][1] = 4;
+    d_b[0] = TestEnum.B;
+    d_b[1] = TestEnum.C;
+    d_c[0][0] = TestEnum.A;
+    d_c[0][1] = TestEnum.B;
+    d_c[1][0] = TestEnum.C;
+    d_c[1][1] = TestEnum.B;
+    d_d[0][0] = -1;
+    d_d[0][1] = 1;
+    d_d[1][0] = -2;
+    d_d[1][1] = 2;
+    e = 2;
+    f[0] = -1;
+    f[1] = 1;
+
+    int arrayOffset = ArrayStruct.createArrayStruct(builder, a, b, c, d_a, d_b, d_c, d_d, e, f);
+
+    // Create a table with the ArrayStruct.
+    ArrayTable.startArrayTable(builder);
+    ArrayTable.addA(builder, arrayOffset);
+    int tableOffset = ArrayTable.endArrayTable(builder);
+
+    ArrayTable.finishArrayTableBuffer(builder, tableOffset);
+
+    ArrayTable table = ArrayTable.getRootAsArrayTable(builder.dataBuffer());
+    NestedStruct nested = new NestedStruct();
+
+    assertThat(table.a().a()).isEqualTo(0.5f);
+    for (int i = 0; i < 15; i++) assertThat(table.a().b(i)).isEqualTo(i);
+    assertThat(table.a().c()).isEqualTo((byte) 1);
+    assertThat(table.a().d(nested, 0).a(0)).isEqualTo(1);
+    assertThat(table.a().d(nested, 0).a(1)).isEqualTo(2);
+    assertThat(table.a().d(nested, 1).a(0)).isEqualTo(3);
+    assertThat(table.a().d(nested, 1).a(1)).isEqualTo(4);
+    assertThat(table.a().d(nested, 0).b()).isEqualTo(TestEnum.B);
+    assertThat(table.a().d(nested, 1).b()).isEqualTo(TestEnum.C);
+    assertThat(table.a().d(nested, 0).c(0)).isEqualTo(TestEnum.A);
+    assertThat(table.a().d(nested, 0).c(1)).isEqualTo(TestEnum.B);
+    assertThat(table.a().d(nested, 1).c(0)).isEqualTo(TestEnum.C);
+    assertThat(table.a().d(nested, 1).c(1)).isEqualTo(TestEnum.B);
+    assertThat(table.a().d(nested, 0).d(0)).isEqualTo((long) -1);
+    assertThat(table.a().d(nested, 0).d(1)).isEqualTo((long) 1);
+    assertThat(table.a().d(nested, 1).d(0)).isEqualTo((long) -2);
+    assertThat(table.a().d(nested, 1).d(1)).isEqualTo((long) 2);
+    assertThat(table.a().e()).isEqualTo(2);
+    assertThat(table.a().f(0)).isEqualTo((long) -1);
+    assertThat(table.a().f(1)).isEqualTo((long) 1);
+  }
+
+  @org.junit.Test
+  public void testFlexBuffersTest() {
+    FlexBuffersBuilder builder =
+        new FlexBuffersBuilder(
+            ByteBuffer.allocate(512), FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
+    testFlexBuffersTest(builder);
+    int bufferLimit1 = ((ArrayReadWriteBuf) builder.getBuffer()).limit();
+
+    // Repeat after clearing the builder to ensure the builder is reusable
+    builder.clear();
+    testFlexBuffersTest(builder);
+    int bufferLimit2 = ((ArrayReadWriteBuf) builder.getBuffer()).limit();
+    assertThat(bufferLimit1).isEqualTo(bufferLimit2);
+  }
+
+  public static void testFlexBuffersTest(FlexBuffersBuilder builder) {
+    // Write the equivalent of:
+    // { vec: [ -100, "Fred", 4.0, false ], bar: [ 1, 2, 3 ], bar3: [ 1, 2, 3 ],
+    // foo: 100, bool: true, mymap: { foo: "Fred" } }
+    // It's possible to do this without std::function support as well.
+    int map1 = builder.startMap();
+
+    int vec1 = builder.startVector();
+    builder.putInt(-100);
+    builder.putString("Fred");
+    builder.putBlob(new byte[] {(byte) 77});
+    builder.putBoolean(false);
+    builder.putInt(Long.MAX_VALUE);
+
+    int map2 = builder.startMap();
+    builder.putInt("test", 200);
+    builder.endMap(null, map2);
+
+    builder.putFloat(150.9);
+    builder.putFloat(150.9999998);
+    builder.endVector("vec", vec1, false, false);
+
+    vec1 = builder.startVector();
+    builder.putInt(1);
+    builder.putInt(2);
+    builder.putInt(3);
+    builder.endVector("bar", vec1, true, false);
+
+    vec1 = builder.startVector();
+    builder.putBoolean(true);
+    builder.putBoolean(false);
+    builder.putBoolean(true);
+    builder.putBoolean(false);
+    builder.endVector("bools", vec1, true, false);
+
+    builder.putBoolean("bool", true);
+    builder.putFloat("foo", 100);
+
+    map2 = builder.startMap();
+    builder.putString("bar", "Fred"); // Testing key and string reuse.
+    builder.putInt("int", -120);
+    builder.putFloat("float", -123.0f);
+    builder.putBlob("blob", new byte[] {65, 67});
+    builder.endMap("mymap", map2);
+
+    builder.endMap(null, map1);
+    builder.finish();
+
+    FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
+
+    assertThat(m.size()).isEqualTo(6);
+
+    // test empty (an null)
+    // empty if fail
+    assertThat(m.get("no_key").asString()).isEqualTo("");
+    // empty if fail
+    assertThat(m.get("no_key").asMap()).isEqualTo(FlexBuffers.Map.empty());
+    // empty if fail
+    assertThat(m.get("no_key").asKey()).isEqualTo(FlexBuffers.Key.empty());
+    // empty if fail
+    assertThat(m.get("no_key").asVector()).isEqualTo(Vector.empty());
+    // empty if fail
+    assertThat(m.get("no_key").asBlob()).isEqualTo(FlexBuffers.Blob.empty());
+    assert (m.get("no_key").asVector().isEmpty()); // empty if fail
+
+    // testing "vec" field
+    FlexBuffers.Vector vec = m.get("vec").asVector();
+    assertThat(vec.size()).isEqualTo(8);
+    assertThat(vec.get(0).asLong()).isEqualTo((long) -100);
+    assertThat(vec.get(1).asString()).isEqualTo("Fred");
+    assertThat(vec.get(2).isBlob()).isTrue();
+    assertThat(vec.get(2).asBlob().size()).isEqualTo(1);
+    assertThat(vec.get(2).asBlob().data().get(0)).isEqualTo((byte) 77);
+    // Check if type is a bool
+    assertThat(vec.get(3).isBoolean()).isTrue();
+    // Check if value is false
+    assertThat(vec.get(3).asBoolean()).isFalse();
+    assertThat(vec.get(4).asLong()).isEqualTo(Long.MAX_VALUE);
+    assertThat(vec.get(5).isMap()).isTrue();
+    assertThat(vec.get(5).asMap().get("test").asInt()).isEqualTo(200);
+    assertThat(Float.compare((float) vec.get(6).asFloat(), 150.9f)).isEqualTo(0);
+    assertThat(Double.compare(vec.get(7).asFloat(), 150.9999998)).isEqualTo(0);
+    // conversion fail returns 0 as C++
+    assertThat((long) 0).isEqualTo((long) vec.get(1).asLong());
+
+    // bar vector
+    FlexBuffers.Vector tvec = m.get("bar").asVector();
+    assertThat(tvec.size()).isEqualTo(3);
+    assertThat(tvec.get(0).asInt()).isEqualTo(1);
+    assertThat(tvec.get(1).asInt()).isEqualTo(2);
+    assertThat(tvec.get(2).asInt()).isEqualTo(3);
+    assertThat(((FlexBuffers.TypedVector) tvec).getElemType()).isEqualTo(FlexBuffers.FBT_INT);
+
+    // bools vector
+    FlexBuffers.Vector bvec = m.get("bools").asVector();
+    assertThat(bvec.size()).isEqualTo(4);
+    assertThat(bvec.get(0).asBoolean()).isTrue();
+    assertThat(bvec.get(1).asBoolean()).isFalse();
+    assertThat(bvec.get(2).asBoolean()).isTrue();
+    assertThat(bvec.get(3).asBoolean()).isFalse();
+    assertThat(((FlexBuffers.TypedVector) bvec).getElemType()).isEqualTo(FlexBuffers.FBT_BOOL);
+
+    assertThat((float) m.get("foo").asFloat()).isEqualTo((float) 100);
+    assertThat(m.get("unknown").isNull()).isTrue();
+
+    // mymap vector
+    FlexBuffers.Map mymap = m.get("mymap").asMap();
+    // These should be equal by pointer equality, since key and value are shared.
+    assertThat(mymap.keys().get(0)).isEqualTo(m.keys().get(0));
+    assertThat(mymap.keys().get(0).toString()).isEqualTo("bar");
+    assertThat(mymap.values().get(0).asString()).isEqualTo(vec.get(1).asString());
+    assertThat(mymap.get("int").asInt()).isEqualTo(-120);
+    assertThat((float) mymap.get("float").asFloat()).isEqualTo(-123.0f);
+    assertThat(Arrays.equals(mymap.get("blob").asBlob().getBytes(), new byte[] {65, 67}))
+        .isEqualTo(true);
+    assertThat(mymap.get("blob").asBlob().toString()).isEqualTo("AC");
+    assertThat(mymap.get("blob").toString()).isEqualTo("\"AC\"");
+  }
+
+  @org.junit.Test
+  public void testFlexBufferVectorStrings() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000000));
+
+    int size = 3000;
+    StringBuilder sb = new StringBuilder();
+    for (int i = 0; i < size; i++) {
+      sb.append("a");
     }
 
-    @org.junit.Test public void TestFixedLengthArrays() {
-        FlatBufferBuilder builder = new FlatBufferBuilder(0);
+    String text = sb.toString();
+    assertThat(text.length()).isEqualTo(size);
 
-        float       a;
-        int[]       b = new int[15];
-        byte        c;
-        int[][]     d_a = new int[2][2];
-        byte[]      d_b = new byte[2];
-        byte[][]    d_c = new byte[2][2];
-        long[][]    d_d = new long[2][2];
-        int         e;
-        long[]      f = new long[2];
+    int pos = builder.startVector();
 
-        a = 0.5f;
-        for (int i = 0; i < 15; i++) b[i] = i;
-        c = 1;
-        d_a[0][0] = 1;
-        d_a[0][1] = 2;
-        d_a[1][0] = 3;
-        d_a[1][1] = 4;
-        d_b[0] = TestEnum.B;
-        d_b[1] = TestEnum.C;
-        d_c[0][0] = TestEnum.A;
-        d_c[0][1] = TestEnum.B;
-        d_c[1][0] = TestEnum.C;
-        d_c[1][1] = TestEnum.B;
-        d_d[0][0] = -1;
-        d_d[0][1] = 1;
-        d_d[1][0] = -2;
-        d_d[1][1] = 2;
-        e = 2;
-        f[0] = -1;
-        f[1] = 1;
-
-        int arrayOffset = ArrayStruct.createArrayStruct(builder,
-            a, b, c, d_a, d_b, d_c, d_d, e, f);
-
-        // Create a table with the ArrayStruct.
-        ArrayTable.startArrayTable(builder);
-        ArrayTable.addA(builder, arrayOffset);
-        int tableOffset = ArrayTable.endArrayTable(builder);
-
-        ArrayTable.finishArrayTableBuffer(builder, tableOffset);
-
-        ArrayTable table = ArrayTable.getRootAsArrayTable(builder.dataBuffer());
-        NestedStruct nested = new NestedStruct();
-
-      assertThat(table.a().a()).isEqualTo(0.5f);
-      for (int i = 0; i < 15; i++)
-        assertThat(table.a().b(i)).isEqualTo(i);
-      assertThat(table.a().c()).isEqualTo((byte)1);
-      assertThat(table.a().d(nested, 0).a(0)).isEqualTo(1);
-      assertThat(table.a().d(nested, 0).a(1)).isEqualTo(2);
-      assertThat(table.a().d(nested, 1).a(0)).isEqualTo(3);
-      assertThat(table.a().d(nested, 1).a(1)).isEqualTo(4);
-      assertThat(table.a().d(nested, 0).b()).isEqualTo(TestEnum.B);
-      assertThat(table.a().d(nested, 1).b()).isEqualTo(TestEnum.C);
-      assertThat(table.a().d(nested, 0).c(0)).isEqualTo(TestEnum.A);
-      assertThat(table.a().d(nested, 0).c(1)).isEqualTo(TestEnum.B);
-      assertThat(table.a().d(nested, 1).c(0)).isEqualTo(TestEnum.C);
-      assertThat(table.a().d(nested, 1).c(1)).isEqualTo(TestEnum.B);
-      assertThat(table.a().d(nested, 0).d(0)).isEqualTo((long)-1);
-      assertThat(table.a().d(nested, 0).d(1)).isEqualTo((long)1);
-      assertThat(table.a().d(nested, 1).d(0)).isEqualTo((long)-2);
-      assertThat(table.a().d(nested, 1).d(1)).isEqualTo((long)2);
-      assertThat(table.a().e()).isEqualTo(2);
-      assertThat(table.a().f(0)).isEqualTo((long)-1);
-      assertThat(table.a().f(1)).isEqualTo((long)1);
+    for (int i = 0; i < size; i++) {
+      builder.putString(text);
     }
 
-    @org.junit.Test public void testFlexBuffersTest() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(512),
-                FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
-        testFlexBuffersTest(builder);
-        int bufferLimit1 = ((ArrayReadWriteBuf) builder.getBuffer()).limit();
+    try {
+      builder.endVector(null, pos, true, false);
+      // this should raise an exception as
+      // typed vector of string was deprecated
+      assert false;
+    } catch (FlexBufferException fb) {
+      // no op
+    }
+    // we finish the vector again as non-typed
+    builder.endVector(null, pos, false, false);
 
-        // Repeat after clearing the builder to ensure the builder is reusable
-        builder.clear();
-        testFlexBuffersTest(builder);
-        int bufferLimit2 = ((ArrayReadWriteBuf) builder.getBuffer()).limit();
-      assertThat(bufferLimit1).isEqualTo(bufferLimit2);
+    ByteBuffer b = builder.finish();
+    Vector v = FlexBuffers.getRoot(b).asVector();
+
+    assertThat(v.size()).isEqualTo(size);
+    for (int i = 0; i < size; i++) {
+      assertThat(v.get(i).asString().length()).isEqualTo(size);
+      assertThat(v.get(i).asString()).isEqualTo(text);
+    }
+  }
+
+  @org.junit.Test
+  public void testDeprecatedTypedVectorString() {
+    // tests whether we are able to support reading deprecated typed vector string
+    // data is equivalent to [ "abc", "abc", "abc", "abc"]
+    byte[] data =
+        new byte[] {
+          0x03, 0x61, 0x62, 0x63, 0x00, 0x03, 0x61, 0x62, 0x63, 0x00, 0x03, 0x61, 0x62, 0x63, 0x00,
+          0x03, 0x61, 0x62, 0x63, 0x00, 0x04, 0x14, 0x10, 0x0c, 0x08, 0x04, 0x3c, 0x01
+        };
+    Reference ref = FlexBuffers.getRoot(ByteBuffer.wrap(data));
+    assertThat(ref.getType()).isEqualTo(FlexBuffers.FBT_VECTOR_STRING_DEPRECATED);
+    assertThat(ref.isTypedVector()).isTrue();
+    Vector vec = ref.asVector();
+    for (int i = 0; i < vec.size(); i++) {
+      assertThat("abc").isEqualTo(vec.get(i).asString());
+    }
+  }
+
+  @org.junit.Test
+  public void testSingleElementBoolean() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(100));
+    builder.putBoolean(true);
+    ByteBuffer b = builder.finish();
+    assertThat(FlexBuffers.getRoot(b).asBoolean()).isTrue();
+  }
+
+  @org.junit.Test
+  public void testSingleElementByte() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putInt(10);
+    ByteBuffer b = builder.finish();
+    assertThat(10).isEqualTo(FlexBuffers.getRoot(b).asInt());
+  }
+
+  @org.junit.Test
+  public void testSingleElementShort() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putInt(Short.MAX_VALUE);
+    ByteBuffer b = builder.finish();
+    assertThat(Short.MAX_VALUE).isEqualTo((short) FlexBuffers.getRoot(b).asInt());
+  }
+
+  @org.junit.Test
+  public void testSingleElementInt() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putInt(Integer.MIN_VALUE);
+    ByteBuffer b = builder.finish();
+    assertThat(Integer.MIN_VALUE).isEqualTo(FlexBuffers.getRoot(b).asInt());
+  }
+
+  @org.junit.Test
+  public void testSingleElementLong() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putInt(Long.MAX_VALUE);
+    ByteBuffer b = builder.finish();
+    assertThat(Long.MAX_VALUE).isEqualTo(FlexBuffers.getRoot(b).asLong());
+  }
+
+  @org.junit.Test
+  public void testSingleElementFloat() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putFloat(Float.MAX_VALUE);
+    ByteBuffer b = builder.finish();
+    assertThat(Float.compare(Float.MAX_VALUE, (float) FlexBuffers.getRoot(b).asFloat()))
+        .isEqualTo(0);
+  }
+
+  @org.junit.Test
+  public void testSingleElementDouble() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putFloat(Double.MAX_VALUE);
+    ByteBuffer b = builder.finish();
+    assertThat(Double.compare(Double.MAX_VALUE, FlexBuffers.getRoot(b).asFloat())).isEqualTo(0);
+  }
+
+  @org.junit.Test
+  public void testSingleElementBigString() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000));
+    StringBuilder sb = new StringBuilder();
+
+    for (int i = 0; i < 3000; i++) {
+      sb.append("a");
     }
 
-    public static void testFlexBuffersTest(FlexBuffersBuilder builder) {
-        // Write the equivalent of:
-        // { vec: [ -100, "Fred", 4.0, false ], bar: [ 1, 2, 3 ], bar3: [ 1, 2, 3 ],
-        // foo: 100, bool: true, mymap: { foo: "Fred" } }
-        // It's possible to do this without std::function support as well.
-        int map1 = builder.startMap();
+    builder.putString(sb.toString());
+    ByteBuffer b = builder.finish();
 
-        int vec1 = builder.startVector();
-        builder.putInt(-100);
-        builder.putString("Fred");
-        builder.putBlob(new byte[]{(byte) 77});
-        builder.putBoolean(false);
-        builder.putInt(Long.MAX_VALUE);
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
 
-        int map2 = builder.startMap();
-        builder.putInt("test", 200);
-        builder.endMap(null, map2);
+    assertThat(FlexBuffers.FBT_STRING).isEqualTo(r.getType());
+    assertThat(sb.toString()).isEqualTo(r.asString());
+  }
 
-        builder.putFloat(150.9);
-        builder.putFloat(150.9999998);
-        builder.endVector("vec", vec1, false, false);
+  @org.junit.Test
+  public void testSingleElementSmallString() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000));
 
-        vec1 = builder.startVector();
-        builder.putInt(1);
-        builder.putInt(2);
-        builder.putInt(3);
-        builder.endVector("bar", vec1, true, false);
+    builder.putString("aa");
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
 
-        vec1 = builder.startVector();
-        builder.putBoolean(true);
-        builder.putBoolean(false);
-        builder.putBoolean(true);
-        builder.putBoolean(false);
-        builder.endVector("bools", vec1, true, false);
+    assertThat(FlexBuffers.FBT_STRING).isEqualTo(r.getType());
+    assertThat("aa").isEqualTo(r.asString());
+  }
 
-        builder.putBoolean("bool", true);
-        builder.putFloat("foo", 100);
+  @org.junit.Test
+  public void testSingleElementBlob() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putBlob(new byte[] {5, 124, 118, -1});
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+    byte[] result = r.asBlob().getBytes();
+    assertThat((byte) 5).isEqualTo(result[0]);
+    assertThat((byte) 124).isEqualTo(result[1]);
+    assertThat((byte) 118).isEqualTo(result[2]);
+    assertThat((byte) -1).isEqualTo(result[3]);
+  }
 
-        map2 = builder.startMap();
-        builder.putString("bar", "Fred");  // Testing key and string reuse.
-        builder.putInt("int", -120);
-        builder.putFloat("float", -123.0f);
-        builder.putBlob("blob", new byte[]{ 65, 67 });
-        builder.endMap("mymap", map2);
+  @org.junit.Test
+  public void testSingleElementLongBlob() {
 
-        builder.endMap(null, map1);
-        builder.finish();
-
-        FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
-
-      assertThat(m.size()).isEqualTo(6);
-
-      // test empty (an null)
-      // empty if fail
-      assertThat(m.get("no_key").asString()).isEqualTo("");
-      // empty if fail
-      assertThat(m.get("no_key").asMap()).isEqualTo(FlexBuffers.Map.empty());
-      // empty if fail
-      assertThat(m.get("no_key").asKey()).isEqualTo(FlexBuffers.Key.empty());
-      // empty if fail
-      assertThat(m.get("no_key").asVector()).isEqualTo(Vector.empty());
-      // empty if fail
-      assertThat(m.get("no_key").asBlob()).isEqualTo(FlexBuffers.Blob.empty());
-      assert(m.get("no_key").asVector().isEmpty()); // empty if fail
-
-        // testing "vec" field
-        FlexBuffers.Vector vec = m.get("vec").asVector();
-      assertThat(vec.size()).isEqualTo(8);
-      assertThat(vec.get(0).asLong()).isEqualTo((long) -100);
-      assertThat(vec.get(1).asString()).isEqualTo("Fred");
-      assertThat(vec.get(2).isBlob()).isTrue();
-      assertThat(vec.get(2).asBlob().size()).isEqualTo(1);
-      assertThat(vec.get(2).asBlob().data().get(0)).isEqualTo((byte) 77);
-      // Check if type is a bool
-      assertThat(vec.get(3).isBoolean()).isTrue();
-      // Check if value is false
-      assertThat(vec.get(3).asBoolean()).isFalse();
-      assertThat(vec.get(4).asLong()).isEqualTo(Long.MAX_VALUE);
-      assertThat(vec.get(5).isMap()).isTrue();
-      assertThat(vec.get(5).asMap().get("test").asInt()).isEqualTo(200);
-      assertThat(Float.compare((float)vec.get(6).asFloat(), 150.9f)).isEqualTo(0);
-      assertThat(Double.compare(vec.get(7).asFloat(), 150.9999998)).isEqualTo(0);
-      //conversion fail returns 0 as C++
-      assertThat((long)0).isEqualTo((long)vec.get(1).asLong());
-
-      // bar vector
-        FlexBuffers.Vector tvec = m.get("bar").asVector();
-      assertThat(tvec.size()).isEqualTo(3);
-      assertThat(tvec.get(0).asInt()).isEqualTo(1);
-      assertThat(tvec.get(1).asInt()).isEqualTo(2);
-      assertThat(tvec.get(2).asInt()).isEqualTo(3);
-      assertThat(((FlexBuffers.TypedVector) tvec).getElemType()).isEqualTo(FlexBuffers.FBT_INT);
-
-      // bools vector
-        FlexBuffers.Vector bvec = m.get("bools").asVector();
-      assertThat(bvec.size()).isEqualTo(4);
-      assertThat(bvec.get(0).asBoolean()).isTrue();
-      assertThat(bvec.get(1).asBoolean()).isFalse();
-      assertThat(bvec.get(2).asBoolean()).isTrue();
-      assertThat(bvec.get(3).asBoolean()).isFalse();
-      assertThat(((FlexBuffers.TypedVector) bvec).getElemType()).isEqualTo(FlexBuffers.FBT_BOOL);
-
-      assertThat((float)m.get("foo").asFloat()).isEqualTo((float) 100);
-      assertThat(m.get("unknown").isNull()).isTrue();
-
-      // mymap vector
-        FlexBuffers.Map mymap = m.get("mymap").asMap();
-      // These should be equal by pointer equality, since key and value are shared.
-      assertThat(mymap.keys().get(0)).isEqualTo(m.keys().get(0));
-      assertThat(mymap.keys().get(0).toString()).isEqualTo("bar");
-      assertThat(mymap.values().get(0).asString()).isEqualTo(vec.get(1).asString());
-      assertThat(mymap.get("int").asInt()).isEqualTo(-120);
-      assertThat((float)mymap.get("float").asFloat()).isEqualTo(-123.0f);
-      assertThat(Arrays.equals(mymap.get("blob").asBlob().getBytes(), new byte[]{ 65, 67 })).isEqualTo(
-        true);
-      assertThat(mymap.get("blob").asBlob().toString()).isEqualTo("AC");
-      assertThat(mymap.get("blob").toString()).isEqualTo("\"AC\"");
-    }
-
-    @org.junit.Test public void testFlexBufferVectorStrings() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000000));
-
-        int size = 3000;
-        StringBuilder sb = new StringBuilder();
-        for (int i=0; i< size; i++) {
-            sb.append("a");
-        }
-
-        String text = sb.toString();
-      assertThat(text.length()).isEqualTo(size);
-
-      int pos = builder.startVector();
-
-        for (int i=0; i<size; i++) {
-            builder.putString(text);
-        }
-
-        try {
-            builder.endVector(null, pos, true, false);
-            // this should raise an exception as
-            // typed vector of string was deprecated
-            assert false;
-        } catch(FlexBufferException fb) {
-            // no op
-        }
-        // we finish the vector again as non-typed
-        builder.endVector(null, pos, false, false);
-
-        ByteBuffer b = builder.finish();
-        Vector v = FlexBuffers.getRoot(b).asVector();
-
-      assertThat(v.size()).isEqualTo(size);
-      for (int i=0; i<size; i++) {
-        assertThat(v.get(i).asString().length()).isEqualTo(size);
-        assertThat(v.get(i).asString()).isEqualTo(text);
-      }
-    }
-
-    @org.junit.Test public void testDeprecatedTypedVectorString() {
-        // tests whether we are able to support reading deprecated typed vector string
-        // data is equivalent to [ "abc", "abc", "abc", "abc"]
-        byte[] data = new byte[] {0x03, 0x61, 0x62, 0x63, 0x00, 0x03, 0x61, 0x62, 0x63, 0x00,
-            0x03, 0x61, 0x62, 0x63, 0x00, 0x03, 0x61, 0x62, 0x63, 0x00, 0x04, 0x14, 0x10,
-             0x0c, 0x08, 0x04, 0x3c, 0x01};
-        Reference ref = FlexBuffers.getRoot(ByteBuffer.wrap(data));
-      assertThat(ref.getType()).isEqualTo(FlexBuffers.FBT_VECTOR_STRING_DEPRECATED);
-      assertThat(ref.isTypedVector()).isTrue();
-      Vector vec = ref.asVector();
-        for (int i=0; i< vec.size(); i++) {
-          assertThat("abc").isEqualTo(vec.get(i).asString());
-        }
-    }
-
-    @org.junit.Test public void testSingleElementBoolean() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(100));
-        builder.putBoolean(true);
-        ByteBuffer b = builder.finish();
-        assertThat(FlexBuffers.getRoot(b).asBoolean()).isTrue();
-    }
-
-    @org.junit.Test public void testSingleElementByte() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putInt(10);
-        ByteBuffer b = builder.finish();
-      assertThat(10).isEqualTo(FlexBuffers.getRoot(b).asInt());
-    }
-
-    @org.junit.Test public void testSingleElementShort() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putInt(Short.MAX_VALUE);
-        ByteBuffer b = builder.finish();
-      assertThat(Short.MAX_VALUE).isEqualTo((short) FlexBuffers.getRoot(b).asInt());
-    }
-
-    @org.junit.Test public void testSingleElementInt() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putInt(Integer.MIN_VALUE);
-        ByteBuffer b = builder.finish();
-      assertThat(Integer.MIN_VALUE).isEqualTo(FlexBuffers.getRoot(b).asInt());
-    }
-
-    @org.junit.Test public void testSingleElementLong() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putInt(Long.MAX_VALUE);
-        ByteBuffer b = builder.finish();
-      assertThat(Long.MAX_VALUE).isEqualTo(FlexBuffers.getRoot(b).asLong());
-    }
-
-    @org.junit.Test public void testSingleElementFloat() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putFloat(Float.MAX_VALUE);
-        ByteBuffer b = builder.finish();
-      assertThat(Float.compare(Float.MAX_VALUE, (float) FlexBuffers.getRoot(b).asFloat())).isEqualTo(
-        0);
-    }
-
-    @org.junit.Test public void testSingleElementDouble() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putFloat(Double.MAX_VALUE);
-        ByteBuffer b = builder.finish();
-      assertThat(Double.compare(Double.MAX_VALUE, FlexBuffers.getRoot(b).asFloat())).isEqualTo(0);
-    }
-
-    @org.junit.Test public void testSingleElementBigString() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000));
-        StringBuilder sb = new StringBuilder();
-
-        for (int i=0; i< 3000; i++) {
-            sb.append("a");
-        }
-
-        builder.putString(sb.toString());
-        ByteBuffer b = builder.finish();
-
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-
-      assertThat(FlexBuffers.FBT_STRING).isEqualTo(r.getType());
-      assertThat(sb.toString()).isEqualTo(r.asString());
-    }
-
-    @org.junit.Test public void testSingleElementSmallString() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(10000));
-
-        builder.putString("aa");
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-
-      assertThat(FlexBuffers.FBT_STRING).isEqualTo(r.getType());
-      assertThat("aa").isEqualTo(r.asString());
-    }
-
-    @org.junit.Test public void testSingleElementBlob() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putBlob(new byte[]{5, 124, 118, -1});
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-        byte[] result = r.asBlob().getBytes();
-      assertThat((byte)5).isEqualTo(result[0]);
-      assertThat((byte)124).isEqualTo(result[1]);
-      assertThat((byte)118).isEqualTo(result[2]);
-      assertThat((byte)-1).isEqualTo(result[3]);
-    }
-
-    @org.junit.Test public void testSingleElementLongBlob() {
-
-        // verifies blobs of up to 2^16 in length
-        for (int i = 2; i <= 1<<16; i = i<<1) {
-            byte[] input = new byte[i-1];
-            for (int index = 0; index < input.length; index++) {
-                input[index] = (byte)(index % 64);
-            }
-
-            FlexBuffersBuilder builder = new FlexBuffersBuilder();
-            builder.putBlob(input);
-            ByteBuffer b = builder.finish();
-            FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-            byte[] result = r.asBlob().getBytes();
-            
-            for (int index = 0; index < input.length; index++) {
-              assertThat((byte)(index % 64)).isEqualTo(result[index]);
-            }
-        }
-    }
-
-    @org.junit.Test public void testSingleElementUByte() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putUInt(0xFF);
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-      assertThat(255).isEqualTo((int)r.asUInt());
-    }
-
-    @org.junit.Test public void testSingleElementUShort() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putUInt(0xFFFF);
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-      assertThat(65535).isEqualTo((int)r.asUInt());
-    }
-
-    @org.junit.Test public void testSingleElementUInt() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        builder.putUInt(0xFFFF_FFFFL);
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-      assertThat(4294967295L).isEqualTo(r.asUInt());
-    }
-
-    @org.junit.Test public void testSingleFixedTypeVector() {
-
-        int[] ints = new int[]{5, 124, 118, -1};
-        float[] floats = new float[]{5.5f, 124.124f, 118.118f, -1.1f};
-        String[] strings = new String[]{"This", "is", "a", "typed", "array"};
-        boolean[] booleans = new boolean[]{false, true, true, false};
-
-
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(512),
-                FlexBuffersBuilder.BUILDER_FLAG_NONE);
-
-        int mapPos = builder.startMap();
-
-        int vecPos = builder.startVector();
-        for (final int i : ints) {
-            builder.putInt(i);
-        }
-        builder.endVector("ints", vecPos, true, false);
-
-        vecPos = builder.startVector();
-        for (final float i : floats) {
-            builder.putFloat(i);
-        }
-        builder.endVector("floats", vecPos, true, false);
-
-        vecPos = builder.startVector();
-        for (final boolean i : booleans) {
-            builder.putBoolean(i);
-        }
-        builder.endVector("booleans", vecPos, true, false);
-
-        builder.endMap(null, mapPos);
-
-
-        ByteBuffer b = builder.finish();
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b);
-        assert(r.asMap().get("ints").isTypedVector());
-        assert(r.asMap().get("floats").isTypedVector());
-        assert(r.asMap().get("booleans").isTypedVector());
-    }
-
-    @org.junit.Test public void testSingleElementVector() {
-        FlexBuffersBuilder b = new FlexBuffersBuilder();
-
-        int vecPos = b.startVector();
-        b.putInt(99);
-        b.putString("wow");
-        b.putNull();
-        int vecpos2 = b.startVector();
-        b.putInt(99);
-        b.putString("wow");
-        b.putNull();
-        b.endVector(null, vecpos2, false, false);
-        b.endVector(null, vecPos, false, false);
-        b.finish();
-
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b.getBuffer());
-      assertThat(FlexBuffers.FBT_VECTOR).isEqualTo(r.getType());
-      FlexBuffers.Vector vec = FlexBuffers.getRoot(b.getBuffer()).asVector();
-      assertThat(4).isEqualTo(vec.size());
-      assertThat(99).isEqualTo(vec.get(0).asInt());
-      assertThat("wow").isEqualTo(vec.get(1).asString());
-      assertThat(true).isEqualTo(vec.get(2).isNull());
-      assertThat("[ 99, \"wow\", null ]").isEqualTo(vec.get(3).toString());
-      assertThat("[ 99, \"wow\", null, [ 99, \"wow\", null ] ]").isEqualTo(
-        FlexBuffers.getRoot(b.getBuffer()).toString());
-    }
-
-    @org.junit.Test public void testSingleElementMap() {
-        FlexBuffersBuilder b = new FlexBuffersBuilder();
-
-        int mapPost = b.startMap();
-        b.putInt("myInt", 0x7fffffbbbfffffffL);
-        b.putString("myString", "wow");
-        b.putString("myString2", "incredible");
-        b.putNull("myNull");
-        int start = b.startVector();
-        b.putInt(99);
-        b.putString("wow");
-        b.endVector("myVec", start, false, false);
-
-        b.putFloat("double", 0x1.ffffbbbffffffP+1023);
-        b.endMap(null, mapPost);
-        b.finish();
-
-        FlexBuffers.Reference r = FlexBuffers.getRoot(b.getBuffer());
-      assertThat(FlexBuffers.FBT_MAP).isEqualTo(r.getType());
-      FlexBuffers.Map map = FlexBuffers.getRoot(b.getBuffer()).asMap();
-      assertThat(6).isEqualTo(map.size());
-      assertThat(0x7fffffbbbfffffffL).isEqualTo(map.get("myInt").asLong());
-      assertThat("wow").isEqualTo(map.get("myString").asString());
-      assertThat("incredible").isEqualTo(map.get("myString2").asString());
-      assertThat(true).isEqualTo(map.get("myNull").isNull());
-      assertThat(99).isEqualTo(map.get("myVec").asVector().get(0).asInt());
-      assertThat("wow").isEqualTo(map.get("myVec").asVector().get(1).asString());
-      assertThat(Double.compare(0x1.ffffbbbffffffP+1023, map.get("double").asFloat())).isEqualTo(0);
-      assertThat(
-        "{ \"double\" : 1.7976894783391937E308, \"myInt\" : 9223371743723257855, \"myNull\" : null, \"myString\" : \"wow\", \"myString2\" : \"incredible\", \"myVec\" : [ 99, \"wow\" ] }").isEqualTo(
-        FlexBuffers.getRoot(b.getBuffer()).toString());
-    }
-
-    @org.junit.Test public void testFlexBuferEmpty() {
-        FlexBuffers.Blob blob = FlexBuffers.Blob.empty();
-        FlexBuffers.Map ary = FlexBuffers.Map.empty();
-        FlexBuffers.Vector map = FlexBuffers.Vector.empty();
-        FlexBuffers.TypedVector typedAry = FlexBuffers.TypedVector.empty();
-      assertThat(blob.size()).isEqualTo(0);
-      assertThat(map.size()).isEqualTo(0);
-      assertThat(ary.size()).isEqualTo(0);
-      assertThat(typedAry.size()).isEqualTo(0);
-    }
-
-    @org.junit.Test public void testHashMapToMap() {
-        int entriesCount = 12;
-
-        HashMap<String, String> source =  new HashMap<>();
-        for (int i = 0; i < entriesCount; i++) {
-            source.put("foo_param_" + i, "foo_value_" + i);
-        }
-
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(1000);
-        int mapStart = builder.startMap();
-        for (Map.Entry<String, String> entry : source.entrySet()) {
-            builder.putString(entry.getKey(), entry.getValue());
-        }
-        builder.endMap(null, mapStart);
-        ByteBuffer bb = builder.finish();
-        bb.rewind();
-
-        FlexBuffers.Reference rootReference = FlexBuffers.getRoot(bb);
-
-      assertThat(rootReference.isMap()).isTrue();
-
-      FlexBuffers.Map flexMap = rootReference.asMap();
-
-        FlexBuffers.KeyVector keys = flexMap.keys();
-        FlexBuffers.Vector values = flexMap.values();
-
-      assertThat(entriesCount).isEqualTo(keys.size());
-      assertThat(entriesCount).isEqualTo(values.size());
-
-      HashMap<String, String> result =  new HashMap<>();
-        for (int i = 0; i < keys.size(); i++) {
-            result.put(keys.get(i).toString(), values.get(i).asString());
-        }
-
-      assertThat(source).isEqualTo(result);
-    }
-
-    @org.junit.Test public void testBuilderGrowth() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder();
-        String someString = "This is a small string";
-        builder.putString(someString);
-        ByteBuffer b = builder.finish();
-      assertThat(someString).isEqualTo(FlexBuffers.getRoot(b).asString());
-
-      FlexBuffersBuilder failBuilder = new FlexBuffersBuilder(ByteBuffer.allocate(1));
-        failBuilder.putString(someString);
-    }
-
-    @org.junit.Test
-    public void testFlexBuffersUtf8Map() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(512),
-                FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
-
-        String key0 = "😨 face1";
-        String key1 = "😩 face2";
-        String key2 = "😨 face3";
-        String key3 = "trademark ®";
-        String key4 = "€ euro";
-        String utf8keys[] = { "😨 face1", "😩 face2", "😨 face3", "trademark ®", "€ euro"};
-
-        int map = builder.startMap();
-
-        for (int i=0; i< utf8keys.length; i++) {
-            builder.putString(utf8keys[i], utf8keys[i]);  // Testing key and string reuse.
-        }
-        builder.endMap(null, map);
-        builder.finish();
-
-        FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
-
-      assertThat(m.size()).isEqualTo(5);
-
-      KeyVector kv = m.keys();
-        for (int i=0; i< utf8keys.length; i++) {
-          assertThat(kv.get(i).toString()).isEqualTo(m.get(i).asString());
-        }
-
-      assertThat(m.get(key0).asString()).isEqualTo(utf8keys[0]);
-      assertThat(m.get(key1).asString()).isEqualTo(utf8keys[1]);
-      assertThat(m.get(key2).asString()).isEqualTo(utf8keys[2]);
-      assertThat(m.get(key3).asString()).isEqualTo(utf8keys[3]);
-      assertThat(m.get(key4).asString()).isEqualTo(utf8keys[4]);
-    }
-
-    @org.junit.Test public void testFlexBuffersMapLookup() {
-        FlexBuffersBuilder builder = new FlexBuffersBuilder(ByteBuffer.allocate(512),
-                FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
-
-        String key0 = "123";
-        String key1 = "1234";
-        String key2 = "12345";
-        String[] keys = new String[]{key0, key1, key2};
-
-        int map = builder.startMap();
-
-        for (int i=0; i< keys.length; i++) {
-            builder.putString(keys[i], keys[i]);  // Testing key and string reuse.
-        }
-        builder.endMap(null, map);
-        builder.finish();
-
-        FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
-        for (int i=0; i< keys.length; i++) {
-          assertThat(m.get(keys[i]).asString()).isEqualTo(keys[i]);
-          assertThat(m.get(keys[i].getBytes(StandardCharsets.UTF_8)).asString()).isEqualTo(keys[i]);
-        }
-    }
-
-    @org.junit.Test public void TestDictionaryLookup() {
-        FlatBufferBuilder fbb = new FlatBufferBuilder(16);
-        int lfIndex = LongFloatEntry.createLongFloatEntry(fbb, 0, 99);
-        int vectorEntriesIdx = LongFloatMap.createEntriesVector(fbb, new int[] { lfIndex });
-        int rootIdx = LongFloatMap.createLongFloatMap(fbb, vectorEntriesIdx);
-
-        LongFloatMap.finishLongFloatMapBuffer(fbb, rootIdx);
-        LongFloatMap map = LongFloatMap.getRootAsLongFloatMap(fbb.dataBuffer());
-      assertThat(map.entriesLength()).isEqualTo(1);
-
-      LongFloatEntry e = map.entries(0);
-      assertThat(e.key()).isEqualTo(0L);
-      assertThat(e.value()).isEqualTo(99.0f);
-
-      LongFloatEntry e2 = map.entriesByKey(0);
-      assertThat(e2.key()).isEqualTo(0L);
-      assertThat(e2.value()).isEqualTo(99.0f);
-    }
-
-    @org.junit.Test public void TestVectorOfBytes() {
-        FlatBufferBuilder fbb = new FlatBufferBuilder(16);
-        int str = fbb.createString("ByteMonster");
-        byte[] data = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-        int offset = Monster.createInventoryVector(fbb, data);
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        int monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
-
-      assertThat(monsterObject.inventoryLength()).isEqualTo(data.length);
-      assertThat((Integer) monsterObject.inventory(4)).isEqualTo((int) data[4]);
-      assertThat(ByteBuffer.wrap(data)).isEqualTo(monsterObject.inventoryAsByteBuffer());
-
-      fbb.clear();
-        ByteBuffer bb = ByteBuffer.wrap(data);
-        offset = fbb.createByteVector(bb);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject2 = Monster.getRootAsMonster(fbb.dataBuffer());
-
-      assertThat(monsterObject2.inventoryLength()).isEqualTo(data.length);
-      for (int i = 0; i < data.length; i++) {
-        assertThat((Integer) monsterObject2.inventory(i)).isEqualTo((int) bb.get(i));
+    // verifies blobs of up to 2^16 in length
+    for (int i = 2; i <= 1 << 16; i = i << 1) {
+      byte[] input = new byte[i - 1];
+      for (int index = 0; index < input.length; index++) {
+        input[index] = (byte) (index % 64);
       }
 
-        fbb.clear();
-        offset = fbb.createByteVector(data, 3, 4);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject3 = Monster.getRootAsMonster(fbb.dataBuffer());
+      FlexBuffersBuilder builder = new FlexBuffersBuilder();
+      builder.putBlob(input);
+      ByteBuffer b = builder.finish();
+      FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+      byte[] result = r.asBlob().getBytes();
 
-      assertThat(monsterObject3.inventoryLength()).isEqualTo(4);
-      assertThat((Integer) monsterObject3.inventory(0)).isEqualTo((int) data[3]);
+      for (int index = 0; index < input.length; index++) {
+        assertThat((byte) (index % 64)).isEqualTo(result[index]);
+      }
+    }
+  }
 
-      fbb.clear();
-        bb = ByteBuffer.wrap(data);
-        offset = Monster.createInventoryVector(fbb, bb);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject4 = Monster.getRootAsMonster(fbb.dataBuffer());
+  @org.junit.Test
+  public void testSingleElementUByte() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putUInt(0xFF);
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+    assertThat(255).isEqualTo((int) r.asUInt());
+  }
 
-      assertThat(monsterObject4.inventoryLength()).isEqualTo(data.length);
-      assertThat((Integer) monsterObject4.inventory(8)).isEqualTo((int) 8);
+  @org.junit.Test
+  public void testSingleElementUShort() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putUInt(0xFFFF);
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+    assertThat(65535).isEqualTo((int) r.asUInt());
+  }
 
-      fbb.clear();
-        byte[] largeData = new byte[1024];
-        offset = fbb.createByteVector(largeData);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject5 = Monster.getRootAsMonster(fbb.dataBuffer());
+  @org.junit.Test
+  public void testSingleElementUInt() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    builder.putUInt(0xFFFF_FFFFL);
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+    assertThat(4294967295L).isEqualTo(r.asUInt());
+  }
 
-      assertThat(monsterObject5.inventoryLength()).isEqualTo(largeData.length);
-      assertThat((Integer) monsterObject5.inventory(25)).isEqualTo((int) largeData[25]);
+  @org.junit.Test
+  public void testSingleFixedTypeVector() {
 
-      fbb.clear();
-        bb = ByteBuffer.wrap(largeData);
-        bb.position(512);
-        ByteBuffer bb2 = bb.slice();
-      assertThat(bb2.arrayOffset()).isEqualTo(512);
-      offset = fbb.createByteVector(bb2);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject6 = Monster.getRootAsMonster(fbb.dataBuffer());
+    int[] ints = new int[] {5, 124, 118, -1};
+    float[] floats = new float[] {5.5f, 124.124f, 118.118f, -1.1f};
+    String[] strings = new String[] {"This", "is", "a", "typed", "array"};
+    boolean[] booleans = new boolean[] {false, true, true, false};
 
-      assertThat(monsterObject6.inventoryLength()).isEqualTo(512);
-      assertThat((Integer) monsterObject6.inventory(0)).isEqualTo((int) largeData[512]);
+    FlexBuffersBuilder builder =
+        new FlexBuffersBuilder(ByteBuffer.allocate(512), FlexBuffersBuilder.BUILDER_FLAG_NONE);
 
-      fbb.clear();
-        bb = ByteBuffer.wrap(largeData);
-        bb.limit(256);
-        offset = fbb.createByteVector(bb);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject7 = Monster.getRootAsMonster(fbb.dataBuffer());
+    int mapPos = builder.startMap();
 
-      assertThat(monsterObject7.inventoryLength()).isEqualTo(256);
+    int vecPos = builder.startVector();
+    for (final int i : ints) {
+      builder.putInt(i);
+    }
+    builder.endVector("ints", vecPos, true, false);
 
-      fbb.clear();
-        bb = ByteBuffer.allocateDirect(2048);
-        offset = fbb.createByteVector(bb);
-        str = fbb.createString("ByteMonster");
-        Monster.startMonster(fbb);
-        Monster.addName(fbb, str);
-        Monster.addInventory(fbb, offset);
-        monster1 = Monster.endMonster(fbb);
-        Monster.finishMonsterBuffer(fbb, monster1);
-        Monster monsterObject8 = Monster.getRootAsMonster(fbb.dataBuffer());
+    vecPos = builder.startVector();
+    for (final float i : floats) {
+      builder.putFloat(i);
+    }
+    builder.endVector("floats", vecPos, true, false);
 
-      assertThat(monsterObject8.inventoryLength()).isEqualTo(2048);
+    vecPos = builder.startVector();
+    for (final boolean i : booleans) {
+      builder.putBoolean(i);
+    }
+    builder.endVector("booleans", vecPos, true, false);
+
+    builder.endMap(null, mapPos);
+
+    ByteBuffer b = builder.finish();
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b);
+    assert (r.asMap().get("ints").isTypedVector());
+    assert (r.asMap().get("floats").isTypedVector());
+    assert (r.asMap().get("booleans").isTypedVector());
+  }
+
+  @org.junit.Test
+  public void testSingleElementVector() {
+    FlexBuffersBuilder b = new FlexBuffersBuilder();
+
+    int vecPos = b.startVector();
+    b.putInt(99);
+    b.putString("wow");
+    b.putNull();
+    int vecpos2 = b.startVector();
+    b.putInt(99);
+    b.putString("wow");
+    b.putNull();
+    b.endVector(null, vecpos2, false, false);
+    b.endVector(null, vecPos, false, false);
+    b.finish();
+
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b.getBuffer());
+    assertThat(FlexBuffers.FBT_VECTOR).isEqualTo(r.getType());
+    FlexBuffers.Vector vec = FlexBuffers.getRoot(b.getBuffer()).asVector();
+    assertThat(4).isEqualTo(vec.size());
+    assertThat(99).isEqualTo(vec.get(0).asInt());
+    assertThat("wow").isEqualTo(vec.get(1).asString());
+    assertThat(true).isEqualTo(vec.get(2).isNull());
+    assertThat("[ 99, \"wow\", null ]").isEqualTo(vec.get(3).toString());
+    assertThat("[ 99, \"wow\", null, [ 99, \"wow\", null ] ]")
+        .isEqualTo(FlexBuffers.getRoot(b.getBuffer()).toString());
+  }
+
+  @org.junit.Test
+  public void testSingleElementMap() {
+    FlexBuffersBuilder b = new FlexBuffersBuilder();
+
+    int mapPost = b.startMap();
+    b.putInt("myInt", 0x7fffffbbbfffffffL);
+    b.putString("myString", "wow");
+    b.putString("myString2", "incredible");
+    b.putNull("myNull");
+    int start = b.startVector();
+    b.putInt(99);
+    b.putString("wow");
+    b.endVector("myVec", start, false, false);
+
+    b.putFloat("double", 0x1.ffffbbbffffffP+1023);
+    b.endMap(null, mapPost);
+    b.finish();
+
+    FlexBuffers.Reference r = FlexBuffers.getRoot(b.getBuffer());
+    assertThat(FlexBuffers.FBT_MAP).isEqualTo(r.getType());
+    FlexBuffers.Map map = FlexBuffers.getRoot(b.getBuffer()).asMap();
+    assertThat(6).isEqualTo(map.size());
+    assertThat(0x7fffffbbbfffffffL).isEqualTo(map.get("myInt").asLong());
+    assertThat("wow").isEqualTo(map.get("myString").asString());
+    assertThat("incredible").isEqualTo(map.get("myString2").asString());
+    assertThat(true).isEqualTo(map.get("myNull").isNull());
+    assertThat(99).isEqualTo(map.get("myVec").asVector().get(0).asInt());
+    assertThat("wow").isEqualTo(map.get("myVec").asVector().get(1).asString());
+    assertThat(Double.compare(0x1.ffffbbbffffffP+1023, map.get("double").asFloat())).isEqualTo(0);
+    assertThat(
+            "{ \"double\" : 1.7976894783391937E308, \"myInt\" : 9223371743723257855, \"myNull\" :"
+                + " null, \"myString\" : \"wow\", \"myString2\" : \"incredible\", \"myVec\" : [ 99,"
+                + " \"wow\" ] }")
+        .isEqualTo(FlexBuffers.getRoot(b.getBuffer()).toString());
+  }
+
+  @org.junit.Test
+  public void testFlexBuferEmpty() {
+    FlexBuffers.Blob blob = FlexBuffers.Blob.empty();
+    FlexBuffers.Map ary = FlexBuffers.Map.empty();
+    FlexBuffers.Vector map = FlexBuffers.Vector.empty();
+    FlexBuffers.TypedVector typedAry = FlexBuffers.TypedVector.empty();
+    assertThat(blob.size()).isEqualTo(0);
+    assertThat(map.size()).isEqualTo(0);
+    assertThat(ary.size()).isEqualTo(0);
+    assertThat(typedAry.size()).isEqualTo(0);
+  }
+
+  @org.junit.Test
+  public void testHashMapToMap() {
+    int entriesCount = 12;
+
+    HashMap<String, String> source = new HashMap<>();
+    for (int i = 0; i < entriesCount; i++) {
+      source.put("foo_param_" + i, "foo_value_" + i);
     }
 
-    @org.junit.Test public void TestSharedStringPool() {
-        FlatBufferBuilder fb = new FlatBufferBuilder(1);
-        String testString = "My string";
-        int offset = fb.createSharedString(testString);
-        for (int i=0; i< 10; i++) {
-          assertThat(offset).isEqualTo(fb.createSharedString(testString));
-        }
+    FlexBuffersBuilder builder = new FlexBuffersBuilder(1000);
+    int mapStart = builder.startMap();
+    for (Map.Entry<String, String> entry : source.entrySet()) {
+      builder.putString(entry.getKey(), entry.getValue());
+    }
+    builder.endMap(null, mapStart);
+    ByteBuffer bb = builder.finish();
+    bb.rewind();
+
+    FlexBuffers.Reference rootReference = FlexBuffers.getRoot(bb);
+
+    assertThat(rootReference.isMap()).isTrue();
+
+    FlexBuffers.Map flexMap = rootReference.asMap();
+
+    FlexBuffers.KeyVector keys = flexMap.keys();
+    FlexBuffers.Vector values = flexMap.values();
+
+    assertThat(entriesCount).isEqualTo(keys.size());
+    assertThat(entriesCount).isEqualTo(values.size());
+
+    HashMap<String, String> result = new HashMap<>();
+    for (int i = 0; i < keys.size(); i++) {
+      result.put(keys.get(i).toString(), values.get(i).asString());
     }
 
-    @org.junit.Test public void TestScalarOptional() {
-        FlatBufferBuilder fbb = new FlatBufferBuilder(1);
-        ScalarStuff.startScalarStuff(fbb);
-        int pos = ScalarStuff.endScalarStuff(fbb);
-        fbb.finish(pos);
+    assertThat(source).isEqualTo(result);
+  }
 
-        ScalarStuff scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer());
-      assertThat(scalarStuff.justI8()).isEqualTo((byte)0);
-      assertThat(scalarStuff.maybeI8()).isEqualTo((byte)0);
-      assertThat(scalarStuff.defaultI8()).isEqualTo((byte)42);
-      assertThat(scalarStuff.justU8()).isEqualTo(0);
-      assertThat(scalarStuff.maybeU8()).isEqualTo(0);
-      assertThat(scalarStuff.defaultU8()).isEqualTo(42);
-      assertThat(scalarStuff.justI16()).isEqualTo((short)0);
-      assertThat(scalarStuff.maybeI16()).isEqualTo((short)0);
-      assertThat(scalarStuff.defaultI16()).isEqualTo((short)42);
-      assertThat(scalarStuff.justU16()).isEqualTo(0);
-      assertThat(scalarStuff.maybeU16()).isEqualTo(0);
-      assertThat(scalarStuff.defaultU16()).isEqualTo(42);
-      assertThat(scalarStuff.justI32()).isEqualTo(0);
-      assertThat(scalarStuff.maybeI32()).isEqualTo(0);
-      assertThat(scalarStuff.defaultI32()).isEqualTo(42);
-      assertThat(scalarStuff.justU32()).isEqualTo(0L);
-      assertThat(scalarStuff.maybeU32()).isEqualTo(0L);
-      assertThat(scalarStuff.defaultU32()).isEqualTo(42L);
-      assertThat(scalarStuff.justI64()).isEqualTo(0L);
-      assertThat(scalarStuff.maybeI64()).isEqualTo(0L);
-      assertThat(scalarStuff.defaultI64()).isEqualTo(42L);
-      assertThat(scalarStuff.justU64()).isEqualTo(0L);
-      assertThat(scalarStuff.maybeU64()).isEqualTo(0L);
-      assertThat(scalarStuff.defaultU64()).isEqualTo(42L);
-      assertThat(scalarStuff.justF32()).isEqualTo(0.0f);
-      assertThat(scalarStuff.maybeF32()).isEqualTo(0f);
-      assertThat(scalarStuff.defaultF32()).isEqualTo(42.0f);
-      assertThat(scalarStuff.justF64()).isEqualTo(0.0);
-      assertThat(scalarStuff.maybeF64()).isEqualTo(0.0);
-      assertThat(scalarStuff.defaultF64()).isEqualTo(42.0);
-      assertThat(scalarStuff.justBool()).isFalse();
-      assertThat(scalarStuff.maybeBool()).isFalse();
-      assertThat(scalarStuff.defaultBool()).isTrue();
-      assertThat(scalarStuff.justEnum()).isEqualTo(OptionalByte.None);
-      assertThat(scalarStuff.maybeEnum()).isEqualTo(OptionalByte.None);
-      assertThat(scalarStuff.defaultEnum()).isEqualTo(OptionalByte.One);
+  @org.junit.Test
+  public void testBuilderGrowth() {
+    FlexBuffersBuilder builder = new FlexBuffersBuilder();
+    String someString = "This is a small string";
+    builder.putString(someString);
+    ByteBuffer b = builder.finish();
+    assertThat(someString).isEqualTo(FlexBuffers.getRoot(b).asString());
 
-      assertThat(scalarStuff.hasMaybeI8()).isFalse();
-      assertThat(scalarStuff.hasMaybeI16()).isFalse();
-      assertThat(scalarStuff.hasMaybeI32()).isFalse();
-      assertThat(scalarStuff.hasMaybeI64()).isFalse();
-      assertThat(scalarStuff.hasMaybeU8()).isFalse();
-      assertThat(scalarStuff.hasMaybeU16()).isFalse();
-      assertThat(scalarStuff.hasMaybeU32()).isFalse();
-      assertThat(scalarStuff.hasMaybeU64()).isFalse();
-      assertThat(scalarStuff.hasMaybeF32()).isFalse();
-      assertThat(scalarStuff.hasMaybeF64()).isFalse();
-      assertThat(scalarStuff.hasMaybeBool()).isFalse();
-      assertThat(scalarStuff.hasMaybeEnum()).isFalse();
+    FlexBuffersBuilder failBuilder = new FlexBuffersBuilder(ByteBuffer.allocate(1));
+    failBuilder.putString(someString);
+  }
 
-      fbb.clear();
+  @org.junit.Test
+  public void testFlexBuffersUtf8Map() {
+    FlexBuffersBuilder builder =
+        new FlexBuffersBuilder(
+            ByteBuffer.allocate(512), FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
 
-        ScalarStuff.startScalarStuff(fbb);
-        ScalarStuff.addJustI8(fbb, (byte)5);
-        ScalarStuff.addMaybeI8(fbb, (byte)5);
-        ScalarStuff.addDefaultI8(fbb, (byte)5);
-        ScalarStuff.addJustU8(fbb, 6);
-        ScalarStuff.addMaybeU8(fbb, 6);
-        ScalarStuff.addDefaultU8(fbb, 6);
-        ScalarStuff.addJustI16(fbb, (short)7);
-        ScalarStuff.addMaybeI16(fbb, (short)7);
-        ScalarStuff.addDefaultI16(fbb, (short)7);
-        ScalarStuff.addJustU16(fbb, 8);
-        ScalarStuff.addMaybeU16(fbb, 8);
-        ScalarStuff.addDefaultU16(fbb, 8);
-        ScalarStuff.addJustI32(fbb, 9);
-        ScalarStuff.addMaybeI32(fbb, 9);
-        ScalarStuff.addDefaultI32(fbb, 9);
-        ScalarStuff.addJustU32(fbb, (long)10);
-        ScalarStuff.addMaybeU32(fbb, (long)10);
-        ScalarStuff.addDefaultU32(fbb, (long)10);
-        ScalarStuff.addJustI64(fbb, 11L);
-        ScalarStuff.addMaybeI64(fbb, 11L);
-        ScalarStuff.addDefaultI64(fbb, 11L);
-        ScalarStuff.addJustU64(fbb, 12L);
-        ScalarStuff.addMaybeU64(fbb, 12L);
-        ScalarStuff.addDefaultU64(fbb, 12L);
-        ScalarStuff.addJustF32(fbb, 13.0f);
-        ScalarStuff.addMaybeF32(fbb, 13.0f);
-        ScalarStuff.addDefaultF32(fbb, 13.0f);
-        ScalarStuff.addJustF64(fbb, 14.0);
-        ScalarStuff.addMaybeF64(fbb, 14.0);
-        ScalarStuff.addDefaultF64(fbb, 14.0);
-        ScalarStuff.addJustBool(fbb, true);
-        ScalarStuff.addMaybeBool(fbb, true);
-        ScalarStuff.addDefaultBool(fbb, true);
-        ScalarStuff.addJustEnum(fbb, OptionalByte.Two);
-        ScalarStuff.addMaybeEnum(fbb, OptionalByte.Two);
-        ScalarStuff.addDefaultEnum(fbb, OptionalByte.Two);
+    String key0 = "😨 face1";
+    String key1 = "😩 face2";
+    String key2 = "😨 face3";
+    String key3 = "trademark ®";
+    String key4 = "€ euro";
+    String utf8keys[] = {"😨 face1", "😩 face2", "😨 face3", "trademark ®", "€ euro"};
 
-        pos = ScalarStuff.endScalarStuff(fbb);
+    int map = builder.startMap();
 
-        fbb.finish(pos);
+    for (int i = 0; i < utf8keys.length; i++) {
+      builder.putString(utf8keys[i], utf8keys[i]); // Testing key and string reuse.
+    }
+    builder.endMap(null, map);
+    builder.finish();
 
-        scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer());
+    FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
 
-      assertThat(scalarStuff.justI8()).isEqualTo((byte)5);
-      assertThat(scalarStuff.maybeI8()).isEqualTo((byte)5);
-      assertThat(scalarStuff.defaultI8()).isEqualTo((byte)5);
-      assertThat(scalarStuff.justU8()).isEqualTo(6);
-      assertThat(scalarStuff.maybeU8()).isEqualTo(6);
-      assertThat(scalarStuff.defaultU8()).isEqualTo(6);
-      assertThat(scalarStuff.justI16()).isEqualTo((short)7);
-      assertThat(scalarStuff.maybeI16()).isEqualTo((short)7);
-      assertThat(scalarStuff.defaultI16()).isEqualTo((short)7);
-      assertThat(scalarStuff.justU16()).isEqualTo(8);
-      assertThat(scalarStuff.maybeU16()).isEqualTo(8);
-      assertThat(scalarStuff.defaultU16()).isEqualTo(8);
-      assertThat(scalarStuff.justI32()).isEqualTo(9);
-      assertThat(scalarStuff.maybeI32()).isEqualTo(9);
-      assertThat(scalarStuff.defaultI32()).isEqualTo(9);
-      assertThat(scalarStuff.justU32()).isEqualTo(10L);
-      assertThat(scalarStuff.maybeU32()).isEqualTo(10L);
-      assertThat(scalarStuff.defaultU32()).isEqualTo(10L);
-      assertThat(scalarStuff.justI64()).isEqualTo(11L);
-      assertThat(scalarStuff.maybeI64()).isEqualTo(11L);
-      assertThat(scalarStuff.defaultI64()).isEqualTo(11L);
-      assertThat(scalarStuff.justU64()).isEqualTo(12L);
-      assertThat(scalarStuff.maybeU64()).isEqualTo(12L);
-      assertThat(scalarStuff.defaultU64()).isEqualTo(12L);
-      assertThat(scalarStuff.justF32()).isEqualTo(13.0f);
-      assertThat(scalarStuff.maybeF32()).isEqualTo(13.0f);
-      assertThat(scalarStuff.defaultF32()).isEqualTo(13.0f);
-      assertThat(scalarStuff.justF64()).isEqualTo(14.0);
-      assertThat(scalarStuff.maybeF64()).isEqualTo(14.0);
-      assertThat(scalarStuff.defaultF64()).isEqualTo(14.0);
-      assertThat(scalarStuff.justBool()).isTrue();
-      assertThat(scalarStuff.maybeBool()).isTrue();
-      assertThat(scalarStuff.defaultBool()).isTrue();
-      assertThat(scalarStuff.justEnum()).isEqualTo(OptionalByte.Two);
-      assertThat(scalarStuff.maybeEnum()).isEqualTo(OptionalByte.Two);
-      assertThat(scalarStuff.defaultEnum()).isEqualTo(OptionalByte.Two);
+    assertThat(m.size()).isEqualTo(5);
 
-      assertThat(scalarStuff.hasMaybeI8()).isTrue();
-      assertThat(scalarStuff.hasMaybeI16()).isTrue();
-      assertThat(scalarStuff.hasMaybeI32()).isTrue();
-      assertThat(scalarStuff.hasMaybeI64()).isTrue();
-      assertThat(scalarStuff.hasMaybeU8()).isTrue();
-      assertThat(scalarStuff.hasMaybeU16()).isTrue();
-      assertThat(scalarStuff.hasMaybeU32()).isTrue();
-      assertThat(scalarStuff.hasMaybeU64()).isTrue();
-      assertThat(scalarStuff.hasMaybeF32()).isTrue();
-      assertThat(scalarStuff.hasMaybeF64()).isTrue();
-      assertThat(scalarStuff.hasMaybeBool()).isTrue();
-      assertThat(scalarStuff.hasMaybeEnum()).isTrue();
+    KeyVector kv = m.keys();
+    for (int i = 0; i < utf8keys.length; i++) {
+      assertThat(kv.get(i).toString()).isEqualTo(m.get(i).asString());
     }
 
-    static void TestObject(MonsterT monster) {
-      assertThat(monster.getHp()).isEqualTo((short) 80);
-      // default
-      assertThat(monster.getMana()).isEqualTo((short) 150);
+    assertThat(m.get(key0).asString()).isEqualTo(utf8keys[0]);
+    assertThat(m.get(key1).asString()).isEqualTo(utf8keys[1]);
+    assertThat(m.get(key2).asString()).isEqualTo(utf8keys[2]);
+    assertThat(m.get(key3).asString()).isEqualTo(utf8keys[3]);
+    assertThat(m.get(key4).asString()).isEqualTo(utf8keys[4]);
+  }
 
-      assertThat(monster.getName()).isEqualTo("MyMonster");
-      assertThat(monster.getColor()).isEqualTo((Integer) Color.Blue);
-      // monster.friendly() // can't access, deprecated
+  @org.junit.Test
+  public void testFlexBuffersMapLookup() {
+    FlexBuffersBuilder builder =
+        new FlexBuffersBuilder(
+            ByteBuffer.allocate(512), FlexBuffersBuilder.BUILDER_FLAG_SHARE_KEYS_AND_STRINGS);
 
-        Vec3T pos = monster.getPos();
-      assertThat(pos.getX()).isEqualTo(1.0f);
-      assertThat(pos.getY()).isEqualTo(2.0f);
-      assertThat(pos.getZ()).isEqualTo(3.0f);
-      assertThat(pos.getTest1()).isEqualTo(3.0);
-      // issue: int != byte
-      assertThat(pos.getTest2()).isEqualTo((int) Color.Green);
-      TestT t = pos.getTest3();
-      assertThat(t.getA()).isEqualTo((short) 5);
-      assertThat(t.getB()).isEqualTo((byte) 6);
+    String key0 = "123";
+    String key1 = "1234";
+    String key2 = "12345";
+    String[] keys = new String[] {key0, key1, key2};
 
-      assertThat(monster.getTest().getType()).isEqualTo((byte) Any.Monster);
-      MonsterT monster2 = (MonsterT) monster.getTest().getValue();
-      assertThat(monster2 != null).isTrue();
-      assertThat(monster2.getName()).isEqualTo("Fred");
+    int map = builder.startMap();
 
-      int[] inv = monster.getInventory();
-      assertThat(inv.length).isEqualTo(5);
-      int[] expInv = {0, 1, 2, 3, 4};
-        for (int i = 0; i < inv.length; i++)
-          assertThat(expInv[i]).isEqualTo(inv[i]);
+    for (int i = 0; i < keys.length; i++) {
+      builder.putString(keys[i], keys[i]); // Testing key and string reuse.
+    }
+    builder.endMap(null, map);
+    builder.finish();
 
-        TestT[] test4 = monster.getTest4();
-        TestT test_0 = test4[0];
-        TestT test_1 = test4[1];
-      assertThat(test4.length).isEqualTo(2);
-      assertThat(test_0.getA()).isEqualTo((short) 10);
-      assertThat(test_0.getB()).isEqualTo((byte) 20);
-      assertThat(test_1.getA()).isEqualTo((short) 30);
-      assertThat(test_1.getB()).isEqualTo((byte) 40);
+    FlexBuffers.Map m = FlexBuffers.getRoot(builder.getBuffer()).asMap();
+    for (int i = 0; i < keys.length; i++) {
+      assertThat(m.get(keys[i]).asString()).isEqualTo(keys[i]);
+      assertThat(m.get(keys[i].getBytes(StandardCharsets.UTF_8)).asString()).isEqualTo(keys[i]);
+    }
+  }
 
-      String[] testarrayofstring = monster.getTestarrayofstring();
-      assertThat(testarrayofstring.length).isEqualTo(2);
-      assertThat(testarrayofstring[0]).isEqualTo("test1");
-      assertThat(testarrayofstring[1]).isEqualTo("test2");
+  @org.junit.Test
+  public void TestDictionaryLookup() {
+    FlatBufferBuilder fbb = new FlatBufferBuilder(16);
+    int lfIndex = LongFloatEntry.createLongFloatEntry(fbb, 0, 99);
+    int vectorEntriesIdx = LongFloatMap.createEntriesVector(fbb, new int[] {lfIndex});
+    int rootIdx = LongFloatMap.createLongFloatMap(fbb, vectorEntriesIdx);
 
-      MonsterT[] testarrayoftables = monster.getTestarrayoftables();
-      assertThat(testarrayoftables.length).isEqualTo(0);
+    LongFloatMap.finishLongFloatMapBuffer(fbb, rootIdx);
+    LongFloatMap map = LongFloatMap.getRootAsLongFloatMap(fbb.dataBuffer());
+    assertThat(map.entriesLength()).isEqualTo(1);
 
-      MonsterT enemy = monster.getEnemy();
-      assertThat(enemy != null).isTrue();
-      assertThat(enemy.getName()).isEqualTo("Fred");
+    LongFloatEntry e = map.entries(0);
+    assertThat(e.key()).isEqualTo(0L);
+    assertThat(e.value()).isEqualTo(99.0f);
 
-      int[] testnestedflatbuffer = monster.getTestnestedflatbuffer();
-      assertThat(testnestedflatbuffer.length).isEqualTo(0);
+    LongFloatEntry e2 = map.entriesByKey(0);
+    assertThat(e2.key()).isEqualTo(0L);
+    assertThat(e2.value()).isEqualTo(99.0f);
+  }
 
-      assertThat(monster.getTestempty() == null).isTrue();
+  @org.junit.Test
+  public void TestVectorOfBytes() {
+    FlatBufferBuilder fbb = new FlatBufferBuilder(16);
+    int str = fbb.createString("ByteMonster");
+    byte[] data = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+    int offset = Monster.createInventoryVector(fbb, data);
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    int monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer());
 
-      assertThat(monster.getTestbool()).isTrue();
+    assertThat(monsterObject.inventoryLength()).isEqualTo(data.length);
+    assertThat((Integer) monsterObject.inventory(4)).isEqualTo((int) data[4]);
+    assertThat(ByteBuffer.wrap(data)).isEqualTo(monsterObject.inventoryAsByteBuffer());
 
-      boolean[] testarrayofbools = monster.getTestarrayofbools();
-      assertThat(testarrayofbools.length).isEqualTo(3);
-      assertThat(testarrayofbools[0]).isTrue();
-      assertThat(testarrayofbools[1]).isFalse();
-      assertThat(testarrayofbools[2]).isTrue();
+    fbb.clear();
+    ByteBuffer bb = ByteBuffer.wrap(data);
+    offset = fbb.createByteVector(bb);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject2 = Monster.getRootAsMonster(fbb.dataBuffer());
 
-      assertThat(monster.getTestf()).isEqualTo(3.14159f);
-      assertThat(monster.getTestf2()).isEqualTo(3.0f);
-      assertThat(monster.getTestf3()).isEqualTo(0.0f);
-      assertThat(monster.getTestf3()).isEqualTo(0.0f);
-
-      AbilityT[] testarrayofsortedstruct = monster.getTestarrayofsortedstruct();
-      assertThat(testarrayofsortedstruct.length).isEqualTo(3);
-      assertThat(testarrayofsortedstruct[0].getId()).isEqualTo((long) 0);
-      assertThat(testarrayofsortedstruct[1].getId()).isEqualTo((long) 1);
-      assertThat(testarrayofsortedstruct[2].getId()).isEqualTo((long) 5);
-      assertThat(testarrayofsortedstruct[0].getDistance()).isEqualTo((long) 45);
-      assertThat(testarrayofsortedstruct[1].getDistance()).isEqualTo((long) 21);
-      assertThat(testarrayofsortedstruct[2].getDistance()).isEqualTo((long) 12);
-
-      int[] flex = monster.getFlex();
-      assertThat(flex.length).isEqualTo(0);
-
-      long[] vectorOfLongs = monster.getVectorOfLongs();
-      assertThat(vectorOfLongs.length).isEqualTo(5);
-      long l = 1;
-        for (int i = 0; i < vectorOfLongs.length; i++) {
-          assertThat(vectorOfLongs[i]).isEqualTo(l);
-          l *= 100;
-        }
-
-        double[] vectorOfDoubles = monster.getVectorOfDoubles();
-      assertThat(vectorOfDoubles.length).isEqualTo(3);
-      assertThat(vectorOfDoubles[0]).isEqualTo(-1.7976931348623157E308);
-      assertThat(vectorOfDoubles[1]).isEqualTo(0.0);
-      assertThat(vectorOfDoubles[2]).isEqualTo(1.7976931348623157E308);
-
-      assertThat(monster.getParentNamespaceTest() == null).isTrue();
-      ReferrableT[] vectorOfReferrables = monster.getVectorOfReferrables();
-      assertThat(vectorOfReferrables.length).isEqualTo(0);
-
-      assertThat(monster.getSignedEnum()).isEqualTo((byte) -1);
+    assertThat(monsterObject2.inventoryLength()).isEqualTo(data.length);
+    for (int i = 0; i < data.length; i++) {
+      assertThat((Integer) monsterObject2.inventory(i)).isEqualTo((int) bb.get(i));
     }
 
-    static void TestPackUnpack(ByteBuffer bb) {
-        Monster m = Monster.getRootAsMonster(bb);
-        MonsterT mObject = m.unpack();
-        TestObject(mObject);
-        FlatBufferBuilder fbb = new FlatBufferBuilder();
-        int monster = Monster.pack(fbb, mObject);
-        Monster.finishMonsterBuffer(fbb, monster);
-        TestBuffer(fbb.dataBuffer());
+    fbb.clear();
+    offset = fbb.createByteVector(data, 3, 4);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject3 = Monster.getRootAsMonster(fbb.dataBuffer());
 
-        byte[] bytes = mObject.serializeToBinary();
-        MonsterT newMonsterT = MonsterT.deserializeFromBinary(bytes);
-        TestObject(newMonsterT);
+    assertThat(monsterObject3.inventoryLength()).isEqualTo(4);
+    assertThat((Integer) monsterObject3.inventory(0)).isEqualTo((int) data[3]);
+
+    fbb.clear();
+    bb = ByteBuffer.wrap(data);
+    offset = Monster.createInventoryVector(fbb, bb);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject4 = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat(monsterObject4.inventoryLength()).isEqualTo(data.length);
+    assertThat((Integer) monsterObject4.inventory(8)).isEqualTo((int) 8);
+
+    fbb.clear();
+    byte[] largeData = new byte[1024];
+    offset = fbb.createByteVector(largeData);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject5 = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat(monsterObject5.inventoryLength()).isEqualTo(largeData.length);
+    assertThat((Integer) monsterObject5.inventory(25)).isEqualTo((int) largeData[25]);
+
+    fbb.clear();
+    bb = ByteBuffer.wrap(largeData);
+    bb.position(512);
+    ByteBuffer bb2 = bb.slice();
+    assertThat(bb2.arrayOffset()).isEqualTo(512);
+    offset = fbb.createByteVector(bb2);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject6 = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat(monsterObject6.inventoryLength()).isEqualTo(512);
+    assertThat((Integer) monsterObject6.inventory(0)).isEqualTo((int) largeData[512]);
+
+    fbb.clear();
+    bb = ByteBuffer.wrap(largeData);
+    bb.limit(256);
+    offset = fbb.createByteVector(bb);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject7 = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat(monsterObject7.inventoryLength()).isEqualTo(256);
+
+    fbb.clear();
+    bb = ByteBuffer.allocateDirect(2048);
+    offset = fbb.createByteVector(bb);
+    str = fbb.createString("ByteMonster");
+    Monster.startMonster(fbb);
+    Monster.addName(fbb, str);
+    Monster.addInventory(fbb, offset);
+    monster1 = Monster.endMonster(fbb);
+    Monster.finishMonsterBuffer(fbb, monster1);
+    Monster monsterObject8 = Monster.getRootAsMonster(fbb.dataBuffer());
+
+    assertThat(monsterObject8.inventoryLength()).isEqualTo(2048);
+  }
+
+  @org.junit.Test
+  public void TestSharedStringPool() {
+    FlatBufferBuilder fb = new FlatBufferBuilder(1);
+    String testString = "My string";
+    int offset = fb.createSharedString(testString);
+    for (int i = 0; i < 10; i++) {
+      assertThat(offset).isEqualTo(fb.createSharedString(testString));
     }
+  }
+
+  @org.junit.Test
+  public void TestScalarOptional() {
+    FlatBufferBuilder fbb = new FlatBufferBuilder(1);
+    ScalarStuff.startScalarStuff(fbb);
+    int pos = ScalarStuff.endScalarStuff(fbb);
+    fbb.finish(pos);
+
+    ScalarStuff scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer());
+    assertThat(scalarStuff.justI8()).isEqualTo((byte) 0);
+    assertThat(scalarStuff.maybeI8()).isEqualTo((byte) 0);
+    assertThat(scalarStuff.defaultI8()).isEqualTo((byte) 42);
+    assertThat(scalarStuff.justU8()).isEqualTo(0);
+    assertThat(scalarStuff.maybeU8()).isEqualTo(0);
+    assertThat(scalarStuff.defaultU8()).isEqualTo(42);
+    assertThat(scalarStuff.justI16()).isEqualTo((short) 0);
+    assertThat(scalarStuff.maybeI16()).isEqualTo((short) 0);
+    assertThat(scalarStuff.defaultI16()).isEqualTo((short) 42);
+    assertThat(scalarStuff.justU16()).isEqualTo(0);
+    assertThat(scalarStuff.maybeU16()).isEqualTo(0);
+    assertThat(scalarStuff.defaultU16()).isEqualTo(42);
+    assertThat(scalarStuff.justI32()).isEqualTo(0);
+    assertThat(scalarStuff.maybeI32()).isEqualTo(0);
+    assertThat(scalarStuff.defaultI32()).isEqualTo(42);
+    assertThat(scalarStuff.justU32()).isEqualTo(0L);
+    assertThat(scalarStuff.maybeU32()).isEqualTo(0L);
+    assertThat(scalarStuff.defaultU32()).isEqualTo(42L);
+    assertThat(scalarStuff.justI64()).isEqualTo(0L);
+    assertThat(scalarStuff.maybeI64()).isEqualTo(0L);
+    assertThat(scalarStuff.defaultI64()).isEqualTo(42L);
+    assertThat(scalarStuff.justU64()).isEqualTo(0L);
+    assertThat(scalarStuff.maybeU64()).isEqualTo(0L);
+    assertThat(scalarStuff.defaultU64()).isEqualTo(42L);
+    assertThat(scalarStuff.justF32()).isEqualTo(0.0f);
+    assertThat(scalarStuff.maybeF32()).isEqualTo(0f);
+    assertThat(scalarStuff.defaultF32()).isEqualTo(42.0f);
+    assertThat(scalarStuff.justF64()).isEqualTo(0.0);
+    assertThat(scalarStuff.maybeF64()).isEqualTo(0.0);
+    assertThat(scalarStuff.defaultF64()).isEqualTo(42.0);
+    assertThat(scalarStuff.justBool()).isFalse();
+    assertThat(scalarStuff.maybeBool()).isFalse();
+    assertThat(scalarStuff.defaultBool()).isTrue();
+    assertThat(scalarStuff.justEnum()).isEqualTo(OptionalByte.None);
+    assertThat(scalarStuff.maybeEnum()).isEqualTo(OptionalByte.None);
+    assertThat(scalarStuff.defaultEnum()).isEqualTo(OptionalByte.One);
+
+    assertThat(scalarStuff.hasMaybeI8()).isFalse();
+    assertThat(scalarStuff.hasMaybeI16()).isFalse();
+    assertThat(scalarStuff.hasMaybeI32()).isFalse();
+    assertThat(scalarStuff.hasMaybeI64()).isFalse();
+    assertThat(scalarStuff.hasMaybeU8()).isFalse();
+    assertThat(scalarStuff.hasMaybeU16()).isFalse();
+    assertThat(scalarStuff.hasMaybeU32()).isFalse();
+    assertThat(scalarStuff.hasMaybeU64()).isFalse();
+    assertThat(scalarStuff.hasMaybeF32()).isFalse();
+    assertThat(scalarStuff.hasMaybeF64()).isFalse();
+    assertThat(scalarStuff.hasMaybeBool()).isFalse();
+    assertThat(scalarStuff.hasMaybeEnum()).isFalse();
+
+    fbb.clear();
+
+    ScalarStuff.startScalarStuff(fbb);
+    ScalarStuff.addJustI8(fbb, (byte) 5);
+    ScalarStuff.addMaybeI8(fbb, (byte) 5);
+    ScalarStuff.addDefaultI8(fbb, (byte) 5);
+    ScalarStuff.addJustU8(fbb, 6);
+    ScalarStuff.addMaybeU8(fbb, 6);
+    ScalarStuff.addDefaultU8(fbb, 6);
+    ScalarStuff.addJustI16(fbb, (short) 7);
+    ScalarStuff.addMaybeI16(fbb, (short) 7);
+    ScalarStuff.addDefaultI16(fbb, (short) 7);
+    ScalarStuff.addJustU16(fbb, 8);
+    ScalarStuff.addMaybeU16(fbb, 8);
+    ScalarStuff.addDefaultU16(fbb, 8);
+    ScalarStuff.addJustI32(fbb, 9);
+    ScalarStuff.addMaybeI32(fbb, 9);
+    ScalarStuff.addDefaultI32(fbb, 9);
+    ScalarStuff.addJustU32(fbb, (long) 10);
+    ScalarStuff.addMaybeU32(fbb, (long) 10);
+    ScalarStuff.addDefaultU32(fbb, (long) 10);
+    ScalarStuff.addJustI64(fbb, 11L);
+    ScalarStuff.addMaybeI64(fbb, 11L);
+    ScalarStuff.addDefaultI64(fbb, 11L);
+    ScalarStuff.addJustU64(fbb, 12L);
+    ScalarStuff.addMaybeU64(fbb, 12L);
+    ScalarStuff.addDefaultU64(fbb, 12L);
+    ScalarStuff.addJustF32(fbb, 13.0f);
+    ScalarStuff.addMaybeF32(fbb, 13.0f);
+    ScalarStuff.addDefaultF32(fbb, 13.0f);
+    ScalarStuff.addJustF64(fbb, 14.0);
+    ScalarStuff.addMaybeF64(fbb, 14.0);
+    ScalarStuff.addDefaultF64(fbb, 14.0);
+    ScalarStuff.addJustBool(fbb, true);
+    ScalarStuff.addMaybeBool(fbb, true);
+    ScalarStuff.addDefaultBool(fbb, true);
+    ScalarStuff.addJustEnum(fbb, OptionalByte.Two);
+    ScalarStuff.addMaybeEnum(fbb, OptionalByte.Two);
+    ScalarStuff.addDefaultEnum(fbb, OptionalByte.Two);
+
+    pos = ScalarStuff.endScalarStuff(fbb);
+
+    fbb.finish(pos);
+
+    scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer());
+
+    assertThat(scalarStuff.justI8()).isEqualTo((byte) 5);
+    assertThat(scalarStuff.maybeI8()).isEqualTo((byte) 5);
+    assertThat(scalarStuff.defaultI8()).isEqualTo((byte) 5);
+    assertThat(scalarStuff.justU8()).isEqualTo(6);
+    assertThat(scalarStuff.maybeU8()).isEqualTo(6);
+    assertThat(scalarStuff.defaultU8()).isEqualTo(6);
+    assertThat(scalarStuff.justI16()).isEqualTo((short) 7);
+    assertThat(scalarStuff.maybeI16()).isEqualTo((short) 7);
+    assertThat(scalarStuff.defaultI16()).isEqualTo((short) 7);
+    assertThat(scalarStuff.justU16()).isEqualTo(8);
+    assertThat(scalarStuff.maybeU16()).isEqualTo(8);
+    assertThat(scalarStuff.defaultU16()).isEqualTo(8);
+    assertThat(scalarStuff.justI32()).isEqualTo(9);
+    assertThat(scalarStuff.maybeI32()).isEqualTo(9);
+    assertThat(scalarStuff.defaultI32()).isEqualTo(9);
+    assertThat(scalarStuff.justU32()).isEqualTo(10L);
+    assertThat(scalarStuff.maybeU32()).isEqualTo(10L);
+    assertThat(scalarStuff.defaultU32()).isEqualTo(10L);
+    assertThat(scalarStuff.justI64()).isEqualTo(11L);
+    assertThat(scalarStuff.maybeI64()).isEqualTo(11L);
+    assertThat(scalarStuff.defaultI64()).isEqualTo(11L);
+    assertThat(scalarStuff.justU64()).isEqualTo(12L);
+    assertThat(scalarStuff.maybeU64()).isEqualTo(12L);
+    assertThat(scalarStuff.defaultU64()).isEqualTo(12L);
+    assertThat(scalarStuff.justF32()).isEqualTo(13.0f);
+    assertThat(scalarStuff.maybeF32()).isEqualTo(13.0f);
+    assertThat(scalarStuff.defaultF32()).isEqualTo(13.0f);
+    assertThat(scalarStuff.justF64()).isEqualTo(14.0);
+    assertThat(scalarStuff.maybeF64()).isEqualTo(14.0);
+    assertThat(scalarStuff.defaultF64()).isEqualTo(14.0);
+    assertThat(scalarStuff.justBool()).isTrue();
+    assertThat(scalarStuff.maybeBool()).isTrue();
+    assertThat(scalarStuff.defaultBool()).isTrue();
+    assertThat(scalarStuff.justEnum()).isEqualTo(OptionalByte.Two);
+    assertThat(scalarStuff.maybeEnum()).isEqualTo(OptionalByte.Two);
+    assertThat(scalarStuff.defaultEnum()).isEqualTo(OptionalByte.Two);
+
+    assertThat(scalarStuff.hasMaybeI8()).isTrue();
+    assertThat(scalarStuff.hasMaybeI16()).isTrue();
+    assertThat(scalarStuff.hasMaybeI32()).isTrue();
+    assertThat(scalarStuff.hasMaybeI64()).isTrue();
+    assertThat(scalarStuff.hasMaybeU8()).isTrue();
+    assertThat(scalarStuff.hasMaybeU16()).isTrue();
+    assertThat(scalarStuff.hasMaybeU32()).isTrue();
+    assertThat(scalarStuff.hasMaybeU64()).isTrue();
+    assertThat(scalarStuff.hasMaybeF32()).isTrue();
+    assertThat(scalarStuff.hasMaybeF64()).isTrue();
+    assertThat(scalarStuff.hasMaybeBool()).isTrue();
+    assertThat(scalarStuff.hasMaybeEnum()).isTrue();
+  }
+
+  static void TestObject(MonsterT monster) {
+    assertThat(monster.getHp()).isEqualTo((short) 80);
+    // default
+    assertThat(monster.getMana()).isEqualTo((short) 150);
+
+    assertThat(monster.getName()).isEqualTo("MyMonster");
+    assertThat(monster.getColor()).isEqualTo((Integer) Color.Blue);
+    // monster.friendly() // can't access, deprecated
+
+    Vec3T pos = monster.getPos();
+    assertThat(pos.getX()).isEqualTo(1.0f);
+    assertThat(pos.getY()).isEqualTo(2.0f);
+    assertThat(pos.getZ()).isEqualTo(3.0f);
+    assertThat(pos.getTest1()).isEqualTo(3.0);
+    // issue: int != byte
+    assertThat(pos.getTest2()).isEqualTo((int) Color.Green);
+    TestT t = pos.getTest3();
+    assertThat(t.getA()).isEqualTo((short) 5);
+    assertThat(t.getB()).isEqualTo((byte) 6);
+
+    assertThat(monster.getTest().getType()).isEqualTo((byte) Any.Monster);
+    MonsterT monster2 = (MonsterT) monster.getTest().getValue();
+    assertThat(monster2 != null).isTrue();
+    assertThat(monster2.getName()).isEqualTo("Fred");
+
+    int[] inv = monster.getInventory();
+    assertThat(inv.length).isEqualTo(5);
+    int[] expInv = {0, 1, 2, 3, 4};
+    for (int i = 0; i < inv.length; i++) assertThat(expInv[i]).isEqualTo(inv[i]);
+
+    TestT[] test4 = monster.getTest4();
+    TestT test_0 = test4[0];
+    TestT test_1 = test4[1];
+    assertThat(test4.length).isEqualTo(2);
+    assertThat(test_0.getA()).isEqualTo((short) 10);
+    assertThat(test_0.getB()).isEqualTo((byte) 20);
+    assertThat(test_1.getA()).isEqualTo((short) 30);
+    assertThat(test_1.getB()).isEqualTo((byte) 40);
+
+    String[] testarrayofstring = monster.getTestarrayofstring();
+    assertThat(testarrayofstring.length).isEqualTo(2);
+    assertThat(testarrayofstring[0]).isEqualTo("test1");
+    assertThat(testarrayofstring[1]).isEqualTo("test2");
+
+    MonsterT[] testarrayoftables = monster.getTestarrayoftables();
+    assertThat(testarrayoftables.length).isEqualTo(0);
+
+    MonsterT enemy = monster.getEnemy();
+    assertThat(enemy != null).isTrue();
+    assertThat(enemy.getName()).isEqualTo("Fred");
+
+    int[] testnestedflatbuffer = monster.getTestnestedflatbuffer();
+    assertThat(testnestedflatbuffer.length).isEqualTo(0);
+
+    assertThat(monster.getTestempty() == null).isTrue();
+
+    assertThat(monster.getTestbool()).isTrue();
+
+    boolean[] testarrayofbools = monster.getTestarrayofbools();
+    assertThat(testarrayofbools.length).isEqualTo(3);
+    assertThat(testarrayofbools[0]).isTrue();
+    assertThat(testarrayofbools[1]).isFalse();
+    assertThat(testarrayofbools[2]).isTrue();
+
+    assertThat(monster.getTestf()).isEqualTo(3.14159f);
+    assertThat(monster.getTestf2()).isEqualTo(3.0f);
+    assertThat(monster.getTestf3()).isEqualTo(0.0f);
+    assertThat(monster.getTestf3()).isEqualTo(0.0f);
+
+    AbilityT[] testarrayofsortedstruct = monster.getTestarrayofsortedstruct();
+    assertThat(testarrayofsortedstruct.length).isEqualTo(3);
+    assertThat(testarrayofsortedstruct[0].getId()).isEqualTo((long) 0);
+    assertThat(testarrayofsortedstruct[1].getId()).isEqualTo((long) 1);
+    assertThat(testarrayofsortedstruct[2].getId()).isEqualTo((long) 5);
+    assertThat(testarrayofsortedstruct[0].getDistance()).isEqualTo((long) 45);
+    assertThat(testarrayofsortedstruct[1].getDistance()).isEqualTo((long) 21);
+    assertThat(testarrayofsortedstruct[2].getDistance()).isEqualTo((long) 12);
+
+    int[] flex = monster.getFlex();
+    assertThat(flex.length).isEqualTo(0);
+
+    long[] vectorOfLongs = monster.getVectorOfLongs();
+    assertThat(vectorOfLongs.length).isEqualTo(5);
+    long l = 1;
+    for (int i = 0; i < vectorOfLongs.length; i++) {
+      assertThat(vectorOfLongs[i]).isEqualTo(l);
+      l *= 100;
+    }
+
+    double[] vectorOfDoubles = monster.getVectorOfDoubles();
+    assertThat(vectorOfDoubles.length).isEqualTo(3);
+    assertThat(vectorOfDoubles[0]).isEqualTo(-1.7976931348623157E308);
+    assertThat(vectorOfDoubles[1]).isEqualTo(0.0);
+    assertThat(vectorOfDoubles[2]).isEqualTo(1.7976931348623157E308);
+
+    assertThat(monster.getParentNamespaceTest() == null).isTrue();
+    ReferrableT[] vectorOfReferrables = monster.getVectorOfReferrables();
+    assertThat(vectorOfReferrables.length).isEqualTo(0);
+
+    assertThat(monster.getSignedEnum()).isEqualTo((byte) -1);
+  }
+
+  static void TestPackUnpack(ByteBuffer bb) {
+    Monster m = Monster.getRootAsMonster(bb);
+    MonsterT mObject = m.unpack();
+    TestObject(mObject);
+    FlatBufferBuilder fbb = new FlatBufferBuilder();
+    int monster = Monster.pack(fbb, mObject);
+    Monster.finishMonsterBuffer(fbb, monster);
+    TestBuffer(fbb.dataBuffer());
+
+    byte[] bytes = mObject.serializeToBinary();
+    MonsterT newMonsterT = MonsterT.deserializeFromBinary(bytes);
+    TestObject(newMonsterT);
+  }
 }
diff --git a/kotlin/benchmark/build.gradle.kts b/kotlin/benchmark/build.gradle.kts
index df4af2b..ce34224 100644
--- a/kotlin/benchmark/build.gradle.kts
+++ b/kotlin/benchmark/build.gradle.kts
@@ -8,6 +8,7 @@
 }
 
 group = "com.google.flatbuffers.jmh"
+
 version = "2.0.0-SNAPSHOT"
 
 // Reads latest version from Java's runtime pom.xml,
@@ -15,10 +16,11 @@
 // runtime
 fun readJavaFlatBufferVersion(): String {
   val pom = XmlParser().parse(File("../java/pom.xml"))
-  val versionTag = pom.children().find {
-    val node = it as groovy.util.Node
-    node.name().toString().contains("version")
-  } as groovy.util.Node
+  val versionTag =
+    pom.children().find {
+      val node = it as groovy.util.Node
+      node.name().toString().contains("version")
+    } as groovy.util.Node
   return versionTag.value().toString()
 }
 
@@ -39,27 +41,26 @@
       iterationTime = 300
       iterationTimeUnit = "ms"
       // uncomment for benchmarking JSON op only
-       include(".*FlatbufferBenchmark.*")
+      include(".*FlatbufferBenchmark.*")
     }
   }
-  targets {
-    register("jvm")
-  }
+  targets { register("jvm") }
 }
 
 kotlin {
   jvm {
     compilations {
-      val main by getting { }
+      val main by getting {}
       // custom benchmark compilation
-      val benchmarks by compilations.creating {
-        defaultSourceSet {
-          dependencies {
-            // Compile against the main compilation's compile classpath and outputs:
-            implementation(main.compileDependencyFiles + main.output.classesDirs)
+      val benchmarks by
+        compilations.creating {
+          defaultSourceSet {
+            dependencies {
+              // Compile against the main compilation's compile classpath and outputs:
+              implementation(main.compileDependencyFiles + main.output.classesDirs)
+            }
           }
         }
-      }
     }
   }
 
@@ -91,17 +92,13 @@
 }
 
 abstract class GenerateFBTestClasses : DefaultTask() {
-  @get:InputFiles
-  abstract val inputFiles: ConfigurableFileCollection
+  @get:InputFiles abstract val inputFiles: ConfigurableFileCollection
 
-  @get:Input
-  abstract val includeFolder: Property<String>
+  @get:Input abstract val includeFolder: Property<String>
 
-  @get:Input
-  abstract val outputFolder: Property<String>
+  @get:Input abstract val outputFolder: Property<String>
 
-  @get:Input
-  abstract val variants: ListProperty<String>
+  @get:Input abstract val variants: ListProperty<String>
 
   @Inject
   protected open fun getExecActionFactory(): org.gradle.process.internal.ExecActionFactory? {
@@ -117,7 +114,7 @@
     val execAction = getExecActionFactory()!!.newExecAction()
     val sources = inputFiles.asPath.split(":")
     val langs = variants.get().map { "--$it" }
-    val args = mutableListOf("flatc","-o", outputFolder.get(), *langs.toTypedArray())
+    val args = mutableListOf("flatc", "-o", outputFolder.get(), *langs.toTypedArray())
     if (includeFolder.get().isNotEmpty()) {
       args.add("-I")
       args.add(includeFolder.get())
diff --git a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlatbufferBenchmark.kt b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlatbufferBenchmark.kt
index a4f3d25..85a0d94 100644
--- a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlatbufferBenchmark.kt
+++ b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlatbufferBenchmark.kt
@@ -2,8 +2,8 @@
 
 package com.google.flatbuffers.kotlin.benchmark
 
-
 import com.google.flatbuffers.kotlin.FlatBufferBuilder
+import java.util.concurrent.TimeUnit
 import jmonster.JAllMonsters
 import jmonster.JColor
 import jmonster.JMonster
@@ -17,7 +17,6 @@
 import monster.Vec3
 import org.openjdk.jmh.annotations.*
 import org.openjdk.jmh.infra.Blackhole
-import java.util.concurrent.TimeUnit
 
 @State(Scope.Benchmark)
 @BenchmarkMode(Mode.AverageTime)
@@ -32,48 +31,55 @@
   val fbDeserializationJava = com.google.flatbuffers.FlatBufferBuilder(1024 * repetition)
 
   init {
-      populateMosterKotlin(fbDeserializationKotlin)
-      populateMosterJava(fbDeserializationJava)
+    populateMosterKotlin(fbDeserializationKotlin)
+    populateMosterJava(fbDeserializationJava)
   }
+
   @OptIn(ExperimentalUnsignedTypes::class)
   private fun populateMosterKotlin(fb: FlatBufferBuilder) {
     fb.clear()
-    val monsterName = fb.createString("MonsterName");
+    val monsterName = fb.createString("MonsterName")
     val items = ubyteArrayOf(0u, 1u, 2u, 3u, 4u)
     val inv = createInventoryVector(fb, items)
-    val monsterOffsets: MonsterOffsetArray = MonsterOffsetArray(repetition) {
-      Monster.startMonster(fb)
-      Monster.addName(fb, monsterName)
-      Monster.addPos(fb, Vec3.createVec3(fb, 1.0f, 2.0f, 3.0f))
-      Monster.addHp(fb, 80)
-      Monster.addMana(fb, 150)
-      Monster.addInventory(fb, inv)
-      Monster.addColor(fb, monster.Color.Red)
-      Monster.endMonster(fb)
-    }
+    val monsterOffsets: MonsterOffsetArray =
+      MonsterOffsetArray(repetition) {
+        Monster.startMonster(fb)
+        Monster.addName(fb, monsterName)
+        Monster.addPos(fb, Vec3.createVec3(fb, 1.0f, 2.0f, 3.0f))
+        Monster.addHp(fb, 80)
+        Monster.addMana(fb, 150)
+        Monster.addInventory(fb, inv)
+        Monster.addColor(fb, monster.Color.Red)
+        Monster.endMonster(fb)
+      }
     val monsters = createMonstersVector(fb, monsterOffsets)
     val allMonsters = createAllMonsters(fb, monsters)
     fb.finish(allMonsters)
   }
 
   @OptIn(ExperimentalUnsignedTypes::class)
-  private fun populateMosterJava(fb: com.google.flatbuffers.FlatBufferBuilder){
+  private fun populateMosterJava(fb: com.google.flatbuffers.FlatBufferBuilder) {
     fb.clear()
-    val monsterName = fb.createString("MonsterName");
+    val monsterName = fb.createString("MonsterName")
     val inv = JMonster.createInventoryVector(fb, ubyteArrayOf(0u, 1u, 2u, 3u, 4u))
-    val monsters = JAllMonsters.createMonstersVector(fb, IntArray(repetition) {
-      JMonster.startJMonster(fb)
-      JMonster.addName(fb, monsterName)
-      JMonster.addPos(fb, JVec3.createJVec3(fb, 1.0f, 2.0f, 3.0f))
-      JMonster.addHp(fb, 80)
-      JMonster.addMana(fb, 150)
-      JMonster.addInventory(fb, inv)
-      JMonster.addColor(fb, JColor.Red)
-      JMonster.endJMonster(fb)
-    })
+    val monsters =
+      JAllMonsters.createMonstersVector(
+        fb,
+        IntArray(repetition) {
+          JMonster.startJMonster(fb)
+          JMonster.addName(fb, monsterName)
+          JMonster.addPos(fb, JVec3.createJVec3(fb, 1.0f, 2.0f, 3.0f))
+          JMonster.addHp(fb, 80)
+          JMonster.addMana(fb, 150)
+          JMonster.addInventory(fb, inv)
+          JMonster.addColor(fb, JColor.Red)
+          JMonster.endJMonster(fb)
+        },
+      )
     val allMonsters = JAllMonsters.createJAllMonsters(fb, monsters)
     fb.finish(allMonsters)
   }
+
   @Benchmark
   fun monstersSerializationKotlin() {
     populateMosterKotlin(fbKotlin)
@@ -100,6 +106,7 @@
       hole.consume(monster.inventory(3))
     }
   }
+
   @Benchmark
   fun monstersSerializationJava() {
     populateMosterJava(fbJava)
@@ -125,5 +132,4 @@
       hole.consume(monster.inventory(3))
     }
   }
-
 }
diff --git a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlexBuffersBenchmark.kt b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlexBuffersBenchmark.kt
index 0378828..474c948 100644
--- a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlexBuffersBenchmark.kt
+++ b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlexBuffersBenchmark.kt
@@ -16,11 +16,13 @@
 @file:OptIn(ExperimentalUnsignedTypes::class)
 
 package com.google.flatbuffers.kotlin.benchmark
+
 import com.google.flatbuffers.ArrayReadWriteBuf
 import com.google.flatbuffers.FlexBuffers
 import com.google.flatbuffers.FlexBuffersBuilder.BUILDER_FLAG_SHARE_ALL
 import com.google.flatbuffers.kotlin.FlexBuffersBuilder
 import com.google.flatbuffers.kotlin.getRoot
+import java.util.concurrent.TimeUnit
 import kotlinx.benchmark.Blackhole
 import org.openjdk.jmh.annotations.Benchmark
 import org.openjdk.jmh.annotations.BenchmarkMode
@@ -30,7 +32,6 @@
 import org.openjdk.jmh.annotations.Scope
 import org.openjdk.jmh.annotations.Setup
 import org.openjdk.jmh.annotations.State
-import java.util.concurrent.TimeUnit
 
 @State(Scope.Benchmark)
 @BenchmarkMode(Mode.AverageTime)
@@ -57,9 +58,7 @@
       this["int"] = 10
       this["float"] = 12.3
       this["intarray"] = bigIntArray
-      this.putMap("myMap") {
-        this["cool"] = "beans"
-      }
+      this.putMap("myMap") { this["cool"] = "beans" }
     }
     val ref = getRoot(kBuilder.finish())
     val map = ref.toMap()
@@ -74,7 +73,11 @@
 
   @Benchmark
   open fun mapJava(blackhole: Blackhole) {
-    val jBuilder = com.google.flatbuffers.FlexBuffersBuilder(ArrayReadWriteBuf(initialCapacity), BUILDER_FLAG_SHARE_ALL)
+    val jBuilder =
+      com.google.flatbuffers.FlexBuffersBuilder(
+        ArrayReadWriteBuf(initialCapacity),
+        BUILDER_FLAG_SHARE_ALL,
+      )
     val startMap = jBuilder.startMap()
     jBuilder.putString("hello", "world")
     jBuilder.putInt("int", 10)
@@ -112,18 +115,18 @@
 
   @Benchmark
   open fun intArrayJava(blackhole: Blackhole) {
-    val jBuilder = com.google.flatbuffers.FlexBuffersBuilder(ArrayReadWriteBuf(initialCapacity), BUILDER_FLAG_SHARE_ALL)
+    val jBuilder =
+      com.google.flatbuffers.FlexBuffersBuilder(
+        ArrayReadWriteBuf(initialCapacity),
+        BUILDER_FLAG_SHARE_ALL,
+      )
     val v = jBuilder.startVector()
     bigIntArray.forEach { jBuilder.putInt(it) }
     jBuilder.endVector(null, v, true, false)
     jBuilder.finish()
     val root = FlexBuffers.getRoot(jBuilder.buffer)
     val vec = root.asVector()
-    blackhole.consume(
-      IntArray(vec.size()) {
-        vec[it].asInt()
-      }
-    )
+    blackhole.consume(IntArray(vec.size()) { vec[it].asInt() })
   }
 
   @Benchmark
@@ -138,7 +141,11 @@
 
   @Benchmark
   open fun stringArrayJava(blackhole: Blackhole) {
-    val jBuilder = com.google.flatbuffers.FlexBuffersBuilder(ArrayReadWriteBuf(initialCapacity), BUILDER_FLAG_SHARE_ALL)
+    val jBuilder =
+      com.google.flatbuffers.FlexBuffersBuilder(
+        ArrayReadWriteBuf(initialCapacity),
+        BUILDER_FLAG_SHARE_ALL,
+      )
     val v = jBuilder.startVector()
     stringValue.forEach { jBuilder.putString(it) }
     jBuilder.endVector(null, v, false, false)
@@ -182,7 +189,11 @@
 
   @Benchmark
   open fun stringMapJava(blackhole: Blackhole) {
-    val jBuilder = com.google.flatbuffers.FlexBuffersBuilder(ArrayReadWriteBuf(initialCapacity), BUILDER_FLAG_SHARE_ALL)
+    val jBuilder =
+      com.google.flatbuffers.FlexBuffersBuilder(
+        ArrayReadWriteBuf(initialCapacity),
+        BUILDER_FLAG_SHARE_ALL,
+      )
     val v = jBuilder.startMap()
     for (i in stringKey.indices) {
       jBuilder.putString(stringKey[i], stringValue[i])
diff --git a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/JsonBenchmark.kt b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/JsonBenchmark.kt
index e39b29f..b9a1fe3 100644
--- a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/JsonBenchmark.kt
+++ b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/JsonBenchmark.kt
@@ -24,6 +24,9 @@
 import com.google.gson.JsonParser
 import com.squareup.moshi.Moshi
 import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
+import java.io.ByteArrayInputStream
+import java.io.InputStreamReader
+import java.util.concurrent.TimeUnit
 import kotlinx.benchmark.Blackhole
 import okio.Buffer
 import org.openjdk.jmh.annotations.Benchmark
@@ -33,9 +36,6 @@
 import org.openjdk.jmh.annotations.OutputTimeUnit
 import org.openjdk.jmh.annotations.Scope
 import org.openjdk.jmh.annotations.State
-import java.io.ByteArrayInputStream
-import java.io.InputStreamReader
-import java.util.concurrent.TimeUnit
 
 @State(Scope.Benchmark)
 @BenchmarkMode(Mode.AverageTime)
@@ -43,9 +43,7 @@
 @Measurement(iterations = 100, time = 1, timeUnit = TimeUnit.MICROSECONDS)
 open class JsonBenchmark {
 
-  final val moshi = Moshi.Builder()
-    .addLast(KotlinJsonAdapterFactory())
-    .build()
+  final val moshi = Moshi.Builder().addLast(KotlinJsonAdapterFactory()).build()
   final val moshiAdapter = moshi.adapter(Map::class.java)
 
   final val gson = Gson()
@@ -77,46 +75,60 @@
 
   // TWITTER
   @Benchmark
-  open fun readTwitterFlexBuffers(hole: Blackhole? = null) = hole?.consume(readFlexBuffers(twitterData))
-  @Benchmark
-  open fun readTwitterMoshi(hole: Blackhole?) = hole?.consume(readMoshi(twitterData))
-  @Benchmark
-  open fun readTwitterGson(hole: Blackhole?) = hole?.consume(readGson(twitterData))
+  open fun readTwitterFlexBuffers(hole: Blackhole? = null) =
+    hole?.consume(readFlexBuffers(twitterData))
+
+  @Benchmark open fun readTwitterMoshi(hole: Blackhole?) = hole?.consume(readMoshi(twitterData))
+
+  @Benchmark open fun readTwitterGson(hole: Blackhole?) = hole?.consume(readGson(twitterData))
 
   @Benchmark
-  open fun roundTripTwitterFlexBuffers(hole: Blackhole? = null) = hole?.consume(readFlexBuffers(twitterData).toJson())
+  open fun roundTripTwitterFlexBuffers(hole: Blackhole? = null) =
+    hole?.consume(readFlexBuffers(twitterData).toJson())
+
   @Benchmark
-  open fun roundTripTwitterMoshi(hole: Blackhole?) = hole?.consume(moshiAdapter.toJson(readMoshi(twitterData)))
+  open fun roundTripTwitterMoshi(hole: Blackhole?) =
+    hole?.consume(moshiAdapter.toJson(readMoshi(twitterData)))
+
   @Benchmark
-  open fun roundTripTwitterGson(hole: Blackhole?) = hole?.consume(gson.toJson(readGson(twitterData)))
+  open fun roundTripTwitterGson(hole: Blackhole?) =
+    hole?.consume(gson.toJson(readGson(twitterData)))
 
   // CITM
   @Benchmark
   open fun readCITMFlexBuffers(hole: Blackhole? = null) = hole?.consume(readFlexBuffers(citmData))
+
   @Benchmark
   open fun readCITMMoshi(hole: Blackhole?) = hole?.consume(moshiAdapter.toJson(readMoshi(citmData)))
+
   @Benchmark
   open fun readCITMGson(hole: Blackhole?) = hole?.consume(gson.toJson(readGson(citmData)))
 
   @Benchmark
-  open fun roundTripCITMFlexBuffers(hole: Blackhole? = null) = hole?.consume(readFlexBuffers(citmData).toJson())
+  open fun roundTripCITMFlexBuffers(hole: Blackhole? = null) =
+    hole?.consume(readFlexBuffers(citmData).toJson())
+
   @Benchmark
-  open fun roundTripCITMMoshi(hole: Blackhole?) = hole?.consume(moshiAdapter.toJson(readMoshi(citmData)))
+  open fun roundTripCITMMoshi(hole: Blackhole?) =
+    hole?.consume(moshiAdapter.toJson(readMoshi(citmData)))
+
   @Benchmark
   open fun roundTripCITMGson(hole: Blackhole?) = hole?.consume(gson.toJson(readGson(citmData)))
 
   @Benchmark
   open fun writeCITMFlexBuffers(hole: Blackhole? = null) = hole?.consume(fbCitmRef.toJson())
+
   @Benchmark
   open fun writeCITMMoshi(hole: Blackhole?) = hole?.consume(moshiAdapter.toJson(moshiCitmRef))
-  @Benchmark
-  open fun writeCITMGson(hole: Blackhole?) = hole?.consume(gson.toJson(gsonCitmRef))
+
+  @Benchmark open fun writeCITMGson(hole: Blackhole?) = hole?.consume(gson.toJson(gsonCitmRef))
 
   // CANADA
   @Benchmark
-  open fun readCanadaFlexBuffers(hole: Blackhole? = null) = hole?.consume(readFlexBuffers(canadaData))
-  @Benchmark
-  open fun readCanadaMoshi(hole: Blackhole?) = hole?.consume(readMoshi(canadaData))
-  @Benchmark
-  open fun readCanadaGson(hole: Blackhole?) = hole?.consume(readGson(canadaData))
+  open fun readCanadaFlexBuffers(hole: Blackhole? = null) =
+    hole?.consume(readFlexBuffers(canadaData))
+
+  @Benchmark open fun readCanadaMoshi(hole: Blackhole?) = hole?.consume(readMoshi(canadaData))
+
+  @Benchmark open fun readCanadaGson(hole: Blackhole?) = hole?.consume(readGson(canadaData))
 }
diff --git a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/UTF8Benchmark.kt b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/UTF8Benchmark.kt
index 4262538..6f65a1c 100644
--- a/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/UTF8Benchmark.kt
+++ b/kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/UTF8Benchmark.kt
@@ -18,6 +18,9 @@
 import com.google.flatbuffers.kotlin.ArrayReadWriteBuffer
 import com.google.flatbuffers.kotlin.Key
 import com.google.flatbuffers.kotlin.Utf8
+import java.nio.ByteBuffer
+import java.util.concurrent.TimeUnit
+import kotlin.random.Random
 import kotlinx.benchmark.Blackhole
 import org.openjdk.jmh.annotations.Benchmark
 import org.openjdk.jmh.annotations.BenchmarkMode
@@ -27,9 +30,6 @@
 import org.openjdk.jmh.annotations.Scope
 import org.openjdk.jmh.annotations.Setup
 import org.openjdk.jmh.annotations.State
-import java.nio.ByteBuffer
-import java.util.concurrent.TimeUnit
-import kotlin.random.Random
 
 @State(Scope.Benchmark)
 @BenchmarkMode(Mode.AverageTime)
@@ -44,9 +44,7 @@
   private var sampleSmallAscii = (0..sampleSize).map { populateAscii(stringSize) }.toList()
   private var sampleSmallAsciiDecoded = sampleSmallAscii.map { it.encodeToByteArray() }.toList()
 
-  @Setup
-  fun setUp() {
-  }
+  @Setup fun setUp() {}
 
   @Benchmark
   fun encodeUtf8KotlinStandard(blackhole: Blackhole) {
@@ -54,6 +52,7 @@
       blackhole.consume(i.encodeToByteArray())
     }
   }
+
   @Benchmark
   fun encodeUtf8KotlinFlatbuffers(blackhole: Blackhole) {
     for (i in sampleSmallUtf8) {
@@ -61,6 +60,7 @@
       blackhole.consume(Utf8.encodeUtf8Array(i, byteArray, 0, byteArray.size))
     }
   }
+
   @Benchmark
   fun encodeUtf8JavaFlatbuffers(blackhole: Blackhole) {
     val javaUtf8 = com.google.flatbuffers.Utf8.getDefault()
@@ -101,6 +101,7 @@
       blackhole.consume(i.encodeToByteArray())
     }
   }
+
   @Benchmark
   fun encodeAsciiKotlinFlatbuffers(blackhole: Blackhole) {
     for (i in sampleSmallAscii) {
@@ -108,6 +109,7 @@
       blackhole.consume(Utf8.encodeUtf8Array(i, byteArray, 0, byteArray.size))
     }
   }
+
   @Benchmark
   fun encodeAsciiJavaFlatbuffers(blackhole: Blackhole) {
     val javaUtf8 = com.google.flatbuffers.Utf8.getDefault()
@@ -179,7 +181,8 @@
     while (i < size) {
       val w = Random.nextInt() and 0xFF
       when {
-        w < 0x80 -> data[i++] = 0x20; // w;
+        w < 0x80 -> data[i++] = 0x20
+        // w;
         w < 0xE0 -> {
           data[i++] = (0xC2 + Random.nextInt() % (0xDF - 0xC2 + 1)).toByte()
           data[i++] = (0x80 + Random.nextInt() % (0xBF - 0x80 + 1)).toByte()
diff --git a/kotlin/build.gradle.kts b/kotlin/build.gradle.kts
index 0daf4e3..2e3ad87 100644
--- a/kotlin/build.gradle.kts
+++ b/kotlin/build.gradle.kts
@@ -1,7 +1,6 @@
-import org.gradle.internal.impldep.org.testng.ITestResult.STARTED
+import java.nio.charset.StandardCharsets
 import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-import java.nio.charset.StandardCharsets
 
 buildscript {
   repositories {
@@ -26,7 +25,8 @@
 
 tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<KotlinCommonOptions>>().configureEach {
   kotlinOptions {
-    freeCompilerArgs += "-progressive" // https://kotlinlang.org/docs/whatsnew13.html#progressive-mode
+    freeCompilerArgs +=
+      "-progressive" // https://kotlinlang.org/docs/whatsnew13.html#progressive-mode
   }
 }
 
diff --git a/kotlin/convention-plugins/build.gradle.kts b/kotlin/convention-plugins/build.gradle.kts
index 52b9cc0..a92e591 100644
--- a/kotlin/convention-plugins/build.gradle.kts
+++ b/kotlin/convention-plugins/build.gradle.kts
@@ -1,7 +1,3 @@
-plugins {
-  `kotlin-dsl`
-}
+plugins { `kotlin-dsl` }
 
-repositories {
-  gradlePluginPortal()
-}
+repositories { gradlePluginPortal() }
diff --git a/kotlin/convention-plugins/src/main/kotlin/convention.publication.gradle.kts b/kotlin/convention-plugins/src/main/kotlin/convention.publication.gradle.kts
index e526279..350b317 100644
--- a/kotlin/convention-plugins/src/main/kotlin/convention.publication.gradle.kts
+++ b/kotlin/convention-plugins/src/main/kotlin/convention.publication.gradle.kts
@@ -1,8 +1,8 @@
+import java.util.*
 import org.gradle.api.publish.maven.MavenPublication
 import org.gradle.api.tasks.bundling.Jar
 import org.gradle.kotlin.dsl.`maven-publish`
 import org.gradle.kotlin.dsl.signing
-import java.util.*
 
 plugins {
   `maven-publish`
@@ -11,21 +11,24 @@
 
 // Stub secrets to let the project sync and build without the publication values set up
 ext["signing.keyId"] = null
+
 ext["signing.password"] = null
+
 ext["signing.secretKeyRingFile"] = null
+
 ext["ossrhUsername"] = null
+
 ext["ossrhPassword"] = null
 
-// Grabbing secrets from local.properties file or from environment variables, which could be used on CI
+// Grabbing secrets from local.properties file or from environment variables, which could be used on
+// CI
 val secretPropsFile = project.rootProject.file("local.properties")
+
 if (secretPropsFile.exists()) {
-  secretPropsFile.reader().use {
-    Properties().apply {
-      load(it)
-    }
-  }.onEach { (name, value) ->
-    ext[name.toString()] = value
-  }
+  secretPropsFile
+    .reader()
+    .use { Properties().apply { load(it) } }
+    .onEach { (name, value) -> ext[name.toString()] = value }
 } else {
   ext["signing.keyId"] = System.getenv("OSSRH_USERNAME")
   ext["signing.password"] = System.getenv("OSSRH_PASSWORD")
@@ -34,9 +37,7 @@
   ext["ossrhPassword"] = System.getenv("OSSRH_PASSWORD")
 }
 
-val javadocJar by tasks.registering(Jar::class) {
-  archiveClassifier.set("javadoc")
-}
+val javadocJar by tasks.registering(Jar::class) { archiveClassifier.set("javadoc") }
 
 fun getExtraString(name: String) = ext[name]?.toString()
 
@@ -82,14 +83,10 @@
           email.set("dbaileychess@gmail.com")
         }
       }
-      scm {
-        url.set("https://github.com/google/flatbuffers")
-      }
+      scm { url.set("https://github.com/google/flatbuffers") }
     }
   }
 }
 
 // Signing artifacts. Signing.* extra properties values will be used
-signing {
-  sign(publishing.publications)
-}
+signing { sign(publishing.publications) }
diff --git a/kotlin/flatbuffers-kotlin/build.gradle.kts b/kotlin/flatbuffers-kotlin/build.gradle.kts
index 1b8d224..42f255d 100644
--- a/kotlin/flatbuffers-kotlin/build.gradle.kts
+++ b/kotlin/flatbuffers-kotlin/build.gradle.kts
@@ -1,29 +1,19 @@
-import org.gradle.internal.impldep.org.fusesource.jansi.AnsiRenderer.test
-import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
-import org.jetbrains.kotlin.cli.common.toBooleanLenient
-import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
-import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
-import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkConfig
-
 plugins {
   kotlin("multiplatform")
   id("convention.publication")
 }
 
-
 val libName = "Flatbuffers"
+
 group = "com.google.flatbuffers.kotlin"
+
 version = "2.0.0-SNAPSHOT"
 
 kotlin {
   explicitApi()
   jvm()
   js(IR) {
-    browser {
-      testTask {
-        enabled = false
-      }
-    }
+    browser { testTask { enabled = false } }
     binaries.executable()
   }
   macosX64()
@@ -32,17 +22,10 @@
   iosSimulatorArm64()
 
   sourceSets {
-
-    val commonMain by getting {
-      dependencies {
-        implementation(kotlin("stdlib-common"))
-      }
-    }
+    val commonMain by getting { dependencies { implementation(kotlin("stdlib-common")) } }
 
     val commonTest by getting {
-      dependencies {
-        implementation(kotlin("test"))
-      }
+      dependencies { implementation(kotlin("test")) }
 
       kotlin.srcDir("src/commonTest/generated/kotlin/")
     }
@@ -52,8 +35,7 @@
         implementation("com.google.flatbuffers:flatbuffers-java:2.0.3")
       }
     }
-    val jvmMain by getting {
-    }
+    val jvmMain by getting {}
 
     val macosX64Main by getting
     val macosArm64Main by getting
@@ -69,53 +51,47 @@
       iosSimulatorArm64Main.dependsOn(this)
     }
 
-    all {
-      languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
-    }
+    all { languageSettings.optIn("kotlin.ExperimentalUnsignedTypes") }
   }
 }
 
 // Fixes JS issue: https://youtrack.jetbrains.com/issue/KT-49109
 rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
-  rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
-
+  rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion =
+    "16.0.0"
 }
 
 // Use the default greeting
 tasks.register<GenerateFBTestClasses>("generateFBTestClassesKt") {
-  inputFiles.setFrom("$rootDir/../tests/monster_test.fbs",
+  inputFiles.setFrom(
+    "$rootDir/../tests/monster_test.fbs",
     "$rootDir/../tests/dictionary_lookup.fbs",
-// @todo Seems like nesting code generation is broken for all generators.
-// disabling test for now.
-//    "$rootDir/../tests/namespace_test/namespace_test1.fbs",
-//    "$rootDir/../tests/namespace_test/namespace_test2.fbs",
+    // @todo Seems like nesting code generation is broken for all generators.
+    // disabling test for now.
+    //    "$rootDir/../tests/namespace_test/namespace_test1.fbs",
+    //    "$rootDir/../tests/namespace_test/namespace_test2.fbs",
     "$rootDir/../tests/union_vector/union_vector.fbs",
-    "$rootDir/../tests/optional_scalars.fbs")
+    "$rootDir/../tests/optional_scalars.fbs",
+  )
   includeFolder.set("$rootDir/../tests/include_test")
   outputFolder.set("${projectDir}/src/commonTest/generated/kotlin/")
   variant.set("kotlin-kmp")
 }
 
-
 project.tasks.forEach {
-  if (it.name.contains("compileKotlin"))
-    it.dependsOn("generateFBTestClassesKt")
+  if (it.name.contains("compileKotlin")) it.dependsOn("generateFBTestClassesKt")
 }
 
 fun String.intProperty() = findProperty(this).toString().toInt()
 
 abstract class GenerateFBTestClasses : DefaultTask() {
-  @get:InputFiles
-  abstract val inputFiles: ConfigurableFileCollection
+  @get:InputFiles abstract val inputFiles: ConfigurableFileCollection
 
-  @get:Input
-  abstract val includeFolder: Property<String>
+  @get:Input abstract val includeFolder: Property<String>
 
-  @get:Input
-  abstract val outputFolder: Property<String>
+  @get:Input abstract val outputFolder: Property<String>
 
-  @get:Input
-  abstract val variant: Property<String>
+  @get:Input abstract val variant: Property<String>
 
   @Inject
   protected open fun getExecActionFactory(): org.gradle.process.internal.ExecActionFactory? {
@@ -130,7 +106,7 @@
   fun compile() {
     val execAction = getExecActionFactory()!!.newExecAction()
     val sources = inputFiles.asPath.split(":")
-    val args = mutableListOf("flatc","-o", outputFolder.get(), "--${variant.get()}")
+    val args = mutableListOf("flatc", "-o", outputFolder.get(), "--${variant.get()}")
     if (includeFolder.get().isNotEmpty()) {
       args.add("-I")
       args.add(includeFolder.get())
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt
index e10037a..d868d3a 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt
@@ -18,13 +18,12 @@
 import kotlin.math.max
 import kotlin.math.min
 
-/**
- * Represent a chunk of data, where FlexBuffers will be read from.
- */
+/** Represent a chunk of data, where FlexBuffers will be read from. */
 public interface ReadBuffer {
 
   /**
    * Scan through the buffer for first byte matching value.
+   *
    * @param value to be match
    * @param start inclusive initial position to start searching
    * @param end exclusive final position of the search
@@ -34,6 +33,7 @@
 
   /**
    * Read boolean from the buffer. Booleans as stored as a single byte
+   *
    * @param index position of the element in [ReadBuffer]
    * @return [Boolean] element
    */
@@ -41,6 +41,7 @@
 
   /**
    * Read a [Byte] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a byte
    */
@@ -48,6 +49,7 @@
 
   /**
    * Read a [UByte] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a [UByte]
    */
@@ -55,6 +57,7 @@
 
   /**
    * Read a [Short] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a [Short]
    */
@@ -62,6 +65,7 @@
 
   /**
    * Read a [UShort] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a [UShort]
    */
@@ -69,6 +73,7 @@
 
   /**
    * Read a [Int] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return an [Int]
    */
@@ -76,6 +81,7 @@
 
   /**
    * Read a [UInt] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return an [UInt]
    */
@@ -83,6 +89,7 @@
 
   /**
    * Read a [Long] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a [Long]
    */
@@ -90,6 +97,7 @@
 
   /**
    * Read a [ULong] from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a [ULong]
    */
@@ -97,6 +105,7 @@
 
   /**
    * Read a 32-bit float from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a float
    */
@@ -104,6 +113,7 @@
 
   /**
    * Read a 64-bit float from the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    * @return a double
    */
@@ -111,6 +121,7 @@
 
   /**
    * Read a UTF-8 string from the buffer.
+   *
    * @param start initial element of the string
    * @param size size of the string in bytes.
    * @return a `String`
@@ -119,22 +130,25 @@
 
   /**
    * Read a ByteArray from the buffer.
+   *
    * @param start position from the [ReadBuffer] to be read
    * @param length maximum number of bytes to be written in the buffer
    */
   public fun getBytes(array: ByteArray, start: Int, length: Int = array.size)
 
   /**
-   * Expose [ReadBuffer] as an array of bytes.
-   * This method is meant to be as efficient as possible, so for an array-backed [ReadBuffer], it should
-   * return its own internal data. In case access to internal data is not possible,
-   * a copy of the data into an array of bytes might occur.
+   * Expose [ReadBuffer] as an array of bytes. This method is meant to be as efficient as possible,
+   * so for an array-backed [ReadBuffer], it should return its own internal data. In case access to
+   * internal data is not possible, a copy of the data into an array of bytes might occur.
+   *
    * @return [ReadBuffer] as an array of bytes
    */
   public fun data(): ByteArray
 
   /**
-   * Creates a new [ReadBuffer] point to a region of the current buffer, starting at [start] with size [size].
+   * Creates a new [ReadBuffer] point to a region of the current buffer, starting at [start] with
+   * size [size].
+   *
    * @param start starting position of the [ReadBuffer]
    * @param size in bytes of the [ReadBuffer]
    * @return [ReadBuffer] slice.
@@ -142,15 +156,17 @@
   public fun slice(start: Int, size: Int): ReadBuffer
 
   /**
-   * Defines the size of the message in the buffer. It also determines last position that buffer
-   * can be read. Last byte to be accessed is in position `limit() -1`.
+   * Defines the size of the message in the buffer. It also determines last position that buffer can
+   * be read. Last byte to be accessed is in position `limit() -1`.
+   *
    * @return indicate last position
    */
   public val limit: Int
 }
 
 /**
- * Interface to represent a read-write buffers. This interface will be used to access and write FlexBuffer messages.
+ * Interface to represent a read-write buffers. This interface will be used to access and write
+ * FlexBuffer messages.
  */
 public interface ReadWriteBuffer : ReadBuffer {
   /**
@@ -160,9 +176,9 @@
 
   /**
    * Request capacity of the buffer relative to [writePosition]. In case buffer is already larger
-   * than the requested, this method will just return true. Otherwise,
-   * It might try to resize the buffer. In case of being unable to allocate
-   * enough memory, an exception will be thrown.
+   * than the requested, this method will just return true. Otherwise, It might try to resize the
+   * buffer. In case of being unable to allocate enough memory, an exception will be thrown.
+   *
    * @param additional capacity in bytes to be added on top of [writePosition]
    * @param copyAtEnd copy current data at the end of new underlying buffer
    * @return new capacity in bytes
@@ -171,10 +187,10 @@
     requestCapacity(writePosition + additional, copyAtEnd)
 
   /**
-   * Request capacity of the buffer in absolute values. In case buffer is already larger
-   * than the requested the method is a no-op. Otherwise,
-   * It might try to resize the buffer. In case of being unable to allocate
-   * enough memory, an exception will be thrown.
+   * Request capacity of the buffer in absolute values. In case buffer is already larger than the
+   * requested the method is a no-op. Otherwise, It might try to resize the buffer. In case of being
+   * unable to allocate enough memory, an exception will be thrown.
+   *
    * @param capacity new capacity
    * @param copyAtEnd copy current data at the end of new underlying buffer
    * @return new capacity in bytes
@@ -182,14 +198,16 @@
   public fun requestCapacity(capacity: Int, copyAtEnd: Boolean = false): Int
 
   /**
-   * Put a [Boolean] into the buffer at [writePosition] . Booleans as stored as single byte.
-   * Write position will be incremented.
+   * Put a [Boolean] into the buffer at [writePosition] . Booleans as stored as single byte. Write
+   * position will be incremented.
+   *
    * @return [Boolean] element
    */
   public fun put(value: Boolean)
 
   /**
    * Put an array of bytes into the buffer at [writePosition]. Write position will be incremented.
+   *
    * @param value the data to be copied
    * @param start initial position on value to be copied
    * @param length amount of bytes to be copied
@@ -198,74 +216,58 @@
 
   /**
    * Put an array of bytes into the buffer at [writePosition]. Write position will be incremented.
+   *
    * @param value [ReadBuffer] the data to be copied
    * @param start initial position on value to be copied
    * @param length amount of bytes to be copied
    */
   public fun put(value: ReadBuffer, start: Int = 0, length: Int = value.limit - start)
 
-  /**
-   * Write a [Byte] into the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [Byte] into the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: Byte)
 
-  /**
-   * Write a [UByte] into the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [UByte] into the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: UByte)
 
-  /**
-   * Write a [Short] into in the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [Short] into in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: Short)
 
-  /**
-   * Write a [UShort] into in the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [UShort] into in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: UShort)
 
-  /**
-   * Write a [Int] in the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [Int] in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: Int)
 
-  /**
-   * Write a [UInt] into in the buffer at [writePosition]. Write position will be incremented.
-   */
+  /** Write a [UInt] into in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: UInt)
 
-  /**
-   * Write a [Long] into in the buffer at [writePosition]. Write position will be
-   * incremented.
-   */
+  /** Write a [Long] into in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: Long)
 
-  /**
-   * Write a [ULong] into in the buffer at [writePosition]. Write position will be
-   * incremented.
-   */
+  /** Write a [ULong] into in the buffer at [writePosition]. Write position will be incremented. */
   public fun put(value: ULong)
 
   /**
-   * Write a 32-bit [Float] into the buffer at [writePosition]. Write position will be
-   * incremented.
+   * Write a 32-bit [Float] into the buffer at [writePosition]. Write position will be incremented.
    */
   public fun put(value: Float)
 
   /**
-   * Write a 64-bit [Double] into the buffer at [writePosition]. Write position will be
-   * incremented.
+   * Write a 64-bit [Double] into the buffer at [writePosition]. Write position will be incremented.
    */
   public fun put(value: Double)
 
   /**
-   * Write a [String] encoded as UTF-8 into the buffer at [writePosition]. Write position will be incremented.
+   * Write a [String] encoded as UTF-8 into the buffer at [writePosition]. Write position will be
+   * incremented.
+   *
    * @return size in bytes of the encoded string
    */
   public fun put(value: CharSequence, encodedLength: Int = -1): Int
 
   /**
    * Write an array of bytes into the buffer.
+   *
    * @param dstIndex initial position where [src] will be copied into.
    * @param src the data to be copied.
    * @param srcStart initial position on [src] that will be copied.
@@ -275,6 +277,7 @@
 
   /**
    * Write an array of bytes into the buffer.
+   *
    * @param dstIndex initial position where [src] will be copied into.
    * @param src the data to be copied.
    * @param srcStart initial position on [src] that will be copied.
@@ -284,66 +287,77 @@
 
   /**
    * Write [Boolean] into a given position [index] on the buffer. Booleans as stored as single byte.
+   *
    * @param index position of the element in buffer
    */
   public operator fun set(index: Int, value: Boolean)
 
   /**
    * Write [Byte] into a given position [index] on the buffer.
+   *
    * @param index position of the element in the buffer
    */
   public operator fun set(index: Int, value: Byte)
 
   /**
    * Write [UByte] into a given position [index] on the buffer.
+   *
    * @param index position of the element in the buffer
    */
   public operator fun set(index: Int, value: UByte)
 
   /**
-   Short
+   * Short
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: Short)
 
   /**
    * Write [UShort] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: UShort)
 
   /**
    * Write [Int] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: Int)
 
   /**
    * Write [UInt] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: UInt)
 
   /**
    * Write [Long] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: Long)
 
   /**
    * Write [ULong] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: ULong)
 
   /**
    * Write [Float] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: Float)
 
   /**
    * Write [Double] into a given position [index] on the buffer.
+   *
    * @param index position of the element in [ReadBuffer]
    */
   public fun set(index: Int, value: Double)
@@ -351,12 +365,15 @@
   public fun fill(value: Byte, start: Int, end: Int)
 
   /**
-   * Current position of the buffer to be written. It will be automatically updated on [put] operations.
+   * Current position of the buffer to be written. It will be automatically updated on [put]
+   * operations.
    */
   public var writePosition: Int
 
   /**
-   * Creates a new [ReadWriteBuffer] point to a region of the current buffer, starting at [offset] with size [size].
+   * Creates a new [ReadWriteBuffer] point to a region of the current buffer, starting at [offset]
+   * with size [size].
+   *
    * @param offset starting position of the [ReadWriteBuffer]
    * @param size in bytes of the [ReadWriteBuffer]
    * @return [ReadWriteBuffer] slice.
@@ -364,35 +381,35 @@
   public fun writeSlice(offset: Int, size: Int): ReadWriteBuffer
 
   /**
-   * Special operation where we increase the backed buffer size to [capacity]
-   * and shift all already written data to the end of the buffer.
+   * Special operation where we increase the backed buffer size to [capacity] and shift all already
+   * written data to the end of the buffer.
    *
-   * This function is mostly used when creating a Flatbuffer message, as
-   * data is written from the end of the buffer towards index 0.
+   * This function is mostly used when creating a Flatbuffer message, as data is written from the
+   * end of the buffer towards index 0.
+   *
    * @param capacity required in bytes
    * @return new capacity in bytes
    */
   public fun moveWrittenDataToEnd(capacity: Int): Int
 
-  /**
-   * Maximum size in bytes that the backed buffer supports.
-   */
+  /** Maximum size in bytes that the backed buffer supports. */
   public val capacity: Int
 
   /**
-   * Defines last relative position of the backed buffer that can be written.
-   * Any addition to the buffer that goes beyond will throw an exception
-   * instead of regrow the buffer (default behavior).
+   * Defines last relative position of the backed buffer that can be written. Any addition to the
+   * buffer that goes beyond will throw an exception instead of regrow the buffer (default
+   * behavior).
    */
   public val writeLimit: Int
 }
 
-public open class ArrayReadBuffer(protected var buffer: ByteArray,
-                                  // offsets writePosition against backed buffer e.g. offset = 1, writePosition = 1
-                                  // will write first byte at position 2 of the backed buffer
-                                  internal val offset: Int = 0,
-                                  override val limit: Int = buffer.size - offset) : ReadBuffer {
-
+public open class ArrayReadBuffer(
+  protected var buffer: ByteArray,
+  // offsets writePosition against backed buffer e.g. offset = 1, writePosition = 1
+  // will write first byte at position 2 of the backed buffer
+  internal val offset: Int = 0,
+  override val limit: Int = buffer.size - offset,
+) : ReadBuffer {
 
   override fun findFirst(value: Byte, start: Int, end: Int): Int {
     val e = min(end, limit)
@@ -423,8 +440,8 @@
 
   override fun getDouble(index: Int): Double = buffer.getDouble(offset + index)
 
-  override fun getString(start: Int, size: Int): String = buffer.decodeToString(this.offset + start,
-    this.offset + start + size)
+  override fun getString(start: Int, size: Int): String =
+    buffer.decodeToString(this.offset + start, this.offset + start + size)
 
   override fun getBytes(array: ByteArray, start: Int, length: Int) {
     val end = min(this.offset + start + length, buffer.size)
@@ -436,19 +453,19 @@
 
   override fun data(): ByteArray = buffer
 
-  override fun slice(start: Int, size: Int): ReadBuffer = ArrayReadBuffer(buffer, this.offset + start, size)
+  override fun slice(start: Int, size: Int): ReadBuffer =
+    ArrayReadBuffer(buffer, this.offset + start, size)
 }
+
 /**
  * Implements `[ReadWriteBuffer]` using [ByteArray] as backing buffer. Using array of bytes are
  * usually faster than `ByteBuffer`.
  *
- * This class is not thread-safe, meaning that
- * it must operate on a single thread. Operating from
+ * This class is not thread-safe, meaning that it must operate on a single thread. Operating from
  * multiple thread leads into an undefined behavior
  *
  * All operations assume Little Endian byte order.
  */
-
 public class ArrayReadWriteBuffer(
   buffer: ByteArray,
   offset: Int = 0,
@@ -456,12 +473,13 @@
   // Any addition to the buffer that goes beyond will throw an exception
   // instead of regrow the buffer (default behavior).
   public override val writeLimit: Int = -1,
-  override var writePosition: Int = offset
+  override var writePosition: Int = offset,
 ) : ArrayReadBuffer(buffer, offset, writePosition), ReadWriteBuffer {
 
   public constructor(initialCapacity: Int = 10) : this(ByteArray(initialCapacity))
 
-  override val limit: Int get() = writePosition
+  override val limit: Int
+    get() = writePosition
 
   override fun clear(): Unit = run { writePosition = 0 }
 
@@ -545,35 +563,69 @@
   }
 
   override operator fun set(dstIndex: Int, src: ReadBuffer, srcStart: Int, srcLength: Int) {
-    when(src) {
-        is ArrayReadBuffer -> {
-          src.data().copyInto(buffer, dstIndex, src.offset + srcStart, src.offset + srcStart + srcLength)
-        }
-        else -> {
-          for (i in 0 until srcLength) {
-            buffer[dstIndex + i] = src[srcStart + i]
-          }
+    when (src) {
+      is ArrayReadBuffer -> {
+        src
+          .data()
+          .copyInto(buffer, dstIndex, src.offset + srcStart, src.offset + srcStart + srcLength)
+      }
+      else -> {
+        for (i in 0 until srcLength) {
+          buffer[dstIndex + i] = src[srcStart + i]
         }
       }
+    }
   }
 
-  override operator fun set(index: Int, value: Byte) { buffer[index] = value }
-  override operator fun set(index: Int, value: UByte) { buffer.setUByte(index, value) }
-  override operator fun set(index: Int, value: Short) { buffer.setShort(index, value) }
-  override operator fun set(index: Int, value: UShort) { buffer.setUShort(index, value) }
-  override operator fun set(index: Int, value: Int) { buffer.setInt(index, value) }
-  override operator fun set(index: Int, value: UInt) { buffer.setUInt(index, value) }
-  override operator fun set(index: Int, value: Long) { buffer.setLong(index, value) }
-  override operator fun set(index: Int, value: ULong) { buffer.setULong(index, value) }
-  override operator fun set(index: Int, value: Float) { buffer.setFloat(index, value) }
-  override operator fun set(index: Int, value: Double) { buffer.setDouble(index, value) }
-  override fun fill(value: Byte, start: Int, end: Int) { buffer.fill(value, start, end) }
+  override operator fun set(index: Int, value: Byte) {
+    buffer[index] = value
+  }
+
+  override operator fun set(index: Int, value: UByte) {
+    buffer.setUByte(index, value)
+  }
+
+  override operator fun set(index: Int, value: Short) {
+    buffer.setShort(index, value)
+  }
+
+  override operator fun set(index: Int, value: UShort) {
+    buffer.setUShort(index, value)
+  }
+
+  override operator fun set(index: Int, value: Int) {
+    buffer.setInt(index, value)
+  }
+
+  override operator fun set(index: Int, value: UInt) {
+    buffer.setUInt(index, value)
+  }
+
+  override operator fun set(index: Int, value: Long) {
+    buffer.setLong(index, value)
+  }
+
+  override operator fun set(index: Int, value: ULong) {
+    buffer.setULong(index, value)
+  }
+
+  override operator fun set(index: Int, value: Float) {
+    buffer.setFloat(index, value)
+  }
+
+  override operator fun set(index: Int, value: Double) {
+    buffer.setDouble(index, value)
+  }
+
+  override fun fill(value: Byte, start: Int, end: Int) {
+    buffer.fill(value, start, end)
+  }
 
   /**
-   * Request capacity of the buffer. In case buffer is already larger
-   * than the requested, it is a no-op. Otherwise,
-   * It might try to resize the buffer. In case of being unable to allocate
-   * enough memory, an exception will be thrown.
+   * Request capacity of the buffer. In case buffer is already larger than the requested, it is a
+   * no-op. Otherwise, It might try to resize the buffer. In case of being unable to allocate enough
+   * memory, an exception will be thrown.
+   *
    * @param capacity new capacity
    * @param copyAtEnd copy current data at the end of new underlying buffer
    */
@@ -582,15 +634,18 @@
 
     if (buffer.size >= capacity) return buffer.size
 
-    if (writeLimit > 0 && writeLimit + offset >= buffer.size) error("Buffer in writeLimit mode. In writeLimit mode" +
-      " the buffer does not grow automatically and any write beyond writeLimit will throw exception. " +
-      "(writeLimit: $writeLimit, newCapacity: $capacity")
+    if (writeLimit > 0 && writeLimit + offset >= buffer.size)
+      error(
+        "Buffer in writeLimit mode. In writeLimit mode" +
+          " the buffer does not grow automatically and any write beyond writeLimit will throw exception. " +
+          "(writeLimit: $writeLimit, newCapacity: $capacity"
+      )
     // implemented in the same growing fashion as ArrayList
     val oldCapacity = buffer.size
     if (oldCapacity == Int.MAX_VALUE - 8) { // Ensure we don't grow beyond what fits in an int.
       error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.")
     }
-    //(old_buf_size & 0xC0000000) != 0 ? MAX_BUFFER_SIZE : old_buf_size << 1;
+    // (old_buf_size & 0xC0000000) != 0 ? MAX_BUFFER_SIZE : old_buf_size << 1;
     var newCapacity = 8
     while (newCapacity < capacity) { // Note: this also catches newCapacity int overflow
       newCapacity = if (newCapacity and -0x40000000 != 0) Int.MAX_VALUE - 8 else newCapacity shl 1
@@ -603,14 +658,13 @@
   }
 
   override fun writeSlice(offset: Int, size: Int): ReadWriteBuffer {
-    return ArrayReadWriteBuffer(this.buffer, offset=offset, writeLimit=size)
+    return ArrayReadWriteBuffer(this.buffer, offset = offset, writeLimit = size)
   }
 
   override fun moveWrittenDataToEnd(capacity: Int): Int = requestCapacity(capacity, true)
 
   override val capacity: Int
     get() = buffer.size
-
 }
 
 public val emptyBuffer: ReadWriteBuffer = ArrayReadWriteBuffer(ByteArray(1))
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
index e851f5d..85f275f 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
@@ -19,37 +19,53 @@
 
 import kotlin.experimental.and
 
-internal fun ByteArray.getString(index: Int, size: Int): String = Utf8.decodeUtf8Array(this, index, size)
+internal fun ByteArray.getString(index: Int, size: Int): String =
+  Utf8.decodeUtf8Array(this, index, size)
 
 internal fun ByteArray.setCharSequence(index: Int, value: CharSequence): Int =
   Utf8.encodeUtf8Array(value, this, index, this.size - index)
 
 // List of functions that needs to be implemented on all platforms.
 internal expect inline fun ByteArray.getUByte(index: Int): UByte
+
 internal expect inline fun ByteArray.getShort(index: Int): Short
+
 internal expect inline fun ByteArray.getUShort(index: Int): UShort
+
 internal expect inline fun ByteArray.getInt(index: Int): Int
+
 internal expect inline fun ByteArray.getUInt(index: Int): UInt
+
 internal expect inline fun ByteArray.getLong(index: Int): Long
+
 internal expect inline fun ByteArray.getULong(index: Int): ULong
+
 internal expect inline fun ByteArray.getFloat(index: Int): Float
+
 internal expect inline fun ByteArray.getDouble(index: Int): Double
 
 internal expect inline fun ByteArray.setUByte(index: Int, value: UByte)
+
 public expect inline fun ByteArray.setShort(index: Int, value: Short)
+
 internal expect inline fun ByteArray.setUShort(index: Int, value: UShort)
+
 internal expect inline fun ByteArray.setInt(index: Int, value: Int)
+
 internal expect inline fun ByteArray.setUInt(index: Int, value: UInt)
+
 internal expect inline fun ByteArray.setLong(index: Int, value: Long)
+
 internal expect inline fun ByteArray.setULong(index: Int, value: ULong)
+
 internal expect inline fun ByteArray.setFloat(index: Int, value: Float)
+
 internal expect inline fun ByteArray.setDouble(index: Int, value: Double)
 
-/**
- * This implementation uses Little Endian order.
- */
+/** This implementation uses Little Endian order. */
 public object ByteArrayOps {
   public inline fun getUByte(ary: ByteArray, index: Int): UByte = ary[index].toUByte()
+
   public inline fun getShort(ary: ByteArray, index: Int): Short {
     return (ary[index + 1].toInt() shl 8 or (ary[index].toInt() and 0xff)).toShort()
   }
@@ -57,19 +73,18 @@
   public inline fun getUShort(ary: ByteArray, index: Int): UShort = getShort(ary, index).toUShort()
 
   public inline fun getInt(ary: ByteArray, index: Int): Int {
-    return (
-      (ary[index + 3].toInt() shl 24) or
-        ((ary[index + 2].toInt() and 0xff) shl 16) or
-        ((ary[index + 1].toInt() and 0xff) shl 8) or
-        ((ary[index].toInt() and 0xff))
-      )
+    return ((ary[index + 3].toInt() shl 24) or
+      ((ary[index + 2].toInt() and 0xff) shl 16) or
+      ((ary[index + 1].toInt() and 0xff) shl 8) or
+      ((ary[index].toInt() and 0xff)))
   }
 
   public inline fun getUInt(ary: ByteArray, index: Int): UInt = getInt(ary, index).toUInt()
 
   public inline fun getLong(ary: ByteArray, index: Int): Long {
     var idx = index
-    return ary[idx++].toLong() and 0xff or
+    return ary[idx++].toLong() and
+      0xff or
       (ary[idx++].toLong() and 0xff shl 8) or
       (ary[idx++].toLong() and 0xff shl 16) or
       (ary[idx++].toLong() and 0xff shl 24) or
@@ -84,13 +99,15 @@
   public inline fun setUByte(ary: ByteArray, index: Int, value: UByte) {
     ary[index] = value.toByte()
   }
+
   public inline fun setShort(ary: ByteArray, index: Int, value: Short) {
     var idx = index
     ary[idx++] = (value and 0xff).toByte()
     ary[idx] = (value.toInt() shr 8 and 0xff).toByte()
   }
 
-  public inline fun setUShort(ary: ByteArray, index: Int, value: UShort): Unit = setShort(ary, index, value.toShort())
+  public inline fun setUShort(ary: ByteArray, index: Int, value: UShort): Unit =
+    setShort(ary, index, value.toShort())
 
   public inline fun setInt(ary: ByteArray, index: Int, value: Int) {
     var idx = index
@@ -100,7 +117,8 @@
     ary[idx] = (value shr 24 and 0xff).toByte()
   }
 
-  public inline fun setUInt(ary: ByteArray, index: Int, value: UInt): Unit = setInt(ary, index, value.toInt())
+  public inline fun setUInt(ary: ByteArray, index: Int, value: UInt): Unit =
+    setInt(ary, index, value.toInt())
 
   public inline fun setLong(ary: ByteArray, index: Int, value: Long) {
     var i = value.toInt()
@@ -109,7 +127,8 @@
     setInt(ary, index + 4, i)
   }
 
-  public inline fun setULong(ary: ByteArray, index: Int, value: ULong): Unit = setLong(ary, index, value.toLong())
+  public inline fun setULong(ary: ByteArray, index: Int, value: ULong): Unit =
+    setLong(ary, index, value.toLong())
 
   public inline fun setFloat(ary: ByteArray, index: Int, value: Float) {
     setInt(ary, index, value.toRawBits())
@@ -120,5 +139,7 @@
   }
 
   public inline fun getFloat(ary: ByteArray, index: Int): Float = Float.fromBits(getInt(ary, index))
-  public inline fun getDouble(ary: ByteArray, index: Int): Double = Double.fromBits(getLong(ary, index))
+
+  public inline fun getDouble(ary: ByteArray, index: Int): Double =
+    Double.fromBits(getLong(ary, index))
 }
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilder.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilder.kt
index 28ab2ca..8151726 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilder.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilder.kt
@@ -17,14 +17,15 @@
 
 import kotlin.jvm.JvmOverloads
 
-
 /**
- * Class that helps you build a FlatBuffer.  See the section
- * "Use in Kotlin" in the main FlatBuffers documentation.
+ * Class that helps you build a FlatBuffer. See the section "Use in Kotlin" in the main FlatBuffers
+ * documentation.
  */
-public class FlatBufferBuilder @JvmOverloads constructor(
+public class FlatBufferBuilder
+@JvmOverloads
+constructor(
   private val initialSize: Int = 1024,
-  private var buffer: ReadWriteBuffer = ArrayReadWriteBuffer(initialSize)
+  private var buffer: ReadWriteBuffer = ArrayReadWriteBuffer(initialSize),
 ) {
   // Remaining space in the ByteBuffer.
   private var space: Int = buffer.capacity
@@ -62,9 +63,7 @@
   // map used to cache shared strings.
   private var stringPool: MutableMap<CharSequence, Offset<String>>? = null
 
-  /**
-   * Reset the FlatBufferBuilder by purging all data that it holds.
-   */
+  /** Reset the FlatBufferBuilder by purging all data that it holds. */
   public fun clear() {
     space = buffer.capacity
     buffer.clear()
@@ -96,11 +95,10 @@
   }
 
   /**
-   * Prepare to write an element of `size` after `additional_bytes`
-   * have been written, e.g. if you write a string, you need to align such
-   * the int length field is aligned to [com.google.flatbuffers.Int.SIZE_BYTES], and
-   * the string data follows it directly.  If all you need to do is alignment, `additional_bytes`
-   * will be 0.
+   * Prepare to write an element of `size` after `additional_bytes` have been written, e.g. if you
+   * write a string, you need to align such the int length field is aligned to
+   * [com.google.flatbuffers.Int.SIZE_BYTES], and the string data follows it directly. If all you
+   * need to do is alignment, `additional_bytes` will be 0.
    *
    * @param size This is the of the new element to write.
    * @param additionalBytes The padding size.
@@ -124,8 +122,8 @@
   }
 
   /**
-   * Add a `boolean` to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a `boolean` to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A `boolean` to put into the buffer.
    */
@@ -135,16 +133,16 @@
   }
 
   /**
-   * Add a [UByte] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [UByte] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [UByte] to put into the buffer.
    */
   public fun put(x: UByte): Unit = put(x.toByte())
 
   /**
-   * Add a [Byte] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [Byte] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [Byte] to put into the buffer.
    */
@@ -154,16 +152,16 @@
   }
 
   /**
-   * Add a [UShort] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [UShort] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [UShort] to put into the buffer.
    */
   public fun put(x: UShort): Unit = put(x.toShort())
 
   /**
-   * Add a [Short] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [Short] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [Short] to put into the buffer.
    */
@@ -173,35 +171,35 @@
   }
 
   /**
-   * Add an [UInt] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add an [UInt] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x An [UInt] to put into the buffer.
    */
   public fun put(x: UInt): Unit = put(x.toInt())
 
   /**
-   * Add an [Int] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add an [Int] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x An [Int] to put into the buffer.
    */
-  public fun put(x: Int){
+  public fun put(x: Int) {
     space -= Int.SIZE_BYTES
     buffer.set(space, x)
   }
 
   /**
-   * Add a [ULong] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [ULong] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [ULong] to put into the buffer.
    */
   public fun put(x: ULong): Unit = put(x.toLong())
 
   /**
-   * Add a [Long] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [Long] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [Long] to put into the buffer.
    */
@@ -211,8 +209,8 @@
   }
 
   /**
-   * Add a [Float] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [Float] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [Float] to put into the buffer.
    */
@@ -222,8 +220,8 @@
   }
 
   /**
-   * Add a [Double] to the buffer, backwards from the current location. Doesn't align nor
-   * check for space.
+   * Add a [Double] to the buffer, backwards from the current location. Doesn't align nor check for
+   * space.
    *
    * @param x A [Double] to put into the buffer.
    */
@@ -336,26 +334,23 @@
    * @param off The offset to add.
    */
   public fun add(off: Offset<*>): Unit = addOffset(off.value)
+
   public fun add(off: VectorOffset<*>): Unit = addOffset(off.value)
+
   private fun addOffset(off: Int) {
     prep(Int.SIZE_BYTES, 0) // Ensure alignment is already done.
     put(buffer.capacity - space - off + Int.SIZE_BYTES)
   }
 
   /**
-   * Start a new array/vector of objects.  Users usually will not call
-   * this directly.  The `FlatBuffers` compiler will create a start/end
-   * method for vector types in generated code.
-   *
+   * Start a new array/vector of objects. Users usually will not call this directly. The
+   * `FlatBuffers` compiler will create a start/end method for vector types in generated code.
    *
    * The expected sequence of calls is:
-   *
-   *  1. Start the array using this method.
-   *  1. Call [.addOffset] `num_elems` number of times to set
-   * the offset of each element in the array.
-   *  1. Call [.endVector] to retrieve the offset of the array.
-   *
-   *
+   * 1. Start the array using this method.
+   * 1. Call [.addOffset] `num_elems` number of times to set the offset of each element in the
+   *    array.
+   * 1. Call [.endVector] to retrieve the offset of the array.
    *
    * For example, to create an array of strings, do:
    * <pre>`// Need 10 strings
@@ -379,7 +374,7 @@
    *
    * // Finish off the vector
    * int offsetOfTheVector = fbb.endVector();
-   `</pre> *
+   * `</pre> *
    *
    * @param elemSize The size of each element in the array.
    * @param numElems The number of elements in the array.
@@ -392,11 +387,12 @@
     prep(alignment, elemSize * numElems) // Just in case alignment > int.
     nested = true
   }
+
   public fun startString(numElems: Int): Unit = startVector(1, numElems, 1)
 
   /**
-   * Finish off the creation of an array and all its elements.  The array
-   * must be created with [.startVector].
+   * Finish off the creation of an array and all its elements. The array must be created with
+   * [.startVector].
    *
    * @return The offset at which the newly created array starts.
    * @see .startVector
@@ -423,16 +419,19 @@
   }
 
   /**
-   * Create a new array/vector and return a ByteBuffer to be filled later.
-   * Call [endVector] after this method to get an offset to the beginning
-   * of vector.
+   * Create a new array/vector and return a ByteBuffer to be filled later. Call [endVector] after
+   * this method to get an offset to the beginning of vector.
    *
    * @param elemSize the size of each element in bytes.
    * @param numElems number of elements in the vector.
    * @param alignment byte alignment.
    * @return ByteBuffer with position and limit set to the space allocated for the array.
    */
-  public fun createUnintializedVector(elemSize: Int, numElems: Int, alignment: Int): ReadWriteBuffer {
+  public fun createUnintializedVector(
+    elemSize: Int,
+    numElems: Int,
+    alignment: Int,
+  ): ReadWriteBuffer {
     val length = elemSize * numElems
     startVector(elemSize, numElems, alignment)
     space -= length
@@ -460,19 +459,21 @@
    * @param offsets Offsets of the tables.
    * @return Returns offset of the sorted vector.
    */
-  public fun <T : Table> createSortedVectorOfTables(obj: T, offsets: Array<Offset<T>>): VectorOffset<T> {
+  public fun <T : Table> createSortedVectorOfTables(
+    obj: T,
+    offsets: Array<Offset<T>>,
+  ): VectorOffset<T> {
     obj.sortTables(offsets, buffer)
     return createVectorOfTables(offsets)
   }
 
   /**
-   * Encode the String `s` in the buffer using UTF-8. If a String with
-   * this exact contents has already been serialized using this method,
-   * instead simply returns the offset of the existing String.
+   * Encode the String `s` in the buffer using UTF-8. If a String with this exact contents has
+   * already been serialized using this method, instead simply returns the offset of the existing
+   * String.
    *
-   * Usage of the method will incur into additional allocations,
-   * so it is advisable to use it only when it is known upfront that
-   * your message will have several repeated strings.
+   * Usage of the method will incur into additional allocations, so it is advisable to use it only
+   * when it is known upfront that your message will have several repeated strings.
    *
    * @param s The String to encode.
    * @return The offset in the buffer where the encoded String starts.
@@ -494,6 +495,7 @@
 
   /**
    * Encode the [CharSequence] `s` in the buffer using UTF-8.
+   *
    * @param s The [CharSequence] to encode.
    * @return The offset in the buffer where the encoded string starts.
    */
@@ -513,7 +515,7 @@
    * @param s An already encoded UTF-8 string as a `ByteBuffer`.
    * @return The offset in the buffer where the encoded string starts.
    */
- public fun createString(s: ReadBuffer): Offset<String> {
+  public fun createString(s: ReadBuffer): Offset<String> {
     val length: Int = s.limit
     add(0.toByte())
     startVector(1, length, 1)
@@ -557,13 +559,16 @@
   /**
    * Create a byte array in the buffer.
    *
-   * The source [ReadBuffer] position is advanced until [ReadBuffer.limit]
-   * after this call.
+   * The source [ReadBuffer] position is advanced until [ReadBuffer.limit] after this call.
    *
    * @param data A source [ReadBuffer] with data.
    * @return The offset in the buffer where the encoded array starts.
    */
- public fun createByteVector(data: ReadBuffer, from: Int = 0, until: Int = data.limit): VectorOffset<Byte> {
+  public fun createByteVector(
+    data: ReadBuffer,
+    from: Int = 0,
+    until: Int = data.limit,
+  ): VectorOffset<Byte> {
     val length: Int = until - from
     startVector(1, length, 1)
     space -= length
@@ -572,28 +577,25 @@
     return VectorOffset(endVector())
   }
 
-  /**
-   * Should not be accessing the final buffer before it is finished.
-   */
+  /** Should not be accessing the final buffer before it is finished. */
   public fun finished() {
-    if (!finished) throw AssertionError(
-      "FlatBuffers: you can only access the serialized buffer after it has been" +
-        " finished by FlatBufferBuilder.finish()."
-    )
+    if (!finished)
+      throw AssertionError(
+        "FlatBuffers: you can only access the serialized buffer after it has been" +
+          " finished by FlatBufferBuilder.finish()."
+      )
   }
 
   /**
-   * Should not be creating any other object, string or vector
-   * while an object is being constructed.
+   * Should not be creating any other object, string or vector while an object is being constructed.
    */
   public fun notNested() {
     if (nested) throw AssertionError("FlatBuffers: object serialization must not be nested.")
   }
 
   /**
-   * Structures are always stored inline, they need to be created right
-   * where they're used.  You'll get this assertion failure if you
-   * created it elsewhere.
+   * Structures are always stored inline, they need to be created right where they're used. You'll
+   * get this assertion failure if you created it elsewhere.
    *
    * @param obj The offset of the created object.
    */
@@ -602,14 +604,11 @@
   }
 
   /**
-   * Start encoding a new object in the buffer.  Users will not usually need to
-   * call this directly. The `FlatBuffers` compiler will generate helper methods
-   * that call this method internally.
+   * Start encoding a new object in the buffer. Users will not usually need to call this directly.
+   * The `FlatBuffers` compiler will generate helper methods that call this method internally.
    *
-   *
-   * For example, using the "Monster" code found on the "landing page". An
-   * object of type `Monster` can be created using the following code:
-   *
+   * For example, using the "Monster" code found on the "landing page". An object of type `Monster`
+   * can be created using the following code:
    * <pre>`int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] {
    * fbb.createString("test1"),
    * fbb.createString("test2")
@@ -626,19 +625,15 @@
    * Monster.addTest4(fbb, test4);
    * Monster.addTestarrayofstring(fbb, testArrayOfString);
    * int mon = Monster.endMonster(fbb);
-   `</pre> *
-   *
+   * `</pre> *
    *
    * Here:
+   * * The call to `Monster#startMonster(FlatBufferBuilder)` will call this method with the right
+   *   number of fields set.
+   * * `Monster#endMonster(FlatBufferBuilder)` will ensure [.endObject] is called.
    *
-   *  * The call to `Monster#startMonster(FlatBufferBuilder)` will call this
-   * method with the right number of fields set.
-   *  * `Monster#endMonster(FlatBufferBuilder)` will ensure [.endObject] is called.
-   *
-   *
-   *
-   * It's not recommended to call this method directly.  If it's called manually, you must ensure
-   * to audit all calls to it whenever fields are added or removed from your schema.  This is
+   * It's not recommended to call this method directly. If it's called manually, you must ensure to
+   * audit all calls to it whenever fields are added or removed from your schema. This is
    * automatically done by the code generated by the `FlatBuffers` compiler.
    *
    * @param numFields The number of fields found in this object.
@@ -649,15 +644,14 @@
       vtable = IntArray(numFields)
     }
     vtableInUse = numFields
-    for (i in 0 until vtableInUse)
-      vtable[i] = 0
+    for (i in 0 until vtableInUse) vtable[i] = 0
     nested = true
     objectStart = offset()
   }
 
   /**
-   * Add a [Boolean] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Boolean] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Boolean, d: Boolean?) {
@@ -666,6 +660,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Boolean, d: Boolean) {
     if (forceDefaults || x != d) {
@@ -675,17 +670,18 @@
   }
 
   /**
-   * Add a [UByte] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [UByte] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: UByte, d: UByte?): Unit = add(o, x.toByte(), d?.toByte())
+
   // unboxed specialization
   public fun add(o: Int, x: UByte, d: UByte): Unit = add(o, x.toByte(), d.toByte())
 
   /**
-   * Add a [Byte] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Byte] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Byte, d: Byte?) {
@@ -694,6 +690,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Byte, d: Byte) {
     if (forceDefaults || x != d) {
@@ -701,19 +698,20 @@
       slot(o)
     }
   }
+
   /**
-   * Add a [UShort] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [UShort] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: UShort, d: UShort?): Unit = add(o, x.toShort(), d?.toShort())
+
   // unboxed specialization
   public fun add(o: Int, x: UShort, d: UShort): Unit = add(o, x.toShort(), d.toShort())
 
-
   /**
-   * Add a [Short] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Short] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Short, d: Short?) {
@@ -722,6 +720,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Short, d: Short) {
     if (forceDefaults || x != d) {
@@ -731,17 +730,18 @@
   }
 
   /**
-   * Add a [UInt] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [UInt] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: UInt, d: UInt?): Unit = add(o, x.toInt(), d?.toInt())
+
   // unboxed specialization
   public fun add(o: Int, x: UInt, d: UInt): Unit = add(o, x.toInt(), d.toInt())
 
   /**
-   * Add a [Int] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Int] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Int, d: Int?) {
@@ -750,6 +750,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Int, d: Int) {
     if (forceDefaults || x != d) {
@@ -757,17 +758,20 @@
       slot(o)
     }
   }
+
   /**
-   * Add a [ULong] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [ULong] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: ULong, d: ULong?): Unit = add(o, x.toLong(), d?.toLong())
+
   // unboxed specialization
   public fun add(o: Int, x: ULong, d: ULong): Unit = add(o, x.toLong(), d.toLong())
+
   /**
-   * Add a [Long] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Long] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Long, d: Long?) {
@@ -776,6 +780,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Long, d: Long) {
     if (forceDefaults || x != d) {
@@ -785,8 +790,8 @@
   }
 
   /**
-   * Add a [Float] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Float] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Float, d: Float?) {
@@ -795,6 +800,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Float, d: Float) {
     if (forceDefaults || x != d) {
@@ -804,8 +810,8 @@
   }
 
   /**
-   * Add a [Double] to a table at `o` into its vtable, with value `x` and default `d`.
-   * If `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   * Add a [Double] to a table at `o` into its vtable, with value `x` and default `d`. If
+   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
    * default value, it can be skipped.
    */
   public fun add(o: Int, x: Double, d: Double?) {
@@ -814,6 +820,7 @@
       slot(o)
     }
   }
+
   // unboxed specialization
   public fun add(o: Int, x: Double, d: Double) {
     if (forceDefaults || x != d) {
@@ -827,8 +834,8 @@
    *
    * @param o The index into the vtable.
    * @param x An `offset` to put into the buffer, depending on how defaults are handled. If
-   * `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
-   * default value, it can be skipped.
+   *   `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
+   *   default value, it can be skipped.
    * @param d An `offset` default value to compare against when `force_defaults` is `false`.
    */
   public fun add(o: Int, x: Offset<*>, d: Int) {
@@ -837,6 +844,7 @@
       slot(o)
     }
   }
+
   public fun add(o: Int, x: VectorOffset<*>, d: Int) {
     if (forceDefaults || x.value != d) {
       add(x)
@@ -851,15 +859,20 @@
    * @param x The offset of the created struct.
    * @param d The default value is always `0`.
    */
-  public fun addStruct(vOffset: Int, x: Offset<*>, d: Offset<*>?): Unit = addStruct(vOffset, x.value, d?.value)
+  public fun addStruct(vOffset: Int, x: Offset<*>, d: Offset<*>?): Unit =
+    addStruct(vOffset, x.value, d?.value)
+
   // unboxed specialization
-  public fun addStruct(vOffset: Int, x: Offset<*>, d: Offset<*>): Unit = addStruct(vOffset, x.value, d.value)
+  public fun addStruct(vOffset: Int, x: Offset<*>, d: Offset<*>): Unit =
+    addStruct(vOffset, x.value, d.value)
+
   public fun addStruct(vOffset: Int, x: Int, d: Int?) {
     if (x != d) {
       nested(x)
       slot(vOffset)
     }
   }
+
   // unboxed specialization
   public fun addStruct(vOffset: Int, x: Int, d: Int) {
     if (x != d) {
@@ -871,8 +884,7 @@
   /**
    * Set the current vtable at `voffset` to the current location in the buffer.
    *
-   * @param vOffset The index into the vtable to store the offset relative to the end of the
-   * buffer.
+   * @param vOffset The index into the vtable to store the offset relative to the end of the buffer.
    */
   public fun slot(vOffset: Int) {
     vtable[vOffset] = offset()
@@ -947,8 +959,7 @@
   }
 
   /**
-   * Checks that a required field has been set in a given table that has
-   * just been constructed.
+   * Checks that a required field has been set in a given table that has just been constructed.
    *
    * @param table The offset to the start of the table from the `ByteBuffer` capacity.
    * @param field The offset to the field in the vtable.
@@ -1000,16 +1011,14 @@
    *
    * @param rootTable An offset to be added to the buffer.
    * @param fileIdentifier A FlatBuffer file identifier to be added to the buffer before
-   * `root_table`.
+   *   `root_table`.
    * @param sizePrefix Whether to prefix the size to the buffer.
    */
   protected fun finish(rootTable: Offset<*>, fileIdentifier: String, sizePrefix: Boolean) {
     val identifierSize = 4
     prep(minalign, Int.SIZE_BYTES + identifierSize + if (sizePrefix) Int.SIZE_BYTES else 0)
-    if (fileIdentifier.length != identifierSize) throw AssertionError(
-      "FlatBuffers: file identifier must be length " +
-        identifierSize
-    )
+    if (fileIdentifier.length != identifierSize)
+      throw AssertionError("FlatBuffers: file identifier must be length " + identifierSize)
     for (i in identifierSize - 1 downTo 0) {
       add(fileIdentifier[i].code.toByte())
     }
@@ -1021,7 +1030,7 @@
    *
    * @param rootTable An offset to be added to the buffer.
    * @param fileIdentifier A FlatBuffer file identifier to be added to the buffer before
-   * `root_table`.
+   *   `root_table`.
    */
   public fun finish(rootTable: Offset<*>, fileIdentifier: String) {
     finish(rootTable, fileIdentifier, false)
@@ -1032,16 +1041,15 @@
    *
    * @param rootTable An offset to be added to the buffer.
    * @param fileIdentifier A FlatBuffer file identifier to be added to the buffer before
-   * `root_table`.
+   *   `root_table`.
    */
   public fun finishSizePrefixed(rootTable: Offset<*>, fileIdentifier: String) {
     finish(rootTable, fileIdentifier, true)
   }
 
   /**
-   * In order to save space, fields that are set to their default value
-   * don't get serialized into the buffer. Forcing defaults provides a
-   * way to manually disable this optimization.
+   * In order to save space, fields that are set to their default value don't get serialized into
+   * the buffer. Forcing defaults provides a way to manually disable this optimization.
    *
    * @param forceDefaults When set to `true`, always serializes default values.
    * @return Returns `this`.
@@ -1052,9 +1060,8 @@
   }
 
   /**
-   * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
-   * called `finish()`. The actual data starts at the ByteBuffer's current position,
-   * not necessarily at `0`.
+   * Get the ByteBuffer representing the FlatBuffer. Only call this after you've called `finish()`.
+   * The actual data starts at the ByteBuffer's current position, not necessarily at `0`.
    *
    * @return The [ReadBuffer] representing the FlatBuffer
    */
@@ -1068,7 +1075,7 @@
    *
    * @return A full copy of the [data buffer][.dataBuffer].
    */
- public fun sizedByteArray(start: Int = space, length: Int = buffer.capacity - space): ByteArray {
+  public fun sizedByteArray(start: Int = space, length: Int = buffer.capacity - space): ByteArray {
     finished()
     val array = ByteArray(length)
     buffer.getBytes(array, start)
@@ -1080,26 +1087,29 @@
    *
    * @param offset virtual table offset
    * @return true if the filed is present
-  */
+   */
   public fun Table.isFieldPresent(offset: Int): Boolean = this.offset(offset) != 0
 }
 
-public fun Double.sign(): Double = when {
-  this.isNaN() -> Double.NaN
-  this > 0 -> 1.0
-  this < 0 -> -1.0
-  else -> this
-}
+public fun Double.sign(): Double =
+  when {
+    this.isNaN() -> Double.NaN
+    this > 0 -> 1.0
+    this < 0 -> -1.0
+    else -> this
+  }
 
-public fun Float.sign(): Float = when {
-  this.isNaN() -> Float.NaN
-  this > 0 -> 1.0f
-  this < 0 -> -1.0f
-  else -> this
-}
+public fun Float.sign(): Float =
+  when {
+    this.isNaN() -> Float.NaN
+    this > 0 -> 1.0f
+    this < 0 -> -1.0f
+    else -> this
+  }
 
-public fun Int.sign(): Int = when {
-  this > 0 -> 1
-  this < 0 -> -1
-  else -> this
-}
+public fun Int.sign(): Int =
+  when {
+    this > 0 -> 1
+    this < 0 -> -1
+    else -> this
+  }
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Flatbuffers.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Flatbuffers.kt
index cdfe09a..4ac5a89 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Flatbuffers.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Flatbuffers.kt
@@ -20,29 +20,33 @@
 
 // For now a typealias to guarantee type safety.
 public typealias UnionOffset = Offset<Any>
+
 public typealias UnionOffsetArray = OffsetArray<Any>
+
 public typealias StringOffsetArray = OffsetArray<String>
 
-public inline fun UnionOffsetArray(size: Int, crossinline call: (Int) -> Offset<Any>): UnionOffsetArray =
-  UnionOffsetArray(IntArray(size) { call(it).value })
-public inline fun StringOffsetArray(size: Int, crossinline call: (Int) -> Offset<String>): StringOffsetArray =
-  StringOffsetArray(IntArray(size) { call(it).value })
-/**
- * Represents a "pointer" to a pointer types (table, string, struct) within the buffer
- */
+public inline fun UnionOffsetArray(
+  size: Int,
+  crossinline call: (Int) -> Offset<Any>,
+): UnionOffsetArray = UnionOffsetArray(IntArray(size) { call(it).value })
+
+public inline fun StringOffsetArray(
+  size: Int,
+  crossinline call: (Int) -> Offset<String>,
+): StringOffsetArray = StringOffsetArray(IntArray(size) { call(it).value })
+
+/** Represents a "pointer" to a pointer types (table, string, struct) within the buffer */
 @JvmInline
 public value class Offset<T>(public val value: Int) {
   public fun toUnion(): UnionOffset = UnionOffset(value)
 }
 
-/**
- * Represents an array of offsets. Used to avoid boxing
- * offset types.
- */
+/** Represents an array of offsets. Used to avoid boxing offset types. */
 @JvmInline
 public value class OffsetArray<T>(public val value: IntArray) {
   public inline val size: Int
     get() = value.size
+
   public inline operator fun get(index: Int): Offset<T> = Offset(value[index])
 }
 
@@ -50,12 +54,8 @@
   return OffsetArray(IntArray(size) { call(it).value })
 }
 
-
-/**
- * Represents a "pointer" to a vector type with elements T
- */
-@JvmInline
-public value class VectorOffset<T>(public val value: Int)
+/** Represents a "pointer" to a vector type with elements T */
+@JvmInline public value class VectorOffset<T>(public val value: Int)
 
 public fun <T> Int.toOffset(): Offset<T> = Offset(this)
 
@@ -64,28 +64,30 @@
 public operator fun <T> Int.minus(other: Offset<T>): Int {
   return this - other.value
 }
-/**
- * All tables in the generated code derive from this class, and add their own accessors.
- */
+
+/** All tables in the generated code derive from this class, and add their own accessors. */
 public open class Table {
 
-  /** Used to hold the position of the `bb` buffer.  */
+  /** Used to hold the position of the `bb` buffer. */
   public var bufferPos: Int = 0
 
-  /** The underlying ReadWriteBuffer to hold the data of the Table.  */
+  /** The underlying ReadWriteBuffer to hold the data of the Table. */
   public var bb: ReadWriteBuffer = emptyBuffer
 
-  /** Used to hold the vtable position.  */
+  /** Used to hold the vtable position. */
   public var vtableStart: Int = 0
 
-  /** Used to hold the vtable size.  */
+  /** Used to hold the vtable size. */
   public var vtableSize: Int = 0
 
-  protected inline fun <reified T> Int.invalid(default: T, crossinline valid: (Int) -> T) : T =
+  protected inline fun <reified T> Int.invalid(default: T, crossinline valid: (Int) -> T): T =
     if (this != 0) valid(this) else default
 
-  protected inline fun <reified T> lookupField(i: Int, default: T, crossinline found: (Int) -> T) : T =
-    offset(i).invalid(default) { found(it) }
+  protected inline fun <reified T> lookupField(
+    i: Int,
+    default: T,
+    crossinline found: (Int) -> T,
+  ): T = offset(i).invalid(default) { found(it) }
 
   /**
    * Look up a field in the vtable.
@@ -107,10 +109,10 @@
   /**
    * Create a Java `String` from UTF-8 data stored inside the FlatBuffer.
    *
-   * This allocates a new string and converts to wide chars upon each access,
-   * which is not very efficient. Instead, each FlatBuffer string also comes with an
-   * accessor based on __vector_as_ReadWriteBuffer below, which is much more efficient,
-   * assuming your Java program can handle UTF-8 data directly.
+   * This allocates a new string and converts to wide chars upon each access, which is not very
+   * efficient. Instead, each FlatBuffer string also comes with an accessor based on
+   * __vector_as_ReadWriteBuffer below, which is much more efficient, assuming your Java program can
+   * handle UTF-8 data directly.
    *
    * @param offset An `int` index into the Table's ReadWriteBuffer.
    * @return Returns a `String` from the data stored inside the FlatBuffer at `offset`.
@@ -141,23 +143,24 @@
     newOffset += bufferPos
     return newOffset + bb.getInt(newOffset) + Int.SIZE_BYTES // data starts after the length
   }
-    /**
-     * Initialize vector as a ReadWriteBuffer.
-     *
-     * This is more efficient than using duplicate, since it doesn't copy the data
-     * nor allocates a new [ReadBuffer], creating no garbage to be collected.
-     *
-     * @param buffer The [ReadBuffer] for the array
-     * @param vectorOffset The position of the vector in the byte buffer
-     * @param elemSize The size of each element in the array
-     * @return The [ReadBuffer] for the array
-     */
-    public fun vectorAsBuffer(buffer: ReadWriteBuffer, vectorOffset: Int, elemSize: Int): ReadBuffer {
-        val o = offset(vectorOffset)
-        if (o == 0) return emptyBuffer
-        val vectorStart = vector(o)
-        return buffer.slice(vectorStart, vectorLength(o) * elemSize)
-    }
+
+  /**
+   * Initialize vector as a ReadWriteBuffer.
+   *
+   * This is more efficient than using duplicate, since it doesn't copy the data nor allocates a new
+   * [ReadBuffer], creating no garbage to be collected.
+   *
+   * @param buffer The [ReadBuffer] for the array
+   * @param vectorOffset The position of the vector in the byte buffer
+   * @param elemSize The size of each element in the array
+   * @return The [ReadBuffer] for the array
+   */
+  public fun vectorAsBuffer(buffer: ReadWriteBuffer, vectorOffset: Int, elemSize: Int): ReadBuffer {
+    val o = offset(vectorOffset)
+    if (o == 0) return emptyBuffer
+    val vectorStart = vector(o)
+    return buffer.slice(vectorStart, vectorLength(o) * elemSize)
+  }
 
   /**
    * Initialize any Table-derived type to point to the union at the given `offset`.
@@ -194,7 +197,7 @@
    * This method exists primarily to allow recycling Table instances without risking memory leaks
    * due to `ReadWriteBuffer` references.
    */
-  public inline fun <reified T: Table> reset(i: Int, reuseBuffer: ReadWriteBuffer): T {
+  public inline fun <reified T : Table> reset(i: Int, reuseBuffer: ReadWriteBuffer): T {
     bb = reuseBuffer
     if (bb != emptyBuffer) {
       bufferPos = i
@@ -212,10 +215,10 @@
    * Resets the internal state with a null `ReadWriteBuffer` and a zero position.
    *
    * This method exists primarily to allow recycling Table instances without risking memory leaks
-   * due to `ReadWriteBuffer` references. The instance will be unusable until it is assigned
-   * again to a `ReadWriteBuffer`.
+   * due to `ReadWriteBuffer` references. The instance will be unusable until it is assigned again
+   * to a `ReadWriteBuffer`.
    */
-  public inline fun <reified T: Table> reset(): T = reset(0, emptyBuffer)
+  public inline fun <reified T : Table> reset(): T = reset(0, emptyBuffer)
 
   public companion object {
 
@@ -238,10 +241,10 @@
     /**
      * Create a Java `String` from UTF-8 data stored inside the FlatBuffer.
      *
-     * This allocates a new string and converts to wide chars upon each access,
-     * which is not very efficient. Instead, each FlatBuffer string also comes with an
-     * accessor based on __vector_as_ReadWriteBuffer below, which is much more efficient,
-     * assuming your Java program can handle UTF-8 data directly.
+     * This allocates a new string and converts to wide chars upon each access, which is not very
+     * efficient. Instead, each FlatBuffer string also comes with an accessor based on
+     * __vector_as_ReadWriteBuffer below, which is much more efficient, assuming your Java program
+     * can handle UTF-8 data directly.
      *
      * @param offset An `int` index into the Table's ReadWriteBuffer.
      * @param bb Table ReadWriteBuffer used to read a string at given offset.
@@ -268,8 +271,7 @@
     /**
      * Check if a [ReadWriteBuffer] contains a file identifier.
      *
-     * @param bb A `ReadWriteBuffer` to check if it contains the identifier
-     * `ident`.
+     * @param bb A `ReadWriteBuffer` to check if it contains the identifier `ident`.
      * @param ident A `String` identifier of the FlatBuffer file.
      * @return True if the buffer contains the file identifier
      */
@@ -330,14 +332,12 @@
   }
 }
 
-/**
- * All structs in the generated code derive from this class, and add their own accessors.
- */
+/** All structs in the generated code derive from this class, and add their own accessors. */
 public open class Struct {
-  /** Used to hold the position of the `bb` buffer.  */
+  /** Used to hold the position of the `bb` buffer. */
   protected var bufferPos: Int = 0
 
-  /** The underlying ByteBuffer to hold the data of the Struct.  */
+  /** The underlying ByteBuffer to hold the data of the Struct. */
   protected var bb: ReadWriteBuffer = emptyBuffer
 
   /**
@@ -346,7 +346,7 @@
    * This method exists primarily to allow recycling Table instances without risking memory leaks
    * due to `ByteBuffer` references.
    */
-  protected inline fun <reified T: Struct> reset(i: Int, reuseBuffer: ReadWriteBuffer): T {
+  protected inline fun <reified T : Struct> reset(i: Int, reuseBuffer: ReadWriteBuffer): T {
     bb = reuseBuffer
     bufferPos = if (bb != emptyBuffer) i else 0
     return this as T
@@ -356,12 +356,13 @@
    * Resets internal state with a null `ByteBuffer` and a zero position.
    *
    * This method exists primarily to allow recycling Struct instances without risking memory leaks
-   * due to `ByteBuffer` references. The instance will be unusable until it is assigned
-   * again to a `ByteBuffer`.
+   * due to `ByteBuffer` references. The instance will be unusable until it is assigned again to a
+   * `ByteBuffer`.
    */
-  private inline fun <reified T: Struct> reset(): T = reset(0, emptyBuffer)
+  private inline fun <reified T : Struct> reset(): T = reset(0, emptyBuffer)
 }
 
-public inline val <T> T.value: T get() = this
+public inline val <T> T.value: T
+  get() = this
 
 public const val VERSION_2_0_8: Int = 1
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffers.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffers.kt
index 0f9cd7d..bf6b8e9 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffers.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffers.kt
@@ -15,13 +15,14 @@
  */
 @file:Suppress("NOTHING_TO_INLINE")
 @file:JvmName("FlexBuffers")
+
 package com.google.flatbuffers.kotlin
 
 import kotlin.jvm.JvmName
 
 /**
- * Reads a FlexBuffer message in ReadBuf and returns [Reference] to
- * the root element.
+ * Reads a FlexBuffer message in ReadBuf and returns [Reference] to the root element.
+ *
  * @param buffer ReadBuf containing FlexBuffer message
  * @return [Reference] to the root object
  */
@@ -34,199 +35,231 @@
 }
 
 /**
- * Represents an generic element in the buffer. It can be specialized into scalar types, using for example,
- * [Reference.toInt], or casted into Flexbuffer object types, like [Reference.toMap] or [Reference.toBlob].
+ * Represents an generic element in the buffer. It can be specialized into scalar types, using for
+ * example, [Reference.toInt], or casted into Flexbuffer object types, like [Reference.toMap] or
+ * [Reference.toBlob].
  */
 @Suppress("NOTHING_TO_INLINE")
-public class Reference internal constructor(
+public class Reference
+internal constructor(
   internal val buffer: ReadBuffer,
   internal val end: Int,
   internal val parentWidth: ByteWidth,
   internal val byteWidth: ByteWidth,
-  public val type: FlexBufferType
+  public val type: FlexBufferType,
 ) {
 
-  internal constructor(bb: ReadBuffer, end: Int, parentWidth: ByteWidth, packedType: Int) :
-    this(bb, end, parentWidth, ByteWidth(1 shl (packedType and 3)), FlexBufferType((packedType shr 2)))
+  internal constructor(
+    bb: ReadBuffer,
+    end: Int,
+    parentWidth: ByteWidth,
+    packedType: Int,
+  ) : this(
+    bb,
+    end,
+    parentWidth,
+    ByteWidth(1 shl (packedType and 3)),
+    FlexBufferType((packedType shr 2)),
+  )
 
   /**
    * Checks whether the element is null type
+   *
    * @return true if null type
    */
-  public val isNull: Boolean get() = type == T_NULL
+  public val isNull: Boolean
+    get() = type == T_NULL
 
   /**
    * Checks whether the element is boolean type
+   *
    * @return true if boolean type
    */
-  public val isBoolean: Boolean get() = type == T_BOOL
+  public val isBoolean: Boolean
+    get() = type == T_BOOL
 
   /**
    * Checks whether the element type is numeric (signed/unsigned integers and floats)
+   *
    * @return true if numeric type
    */
-  public val isNumeric: Boolean get() = isIntOrUInt || isFloat
+  public val isNumeric: Boolean
+    get() = isIntOrUInt || isFloat
 
   /**
    * Checks whether the element type is signed or unsigned integers
+   *
    * @return true if an integer type
    */
-  public val isIntOrUInt: Boolean get() = isInt || isUInt
+  public val isIntOrUInt: Boolean
+    get() = isInt || isUInt
 
   /**
    * Checks whether the element type is float
+   *
    * @return true if a float type
    */
-  public val isFloat: Boolean get() = type == T_FLOAT || type == T_INDIRECT_FLOAT
+  public val isFloat: Boolean
+    get() = type == T_FLOAT || type == T_INDIRECT_FLOAT
 
   /**
    * Checks whether the element type is signed integer
+   *
    * @return true if a signed integer type
    */
-  public val isInt: Boolean get() = type == T_INT || type == T_INDIRECT_INT
+  public val isInt: Boolean
+    get() = type == T_INT || type == T_INDIRECT_INT
 
   /**
    * Checks whether the element type is signed integer
+   *
    * @return true if a signed integer type
    */
-  public val isUInt: Boolean get() = type == T_UINT || type == T_INDIRECT_UINT
+  public val isUInt: Boolean
+    get() = type == T_UINT || type == T_INDIRECT_UINT
 
   /**
    * Checks whether the element type is string
+   *
    * @return true if a string type
    */
-  public val isString: Boolean get() = type == T_STRING
+  public val isString: Boolean
+    get() = type == T_STRING
 
   /**
    * Checks whether the element type is key
+   *
    * @return true if a key type
    */
-  public val isKey: Boolean get() = type == T_KEY
+  public val isKey: Boolean
+    get() = type == T_KEY
 
   /**
-   * Checks whether the element type is vector or a map. [TypedVector] are considered different types and will return
-   * false.
+   * Checks whether the element type is vector or a map. [TypedVector] are considered different
+   * types and will return false.
+   *
    * @return true if a vector type
    */
-  public val isVector: Boolean get() = type == T_VECTOR || type == T_MAP
+  public val isVector: Boolean
+    get() = type == T_VECTOR || type == T_MAP
 
   /**
    * Checks whether the element type is typed vector
+   *
    * @return true if a typed vector type
    */
-  public val isTypedVector: Boolean get() = type.isTypedVector()
+  public val isTypedVector: Boolean
+    get() = type.isTypedVector()
 
   /**
    * Checks whether the element type is a map
+   *
    * @return true if a map type
    */
-  public val isMap: Boolean get() = type == T_MAP
+  public val isMap: Boolean
+    get() = type == T_MAP
 
   /**
    * Checks whether the element type is a blob
+   *
    * @return true if a blob type
    */
-  public val isBlob: Boolean get() = type == T_BLOB
+  public val isBlob: Boolean
+    get() = type == T_BLOB
 
-  /**
-   * Assumes [Reference] as a [Vector] and returns a [Reference] at index [index].
-   */
+  /** Assumes [Reference] as a [Vector] and returns a [Reference] at index [index]. */
   public operator fun get(index: Int): Reference = toVector()[index]
 
-  /**
-   * Assumes [Reference] as a [Map] and returns a [Reference] for the value at key [key].
-   */
+  /** Assumes [Reference] as a [Map] and returns a [Reference] for the value at key [key]. */
   public operator fun get(key: String): Reference = toMap()[key]
 
   /**
-   * Returns element as a [Boolean].
-   * If element type is not boolean, it will be casted to integer and compared against 0
+   * Returns element as a [Boolean]. If element type is not boolean, it will be casted to integer
+   * and compared against 0
+   *
    * @return element as [Boolean]
    */
   public fun toBoolean(): Boolean = if (isBoolean) buffer.getBoolean(end) else toUInt() != 0u
 
   /**
-   * Returns element as [Byte].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will be parsed as integer.
-   *  Unsigned elements will become signed (with possible overflow).
-   *  Float elements will be casted to [Byte].
+   * Returns element as [Byte]. For vector types, it will return size of the vector. For String
+   * type, it will be parsed as integer. Unsigned elements will become signed (with possible
+   * overflow). Float elements will be casted to [Byte].
+   *
    * @return [Byte] or 0 if fail to convert element to integer.
    */
   public fun toByte(): Byte = toULong().toByte()
 
   /**
-   * Returns element as [Short].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will type to be parsed as integer.
-   *  Unsigned elements will become signed (with possible overflow).
-   *  Float elements will be casted to [Short]
+   * Returns element as [Short]. For vector types, it will return size of the vector. For String
+   * type, it will type to be parsed as integer. Unsigned elements will become signed (with possible
+   * overflow). Float elements will be casted to [Short]
+   *
    * @return [Short] or 0 if fail to convert element to integer.
    */
   public fun toShort(): Short = toULong().toShort()
 
   /**
-   * Returns element as [Int].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will type to be parsed as integer.
-   *  Unsigned elements will become signed (with possible overflow).
-   *  Float elements will be casted to [Int]
+   * Returns element as [Int]. For vector types, it will return size of the vector. For String type,
+   * it will type to be parsed as integer. Unsigned elements will become signed (with possible
+   * overflow). Float elements will be casted to [Int]
+   *
    * @return [Int] or 0 if fail to convert element to integer.
    */
   public fun toInt(): Int = toULong().toInt()
 
   /**
-   * Returns element as [Long].
-   * For vector types, it will return size of the vector
-   * For String type, it will type to be parsed as integer
-   * Unsigned elements will become negative
-   * Float elements will be casted to integer
+   * Returns element as [Long]. For vector types, it will return size of the vector For String type,
+   * it will type to be parsed as integer Unsigned elements will become negative Float elements will
+   * be casted to integer
+   *
    * @return [Long] integer or 0 if fail to convert element to long.
    */
   public fun toLong(): Long = toULong().toLong()
 
   /**
-   * Returns element as [UByte].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will type to be parsed as integer.
-   *  Negative elements will become unsigned counterpart.
-   *  Float elements will be casted to [UByte]
+   * Returns element as [UByte]. For vector types, it will return size of the vector. For String
+   * type, it will type to be parsed as integer. Negative elements will become unsigned counterpart.
+   * Float elements will be casted to [UByte]
+   *
    * @return [UByte] or 0 if fail to convert element to integer.
    */
   public fun toUByte(): UByte = toULong().toUByte()
 
   /**
-   * Returns element as [UShort].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will type to be parsed as integer.
-   *  Negative elements will become unsigned counterpart.
-   *  Float elements will be casted to [UShort]
+   * Returns element as [UShort]. For vector types, it will return size of the vector. For String
+   * type, it will type to be parsed as integer. Negative elements will become unsigned counterpart.
+   * Float elements will be casted to [UShort]
+   *
    * @return [UShort] or 0 if fail to convert element to integer.
    */
   public fun toUShort(): UShort = toULong().toUShort()
 
   /**
-   * Returns element as [UInt].
-   *  For vector types, it will return size of the vector.
-   *  For String type, it will type to be parsed as integer.
-   *  Negative elements will become unsigned counterpart.
-   *  Float elements will be casted to [UInt]
+   * Returns element as [UInt]. For vector types, it will return size of the vector. For String
+   * type, it will type to be parsed as integer. Negative elements will become unsigned counterpart.
+   * Float elements will be casted to [UInt]
+   *
    * @return [UInt] or 0 if fail to convert element to integer.
    */
   public fun toUInt(): UInt = toULong().toUInt()
 
   /**
-   * Returns element as  [ULong] integer.
-   * For vector types, it will return size of the vector
-   * For String type, it will type to be parsed as integer
-   * Negative elements will become unsigned counterpart.
-   * Float elements will be casted to integer
+   * Returns element as [ULong] integer. For vector types, it will return size of the vector For
+   * String type, it will type to be parsed as integer Negative elements will become unsigned
+   * counterpart. Float elements will be casted to integer
+   *
    * @return [ULong] integer or 0 if fail to convert element to long.
    */
   public fun toULong(): ULong = resolve { pos: Int, width: ByteWidth ->
     when (type) {
-      T_INDIRECT_INT, T_INDIRECT_UINT, T_INT, T_BOOL, T_UINT -> buffer.readULong(pos, width)
-      T_FLOAT, T_INDIRECT_FLOAT -> buffer.readFloat(pos, width).toULong()
+      T_INDIRECT_INT,
+      T_INDIRECT_UINT,
+      T_INT,
+      T_BOOL,
+      T_UINT -> buffer.readULong(pos, width)
+      T_FLOAT,
+      T_INDIRECT_FLOAT -> buffer.readFloat(pos, width).toULong()
       T_STRING -> toString().toULong()
       T_VECTOR -> toVector().size.toULong()
       else -> 0UL
@@ -234,17 +267,18 @@
   }
 
   /**
-   * Returns element as  [Float].
-   * For vector types, it will return size of the vector
-   * For String type, it will type to be parsed as [Float]
-   * Float elements will be casted to integer
+   * Returns element as [Float]. For vector types, it will return size of the vector For String
+   * type, it will type to be parsed as [Float] Float elements will be casted to integer
+   *
    * @return [Float] integer or 0 if fail to convert element to long.
    */
   public fun toFloat(): Float = resolve { pos: Int, width: ByteWidth ->
     when (type) {
-      T_INDIRECT_FLOAT, T_FLOAT -> buffer.readFloat(pos, width).toFloat()
+      T_INDIRECT_FLOAT,
+      T_FLOAT -> buffer.readFloat(pos, width).toFloat()
       T_INT -> buffer.readInt(end, parentWidth).toFloat()
-      T_UINT, T_BOOL -> buffer.readUInt(end, parentWidth).toFloat()
+      T_UINT,
+      T_BOOL -> buffer.readUInt(end, parentWidth).toFloat()
       T_INDIRECT_INT -> buffer.readInt(pos, width).toFloat()
       T_INDIRECT_UINT -> buffer.readUInt(pos, width).toFloat()
       T_NULL -> 0.0f
@@ -255,16 +289,18 @@
   }
 
   /**
-   * Returns element as  [Double].
-   * For vector types, it will return size of the vector
-   * For String type, it will type to be parsed as [Double]
+   * Returns element as [Double]. For vector types, it will return size of the vector For String
+   * type, it will type to be parsed as [Double]
+   *
    * @return [Float] integer or 0 if fail to convert element to long.
    */
   public fun toDouble(): Double = resolve { pos: Int, width: ByteWidth ->
     when (type) {
-      T_INDIRECT_FLOAT, T_FLOAT -> buffer.readFloat(pos, width)
+      T_INDIRECT_FLOAT,
+      T_FLOAT -> buffer.readFloat(pos, width)
       T_INT -> buffer.readInt(pos, width).toDouble()
-      T_UINT, T_BOOL -> buffer.readUInt(pos, width).toDouble()
+      T_UINT,
+      T_BOOL -> buffer.readUInt(pos, width).toDouble()
       T_INDIRECT_INT -> buffer.readInt(pos, width).toDouble()
       T_INDIRECT_UINT -> buffer.readUInt(pos, width).toDouble()
       T_NULL -> 0.0
@@ -274,40 +310,48 @@
     }
   }
 
-  /**
-   * Returns element as [Key] or invalid key.
-   */
-  public fun toKey(): Key = when (type) {
-    T_KEY -> Key(buffer, buffer.indirect(end, parentWidth))
-    else -> nullKey()
-  }
+  /** Returns element as [Key] or invalid key. */
+  public fun toKey(): Key =
+    when (type) {
+      T_KEY -> Key(buffer, buffer.indirect(end, parentWidth))
+      else -> nullKey()
+    }
+
   /**
    * Returns element as a [String]
+   *
    * @return element as [String] or empty [String] if fail
    */
-  override fun toString(): String = when (type) {
-    T_STRING -> {
-      val start = buffer.indirect(end, parentWidth)
-      val size = buffer.readULong(start - byteWidth, byteWidth).toInt()
-      buffer.getString(start, size)
+  override fun toString(): String =
+    when (type) {
+      T_STRING -> {
+        val start = buffer.indirect(end, parentWidth)
+        val size = buffer.readULong(start - byteWidth, byteWidth).toInt()
+        buffer.getString(start, size)
+      }
+      T_KEY -> buffer.getKeyString(buffer.indirect(end, parentWidth))
+      T_MAP -> "{ ${toMap().entries.joinToString(", ") { "${it.key}: ${it.value}"}} }"
+      T_VECTOR,
+      T_VECTOR_BOOL,
+      T_VECTOR_FLOAT,
+      T_VECTOR_INT,
+      T_VECTOR_UINT,
+      T_VECTOR_KEY,
+      T_VECTOR_STRING_DEPRECATED -> "[ ${toVector().joinToString(", ") { it.toString() }} ]"
+      T_INT -> toLong().toString()
+      T_UINT -> toULong().toString()
+      T_FLOAT -> toDouble().toString()
+      else -> "${type.typeToString()}(end=$end)"
     }
-    T_KEY -> buffer.getKeyString(buffer.indirect(end, parentWidth))
-    T_MAP -> "{ ${toMap().entries.joinToString(", ") { "${it.key}: ${it.value}"}} }"
-    T_VECTOR, T_VECTOR_BOOL, T_VECTOR_FLOAT, T_VECTOR_INT,
-    T_VECTOR_UINT, T_VECTOR_KEY, T_VECTOR_STRING_DEPRECATED ->
-      "[ ${toVector().joinToString(", ") { it.toString() }} ]"
-    T_INT -> toLong().toString()
-    T_UINT -> toULong().toString()
-    T_FLOAT -> toDouble().toString()
-    else -> "${type.typeToString()}(end=$end)"
-  }
 
   /**
    * Returns element as a [ByteArray], converting scalar types when possible.
+   *
    * @return element as [ByteArray] or empty [ByteArray] if fail.
    */
   public fun toByteArray(): ByteArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> ByteArray(vec.size) { vec.getInt(it).toByte() }
       T_VECTOR_UINT -> ByteArray(vec.size) { vec.getUInt(it).toByte() }
@@ -319,10 +363,12 @@
 
   /**
    * Returns element as a [ByteArray], converting scalar types when possible.
+   *
    * @return element as [ByteArray] or empty [ByteArray] if fail.
    */
   public fun toShortArray(): ShortArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> ShortArray(vec.size) { vec.getInt(it).toShort() }
       T_VECTOR_UINT -> ShortArray(vec.size) { vec.getUInt(it).toShort() }
@@ -334,10 +380,12 @@
 
   /**
    * Returns element as a [IntArray], converting scalar types when possible.
+   *
    * @return element as [IntArray] or empty [IntArray] if fail.
    */
   public fun toIntArray(): IntArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> IntArray(vec.size) { vec.getInt(it).toInt() }
       T_VECTOR_UINT -> IntArray(vec.size) { vec.getUInt(it).toInt() }
@@ -349,10 +397,12 @@
 
   /**
    * Returns element as a [LongArray], converting scalar types when possible.
+   *
    * @return element as [LongArray] or empty [LongArray] if fail.
    */
   public fun toLongArray(): LongArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> LongArray(vec.size) { vec.getInt(it) }
       T_VECTOR_UINT -> LongArray(vec.size) { vec.getInt(it) }
@@ -364,10 +414,12 @@
 
   /**
    * Returns element as a [UByteArray], converting scalar types when possible.
+   *
    * @return element as [UByteArray] or empty [UByteArray] if fail.
    */
   public fun toUByteArray(): UByteArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> UByteArray(vec.size) { vec.getInt(it).toUByte() }
       T_VECTOR_UINT -> UByteArray(vec.size) { vec.getUInt(it).toUByte() }
@@ -379,10 +431,12 @@
 
   /**
    * Returns element as a [UIntArray], converting scalar types when possible.
+   *
    * @return element as [UIntArray] or empty [UIntArray] if fail.
    */
   public fun toUShortArray(): UShortArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> UShortArray(vec.size) { vec.getInt(it).toUShort() }
       T_VECTOR_UINT -> UShortArray(vec.size) { vec.getUInt(it).toUShort() }
@@ -394,10 +448,12 @@
 
   /**
    * Returns element as a [UIntArray], converting scalar types when possible.
+   *
    * @return element as [UIntArray] or empty [UIntArray] if fail.
    */
   public fun toUIntArray(): UIntArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> UIntArray(vec.size) { vec.getInt(it).toUInt() }
       T_VECTOR_UINT -> UIntArray(vec.size) { vec.getUInt(it).toUInt() }
@@ -409,10 +465,12 @@
 
   /**
    * Returns element as a [ULongArray], converting scalar types when possible.
+   *
    * @return element as [ULongArray] or empty [ULongArray] if fail.
    */
   public fun toULongArray(): ULongArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_INT -> ULongArray(vec.size) { vec.getUInt(it) }
       T_VECTOR_UINT -> ULongArray(vec.size) { vec.getUInt(it) }
@@ -424,10 +482,12 @@
 
   /**
    * Returns element as a [FloatArray], converting scalar types when possible.
+   *
    * @return element as [FloatArray] or empty [FloatArray] if fail.
    */
   public fun toFloatArray(): FloatArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_FLOAT -> FloatArray(vec.size) { vec.getFloat(it).toFloat() }
       T_VECTOR_INT -> FloatArray(vec.size) { vec.getInt(it).toFloat() }
@@ -439,10 +499,12 @@
 
   /**
    * Returns element as a [DoubleArray], converting scalar types when possible.
+   *
    * @return element as [DoubleArray] or empty [DoubleArray] if fail.
    */
   public fun toDoubleArray(): DoubleArray {
-    val vec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+    val vec =
+      TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
     return when (type) {
       T_VECTOR_FLOAT -> DoubleArray(vec.size) { vec[it].toDouble() }
       T_VECTOR_INT -> DoubleArray(vec.size) { vec[it].toDouble() }
@@ -454,35 +516,46 @@
 
   /**
    * Returns element as a [Vector]
+   *
    * @return element as [Vector] or empty [Vector] if fail
    */
   public fun toVector(): Vector {
     return when {
       isVector -> Vector(buffer, buffer.indirect(end, parentWidth), byteWidth)
-      isTypedVector -> TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth)
+      isTypedVector ->
+        TypedVector(
+          type.toElementTypedVector(),
+          buffer,
+          buffer.indirect(end, parentWidth),
+          byteWidth,
+        )
       else -> emptyVector()
     }
   }
 
   /**
    * Returns element as a [Blob]
+   *
    * @return element as [Blob] or empty [Blob] if fail
    */
   public fun toBlob(): Blob {
     return when (type) {
-      T_BLOB, T_STRING -> Blob(buffer, buffer.indirect(end, parentWidth), byteWidth)
+      T_BLOB,
+      T_STRING -> Blob(buffer, buffer.indirect(end, parentWidth), byteWidth)
       else -> emptyBlob()
     }
   }
 
   /**
    * Returns element as a [Map].
+   *
    * @return element as [Map] or empty [Map] if fail
    */
-  public fun toMap(): Map = when (type) {
-    T_MAP -> Map(buffer, buffer.indirect(end, parentWidth), byteWidth)
-    else -> emptyMap()
-  }
+  public fun toMap(): Map =
+    when (type) {
+      T_MAP -> Map(buffer, buffer.indirect(end, parentWidth), byteWidth)
+      else -> emptyMap()
+    }
 
   private inline fun <T> resolve(crossinline block: (pos: Int, width: ByteWidth) -> T): T {
     return if (type.isIndirectScalar()) {
@@ -496,12 +569,14 @@
     if (this === other) return true
     if (other == null || this::class != other::class) return false
     other as Reference
-    if (buffer != other.buffer ||
-      end != other.end ||
-      parentWidth != other.parentWidth ||
-      byteWidth != other.byteWidth ||
-      type != other.type
-    ) return false
+    if (
+      buffer != other.buffer ||
+        end != other.end ||
+        parentWidth != other.parentWidth ||
+        byteWidth != other.byteWidth ||
+        type != other.type
+    )
+      return false
     return true
   }
 
@@ -518,30 +593,28 @@
 /**
  * Represents any element that has a size property to it, like: [Map], [Vector] and [TypedVector].
  */
-public open class Sized internal constructor(
+public open class Sized
+internal constructor(
   public val buffer: ReadBuffer,
   public val end: Int,
-  public val byteWidth: ByteWidth
+  public val byteWidth: ByteWidth,
 ) {
   public open val size: Int = buffer.readSize(end, byteWidth)
 }
 
-/**
- * Represent an array of bytes in the buffer.
- */
-public open class Blob internal constructor(
-  buffer: ReadBuffer,
-  end: Int,
-  byteWidth: ByteWidth
-) : Sized(buffer, end, byteWidth) {
+/** Represent an array of bytes in the buffer. */
+public open class Blob internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth) :
+  Sized(buffer, end, byteWidth) {
   /**
    * Return [Blob] as [ReadBuffer]
+   *
    * @return blob as [ReadBuffer]
    */
   public fun data(): ReadBuffer = buffer.slice(end, size)
 
   /**
    * Copy [Blob] into a [ByteArray]
+   *
    * @return A [ByteArray] containing the blob data.
    */
   public fun toByteArray(): ByteArray {
@@ -554,6 +627,7 @@
 
   /**
    * Return individual byte at a given position
+   *
    * @param pos position of the byte to be read
    */
   public operator fun get(pos: Int): Byte {
@@ -564,18 +638,13 @@
   override fun toString(): String = buffer.getString(end, size)
 }
 
-/**
- * [Vector] represents an array of elements in the buffer. The element can be of any type.
- */
-public open class Vector internal constructor(
-  buffer: ReadBuffer,
-  end: Int,
-  byteWidth: ByteWidth
-) : Collection<Reference>,
-  Sized(buffer, end, byteWidth) {
+/** [Vector] represents an array of elements in the buffer. The element can be of any type. */
+public open class Vector internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth) :
+  Collection<Reference>, Sized(buffer, end, byteWidth) {
 
   /**
    * Returns a [Reference] from the [Vector] at position [index]. Returns a null reference
+   *
    * @param index position in the vector.
    * @return [Reference] for a key or a null [Reference] if not found.
    */
@@ -597,25 +666,27 @@
 
   override fun isEmpty(): Boolean = size == 0
 
-  override fun iterator(): Iterator<Reference> = object : Iterator<Reference> {
-    var position = 0
-    override fun hasNext(): Boolean = position != size
-    override fun next(): Reference = get(position++)
-  }
+  override fun iterator(): Iterator<Reference> =
+    object : Iterator<Reference> {
+      var position = 0
+
+      override fun hasNext(): Boolean = position != size
+
+      override fun next(): Reference = get(position++)
+    }
 }
 
-/**
- * [TypedVector] represents an array of scalar elements of the same type in the buffer.
- */
+/** [TypedVector] represents an array of scalar elements of the same type in the buffer. */
 public open class TypedVector(
   private val elementType: FlexBufferType,
   buffer: ReadBuffer,
   end: Int,
-  byteWidth: ByteWidth
+  byteWidth: ByteWidth,
 ) : Vector(buffer, end, byteWidth) {
 
   /**
    * Returns a [Reference] from the [TypedVector] at position [index]. Returns a null reference
+   *
    * @param index position in the vector.
    * @return [Reference] for a key or a null [Reference] if not found.
    */
@@ -630,28 +701,24 @@
     return block(childPos, byteWidth)
   }
 
-  internal fun getBoolean(index: Int): Boolean = resolveAt(index) {
-      pos: Int, _: ByteWidth -> buffer.getBoolean(pos)
-  }
-  internal fun getInt(index: Int): Long = resolveAt(index) {
-      pos: Int, width: ByteWidth -> buffer.readLong(pos, width)
-  }
-  internal fun getUInt(index: Int): ULong = resolveAt(index) {
-      pos: Int, width: ByteWidth -> buffer.readULong(pos, width)
-  }
-  internal fun getFloat(index: Int): Double = resolveAt(index) {
-      pos: Int, width: ByteWidth -> buffer.readFloat(pos, width)
-  }
+  internal fun getBoolean(index: Int): Boolean =
+    resolveAt(index) { pos: Int, _: ByteWidth -> buffer.getBoolean(pos) }
+
+  internal fun getInt(index: Int): Long =
+    resolveAt(index) { pos: Int, width: ByteWidth -> buffer.readLong(pos, width) }
+
+  internal fun getUInt(index: Int): ULong =
+    resolveAt(index) { pos: Int, width: ByteWidth -> buffer.readULong(pos, width) }
+
+  internal fun getFloat(index: Int): Double =
+    resolveAt(index) { pos: Int, width: ByteWidth -> buffer.readFloat(pos, width) }
 }
 
-/**
- * Represents a key element in the buffer. Keys are
- * used to reference objects in a [Map]
- */
+/** Represents a key element in the buffer. Keys are used to reference objects in a [Map] */
 public data class Key(
   public val buffer: ReadBuffer,
   public val start: Int,
-  public val end: Int = buffer.findFirst(ZeroByte, start)
+  public val end: Int = buffer.findFirst(ZeroByte, start),
 ) {
 
   val sizeInBytes: Int = end - start
@@ -704,25 +771,21 @@
     }
   }
 
-  override fun toString(): String = if (sizeInBytes > 0) buffer.getString(start, sizeInBytes) else ""
+  override fun toString(): String =
+    if (sizeInBytes > 0) buffer.getString(start, sizeInBytes) else ""
 
-  /**
-   * Checks whether Key is invalid or not.
-   */
+  /** Checks whether Key is invalid or not. */
   public fun isInvalid(): Boolean = sizeInBytes <= 0
 }
 
-/**
- * A Map class that provide support to access Key-Value data from Flexbuffers.
- */
-public class Map
-  internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth):
-  Sized(buffer, end, byteWidth),
-  kotlin.collections.Map<Key, Reference> {
+/** A Map class that provide support to access Key-Value data from Flexbuffers. */
+public class Map internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth) :
+  Sized(buffer, end, byteWidth), kotlin.collections.Map<Key, Reference> {
 
   // used for accessing the key vector elements
   private var keyVectorEnd: Int
   private var keyVectorByteWidth: ByteWidth
+
   init {
     val keysOffset = end - (3 * byteWidth) // 3 is number of prefixed fields
     keyVectorEnd = buffer.indirect(keysOffset, byteWidth)
@@ -731,6 +794,7 @@
 
   /**
    * Returns a [Reference] from the [Map] at position [index]. Returns a null reference
+   *
    * @param index position in the map
    * @return [Reference] for a key or a null [Reference] if not found.
    */
@@ -744,6 +808,7 @@
 
   /**
    * Returns a [Reference] from the [Map] for a given [String] [key].
+   *
    * @param key access key to element on map
    * @return [Reference] for a key or a null [Reference] if not found.
    */
@@ -756,6 +821,7 @@
 
   /**
    * Returns a [Reference] from the [Map] for a given [Key] [key].
+   *
    * @param key access key to element on map
    * @return [Reference] for a key or a null [Reference] if not found.
    */
@@ -768,6 +834,7 @@
 
   /**
    * Checks whether the map contains a [key].
+   *
    * @param key [String]
    * @return true if key is found in the map, otherwise false.
    */
@@ -775,6 +842,7 @@
 
   /**
    * Returns a [Key] for a given position [index] in the [Map].
+   *
    * @param index of the key in the map
    * @return a Key for the given index. Out of bounds indexes returns invalid keys.
    */
@@ -785,6 +853,7 @@
 
   /**
    * Returns a [Key] as [String] for a given position [index] in the [Map].
+   *
    * @param index of the key in the map
    * @return a Key for the given index. Out of bounds indexes returns empty string.
    */
@@ -815,6 +884,7 @@
 
   /**
    * Returns a [Vector] for accessing all values in the [Map].
+   *
    * @return [Vector] of values.
    */
   override val values: Collection<Reference>
@@ -822,8 +892,7 @@
 
   override fun containsKey(key: Key): Boolean {
     for (i in 0 until size) {
-      if (key == keyAt(i))
-        return true
+      if (key == keyAt(i)) return true
     }
     return false
   }
@@ -833,7 +902,10 @@
   override fun isEmpty(): Boolean = size == 0
 
   // Performs a binary search on a key vector and return index of the key in key vector
-  private fun binarySearch(searchedKey: String) = binarySearch { compareCharSequence(it, searchedKey) }
+  private fun binarySearch(searchedKey: String) = binarySearch {
+    compareCharSequence(it, searchedKey)
+  }
+
   // Performs a binary search on a key vector and return index of the key in key vector
   private fun binarySearch(key: Key): Int = binarySearch { compareKeys(it, key.start) }
 
@@ -891,8 +963,7 @@
       ++bufferPos
       ++otherPos
     }
-    if (bufferPos < limit)
-      return 0
+    if (bufferPos < limit) return 0
 
     val comparisonBuffer = ByteArray(4)
     while (bufferPos < limit) {
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersBuilder.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersBuilder.kt
index 52e16af..74de5fc 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersBuilder.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersBuilder.kt
@@ -20,11 +20,13 @@
 @ExperimentalUnsignedTypes
 public class FlexBuffersBuilder(
   public val buffer: ReadWriteBuffer,
-  private val shareFlag: Int = SHARE_KEYS
+  private val shareFlag: Int = SHARE_KEYS,
 ) {
 
-  public constructor(initialCapacity: Int = 1024, shareFlag: Int = SHARE_KEYS) :
-    this(ArrayReadWriteBuffer(initialCapacity), shareFlag)
+  public constructor(
+    initialCapacity: Int = 1024,
+    shareFlag: Int = SHARE_KEYS,
+  ) : this(ArrayReadWriteBuffer(initialCapacity), shareFlag)
 
   private val stringValuePool: HashMap<String, Value> = HashMap()
   private val stringKeyPool: HashMap<String, Int> = HashMap()
@@ -32,8 +34,8 @@
   private var finished: Boolean = false
 
   /**
-   * Reset the FlexBuffersBuilder by purging all data that it holds. Buffer might
-   * keep its capacity after a reset.
+   * Reset the FlexBuffersBuilder by purging all data that it holds. Buffer might keep its capacity
+   * after a reset.
    */
   public fun clear() {
     buffer.clear()
@@ -44,9 +46,9 @@
   }
 
   /**
-   * Finish writing the message into the buffer. After that no other element must
-   * be inserted into the buffer. Also, you must call this function before start using the
-   * FlexBuffer message
+   * Finish writing the message into the buffer. After that no other element must be inserted into
+   * the buffer. Also, you must call this function before start using the FlexBuffer message
+   *
    * @return [ReadBuffer] containing the FlexBuffer message
    */
   public fun finish(): ReadBuffer {
@@ -69,45 +71,46 @@
 
   /**
    * Insert a single [Boolean] into the buffer
+   *
    * @param value true or false
    */
   public fun put(value: Boolean): Unit = run { this[null] = value }
 
   /**
-   * Insert a null reference into the buffer. A key must be present if element is inserted into a map.
+   * Insert a null reference into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public fun putNull(key: String? = null): Unit =
-    run { stack.add(Value(T_NULL, putKey(key), W_8, 0UL)) }
+  public fun putNull(key: String? = null): Unit = run {
+    stack.add(Value(T_NULL, putKey(key), W_8, 0UL))
+  }
 
   /**
-   * Insert a single [Boolean] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Boolean] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public operator fun set(key: String? = null, value: Boolean): Unit =
-    run { stack.add(Value(T_BOOL, putKey(key), W_8, if (value) 1UL else 0UL)) }
+  public operator fun set(key: String? = null, value: Boolean): Unit = run {
+    stack.add(Value(T_BOOL, putKey(key), W_8, if (value) 1UL else 0UL))
+  }
 
-  /**
-   * Insert a single [Byte] into the buffer
-   */
+  /** Insert a single [Byte] into the buffer */
   public fun put(value: Byte): Unit = set(null, value.toLong())
 
   /**
-   * Insert a single [Byte] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Byte] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
   public operator fun set(key: String? = null, value: Byte): Unit = set(key, value.toLong())
 
-  /**
-   * Insert a single [Short] into the buffer.
-   */
+  /** Insert a single [Short] into the buffer. */
   public fun put(value: Short): Unit = set(null, value.toLong())
 
   /**
-   * Insert a single [Short] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Short] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
   public inline operator fun set(key: String? = null, value: Short): Unit = set(key, value.toLong())
 
-  /**
-   * Insert a single [Int] into the buffer.
-   */
+  /** Insert a single [Int] into the buffer. */
   public fun put(value: Int): Unit = set(null, value.toLong())
 
   /**
@@ -115,110 +118,113 @@
    */
   public inline operator fun set(key: String? = null, value: Int): Unit = set(key, value.toLong())
 
-  /**
-   * Insert a single [Long] into the buffer.
-   */
+  /** Insert a single [Long] into the buffer. */
   public fun put(value: Long): Unit = set(null, value)
 
   /**
-   * Insert a single [Long] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Long] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public operator fun set(key: String? = null, value: Long): Unit =
-    run { stack.add(Value(T_INT, putKey(key), value.toULong().widthInUBits(), value.toULong())) }
+  public operator fun set(key: String? = null, value: Long): Unit = run {
+    stack.add(Value(T_INT, putKey(key), value.toULong().widthInUBits(), value.toULong()))
+  }
 
-  /**
-   * Insert a single [UByte] into the buffer
-   */
+  /** Insert a single [UByte] into the buffer */
   public fun put(value: UByte): Unit = set(null, value.toULong())
 
   /**
-   * Insert a single [UByte] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [UByte] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public inline operator fun set(key: String? = null, value: UByte): Unit = set(key, value.toULong())
+  public inline operator fun set(key: String? = null, value: UByte): Unit =
+    set(key, value.toULong())
 
-  /**
-   * Insert a single [UShort] into the buffer.
-   */
+  /** Insert a single [UShort] into the buffer. */
   public fun put(value: UShort): Unit = set(null, value.toULong())
 
   /**
-   * Insert a single [UShort] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [UShort] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  private inline operator fun set(key: String? = null, value: UShort): Unit = set(key, value.toULong())
+  private inline operator fun set(key: String? = null, value: UShort): Unit =
+    set(key, value.toULong())
 
-  /**
-   * Insert a single [UInt] into the buffer.
-   */
+  /** Insert a single [UInt] into the buffer. */
   public fun put(value: UInt): Unit = set(null, value.toULong())
 
   /**
-   * Insert a single [UInt] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [UInt] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  private inline operator fun set(key: String? = null, value: UInt): Unit = set(key, value.toULong())
+  private inline operator fun set(key: String? = null, value: UInt): Unit =
+    set(key, value.toULong())
 
-  /**
-   * Insert a single [ULong] into the buffer.
-   */
+  /** Insert a single [ULong] into the buffer. */
   public fun put(value: ULong): Unit = set(null, value)
 
   /**
-   * Insert a single [ULong] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [ULong] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public operator fun set(key: String? = null, value: ULong): Unit =
-    run { stack.add(Value(T_UINT, putKey(key), value.widthInUBits(), value)) }
+  public operator fun set(key: String? = null, value: ULong): Unit = run {
+    stack.add(Value(T_UINT, putKey(key), value.widthInUBits(), value))
+  }
 
-  /**
-   * Insert a single [Float] into the buffer.
-   */
+  /** Insert a single [Float] into the buffer. */
   public fun put(value: Float): Unit = run { this[null] = value }
 
   /**
-   * Insert a single [Float] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Float] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public operator fun set(key: String? = null, value: Float): Unit =
-    run { stack.add(Value(T_FLOAT, putKey(key), W_32, dValue = value.toDouble())) }
+  public operator fun set(key: String? = null, value: Float): Unit = run {
+    stack.add(Value(T_FLOAT, putKey(key), W_32, dValue = value.toDouble()))
+  }
 
-  /**
-   * Insert a single [Double] into the buffer.
-   */
+  /** Insert a single [Double] into the buffer. */
   public fun put(value: Double): Unit = run { this[null] = value }
 
   /**
-   * Insert a single [Double] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [Double] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
-  public operator fun set(key: String? = null, value: Double): Unit =
-    run { stack.add(Value(T_FLOAT, putKey(key), W_64, dValue = value)) }
+  public operator fun set(key: String? = null, value: Double): Unit = run {
+    stack.add(Value(T_FLOAT, putKey(key), W_64, dValue = value))
+  }
 
-  /**
-   * Insert a single [String] into the buffer.
-   */
+  /** Insert a single [String] into the buffer. */
   public fun put(value: String): Int = set(null, value)
 
   /**
-   * Insert a single [String] into the buffer. A key must be present if element is inserted into a map.
+   * Insert a single [String] into the buffer. A key must be present if element is inserted into a
+   * map.
    */
   public operator fun set(key: String? = null, value: String): Int {
     val iKey = putKey(key)
-    val holder = if (shareFlag and SHARE_STRINGS != 0) {
-      stringValuePool.getOrPut(value) {
-        writeString(iKey, value).also { stringValuePool[value] = it }
-      }.copy(key = iKey)
-    } else {
-      writeString(iKey, value)
-    }
+    val holder =
+      if (shareFlag and SHARE_STRINGS != 0) {
+        stringValuePool
+          .getOrPut(value) { writeString(iKey, value).also { stringValuePool[value] = it } }
+          .copy(key = iKey)
+      } else {
+        writeString(iKey, value)
+      }
     stack.add(holder)
     return holder.iValue.toInt()
   }
 
   /**
    * Adds a [ByteArray] into the message as a [Blob].
+   *
    * @param value byte array
    * @return position in buffer as the start of byte array
    */
   public fun put(value: ByteArray): Int = set(null, value)
 
   /**
-   * Adds a [ByteArray] into the message as a [Blob]. A key must be present if element is inserted into a map.
+   * Adds a [ByteArray] into the message as a [Blob]. A key must be present if element is inserted
+   * into a map.
+   *
    * @param value byte array
    * @return position in buffer as the start of byte array
    */
@@ -230,14 +236,16 @@
 
   /**
    * Adds a [IntArray] into the message as a typed vector of fixed size.
+   *
    * @param value [IntArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: IntArray): Int = set(null, value)
 
   /**
-   * Adds a [IntArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [IntArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [IntArray]
    * @return position in buffer as the start of byte array
    */
@@ -246,14 +254,16 @@
 
   /**
    * Adds a [ShortArray] into the message as a typed vector of fixed size.
+   *
    * @param value [ShortArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: ShortArray): Int = set(null, value)
 
   /**
-   * Adds a [ShortArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [ShortArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [ShortArray]
    * @return position in buffer as the start of byte array
    */
@@ -262,14 +272,16 @@
 
   /**
    * Adds a [LongArray] into the message as a typed vector of fixed size.
+   *
    * @param value [LongArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: LongArray): Int = set(null, value)
 
   /**
-   * Adds a [LongArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [LongArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [LongArray]
    * @return position in buffer as the start of byte array
    */
@@ -278,14 +290,16 @@
 
   /**
    * Adds a [FloatArray] into the message as a typed vector of fixed size.
+   *
    * @param value [FloatArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: FloatArray): Int = set(null, value)
 
   /**
-   * Adds a [FloatArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [FloatArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [FloatArray]
    * @return position in buffer as the start of byte array
    */
@@ -294,14 +308,16 @@
 
   /**
    * Adds a [DoubleArray] into the message as a typed vector of fixed size.
+   *
    * @param value [DoubleArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: DoubleArray): Int = set(null, value)
 
   /**
-   * Adds a [DoubleArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [DoubleArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [DoubleArray]
    * @return position in buffer as the start of byte array
    */
@@ -310,14 +326,16 @@
 
   /**
    * Adds a [UByteArray] into the message as a typed vector of fixed size.
+   *
    * @param value [UByteArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: UByteArray): Int = set(null, value)
 
   /**
-   * Adds a [UByteArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [UByteArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [UByteArray]
    * @return position in buffer as the start of byte array
    */
@@ -326,14 +344,16 @@
 
   /**
    * Adds a [UShortArray] into the message as a typed vector of fixed size.
+   *
    * @param value [UShortArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: UShortArray): Int = set(null, value)
 
   /**
-   * Adds a [UShortArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [UShortArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [UShortArray]
    * @return position in buffer as the start of byte array
    */
@@ -342,14 +362,16 @@
 
   /**
    * Adds a [UIntArray] into the message as a typed vector of fixed size.
+   *
    * @param value [UIntArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: UIntArray): Int = set(null, value)
 
   /**
-   * Adds a [UIntArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [UIntArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [UIntArray]
    * @return position in buffer as the start of byte array
    */
@@ -358,14 +380,16 @@
 
   /**
    * Adds a [ULongArray] into the message as a typed vector of fixed size.
+   *
    * @param value [ULongArray]
    * @return position in buffer as the start of byte array
    */
   public fun put(value: ULongArray): Int = set(null, value)
 
   /**
-   * Adds a [ULongArray] into the message as a typed vector of fixed size.
-   * A key must be present if element is inserted into a map.
+   * Adds a [ULongArray] into the message as a typed vector of fixed size. A key must be present if
+   * element is inserted into a map.
+   *
    * @param value [ULongArray]
    * @return position in buffer as the start of byte array
    */
@@ -374,6 +398,7 @@
 
   /**
    * Creates a new vector will all elements inserted in [block].
+   *
    * @param block where elements will be inserted
    * @return position in buffer as the start of byte array
    */
@@ -385,6 +410,7 @@
 
   /**
    * Creates a new typed vector will all elements inserted in [block].
+   *
    * @param block where elements will be inserted
    * @return position in buffer as the start of byte array
    */
@@ -394,40 +420,44 @@
     return endTypedVector(pos)
   }
 
-  /**
-   * Helper function to return position for starting a new vector.
-   */
+  /** Helper function to return position for starting a new vector. */
   public fun startVector(): Int = stack.size
 
   /**
    * Finishes a vector element. The initial position of the vector must be passed
+   *
    * @param position position at the start of the vector
    */
   public fun endVector(position: Int): Int = endVector(null, position)
 
   /**
    * Finishes a vector element. The initial position of the vector must be passed
+   *
    * @param position position at the start of the vector
    */
   public fun endVector(key: String? = null, position: Int): Int =
     endAnyVector(position) { createVector(putKey(key), position, stack.size - position) }
+
   /**
    * Finishes a typed vector element. The initial position of the vector must be passed
+   *
    * @param position position at the start of the vector
    */
   public fun endTypedVector(position: Int): Int = endTypedVector(position, null)
 
-  /**
-   * Helper function to return position for starting a new vector.
-   */
+  /** Helper function to return position for starting a new vector. */
   public fun startMap(): Int = stack.size
 
   /**
    * Creates a new map will all elements inserted in [block].
+   *
    * @param block where elements will be inserted
    * @return position in buffer as the start of byte array
    */
-  public inline fun putMap(key: String? = null, crossinline block: FlexBuffersBuilder.() -> Unit): Int {
+  public inline fun putMap(
+    key: String? = null,
+    crossinline block: FlexBuffersBuilder.() -> Unit,
+  ): Int {
     val pos = startMap()
     this.block()
     return endMap(pos, key)
@@ -435,7 +465,8 @@
 
   /**
    * Finishes a map, but writing the information in the buffer
-   * @param key   key used to store element in map
+   *
+   * @param key key used to store element in map
    * @return Reference to the map
    */
   public fun endMap(start: Int, key: String? = null): Int {
@@ -456,7 +487,7 @@
     length: Int,
     vecType: FlexBufferType,
     bitWidth: BitWidth,
-    crossinline writeBlock: (ByteWidth) -> Unit
+    crossinline writeBlock: (ByteWidth) -> Unit,
   ): Int {
     val keyPos = putKey(key)
     val byteWidth = align(bitWidth)
@@ -471,7 +502,10 @@
     return vloc
   }
 
-  private inline fun setTypedVec(key: String? = null, crossinline block: FlexBuffersBuilder.() -> Unit): Int {
+  private inline fun setTypedVec(
+    key: String? = null,
+    crossinline block: FlexBuffersBuilder.() -> Unit,
+  ): Int {
     val pos = startVector()
     this.block()
     return endTypedVector(pos, key)
@@ -511,11 +545,15 @@
     }
   }
 
-  private fun writeAny(toWrite: Value, byteWidth: ByteWidth) = when (toWrite.type) {
-    T_NULL, T_BOOL, T_INT, T_UINT -> writeInt(toWrite.iValue, byteWidth)
-    T_FLOAT -> writeDouble(toWrite.dValue, byteWidth)
-    else -> writeOffset(toWrite.iValue.toInt(), byteWidth)
-  }
+  private fun writeAny(toWrite: Value, byteWidth: ByteWidth) =
+    when (toWrite.type) {
+      T_NULL,
+      T_BOOL,
+      T_INT,
+      T_UINT -> writeInt(toWrite.iValue, byteWidth)
+      T_FLOAT -> writeDouble(toWrite.dValue, byteWidth)
+      else -> writeOffset(toWrite.iValue.toInt(), byteWidth)
+    }
 
   private fun writeString(key: Int, s: String): Value {
     val encodedSize = Utf8.encodedLength(s)
@@ -526,8 +564,7 @@
 
     buffer.requestAdditionalCapacity(encodedSize + 1)
     val sloc: Int = buffer.writePosition
-    if (encodedSize > 0)
-      buffer.put(s, encodedSize)
+    if (encodedSize > 0) buffer.put(s, encodedSize)
     buffer.put(ZeroByte)
     return Value(T_STRING, key, bitWidth, sloc.toULong())
   }
@@ -544,11 +581,17 @@
   private fun writeOffset(toWrite: Int, byteWidth: ByteWidth) {
     buffer.requestAdditionalCapacity(byteWidth.value)
     val relativeOffset = (buffer.writePosition - toWrite)
-    if (byteWidth.value != 8 && relativeOffset >= 1L shl byteWidth.value * 8) error("invalid offset $relativeOffset, writer pos ${buffer.writePosition}")
+    if (byteWidth.value != 8 && relativeOffset >= 1L shl byteWidth.value * 8)
+      error("invalid offset $relativeOffset, writer pos ${buffer.writePosition}")
     writeInt(relativeOffset, byteWidth)
   }
 
-  private inline fun writeBlob(key: Int, blob: ByteArray, type: FlexBufferType, trailing: Boolean): Value {
+  private inline fun writeBlob(
+    key: Int,
+    blob: ByteArray,
+    type: FlexBufferType,
+    trailing: Boolean,
+  ): Value {
     val bitWidth = blob.size.toULong().widthInUBits()
     val byteWidth = align(bitWidth)
 
@@ -586,22 +629,26 @@
     start: Int,
     size: Int,
     byteWidth: ByteWidth,
-    crossinline valueBlock: (Int) -> ULong
+    crossinline valueBlock: (Int) -> ULong,
   ) {
     buffer.requestAdditionalCapacity(size * byteWidth.value)
     return when (byteWidth.value) {
-      1 -> for (i in start until start + size) {
-        buffer.put(valueBlock(i).toUByte())
-      }
-      2 -> for (i in start until start + size) {
-        buffer.put(valueBlock(i).toUShort())
-      }
-      4 -> for (i in start until start + size) {
-        buffer.put(valueBlock(i).toUInt())
-      }
-      8 -> for (i in start until start + size) {
-        buffer.put(valueBlock(i))
-      }
+      1 ->
+        for (i in start until start + size) {
+          buffer.put(valueBlock(i).toUByte())
+        }
+      2 ->
+        for (i in start until start + size) {
+          buffer.put(valueBlock(i).toUShort())
+        }
+      4 ->
+        for (i in start until start + size) {
+          buffer.put(valueBlock(i).toUInt())
+        }
+      8 ->
+        for (i in start until start + size) {
+          buffer.put(valueBlock(i))
+        }
       else -> Unit
     }
   }
@@ -619,7 +666,7 @@
 
   private fun writeInt(value: ULong, byteWidth: ByteWidth) {
     buffer.requestAdditionalCapacity(byteWidth.value)
-    when(byteWidth.value) {
+    when (byteWidth.value) {
       1 -> buffer.put(value.toUByte())
       2 -> buffer.put(value.toUShort())
       4 -> buffer.put(value.toUInt())
@@ -646,7 +693,8 @@
     val prefixElems = 1
     // Check bit widths and types for all elements.
     for (i in start until stack.size) {
-      val elemWidth = elemWidth(T_KEY, W_8, stack[i].key.toLong(), buffer.writePosition, i + prefixElems)
+      val elemWidth =
+        elemWidth(T_KEY, W_8, stack[i].key.toLong(), buffer.writePosition, i + prefixElems)
       width = width.max(elemWidth)
     }
     return width
@@ -689,13 +737,20 @@
     }
   }
 
-  private inline fun createTypedVector(key: Int, start: Int, length: Int, keys: Value? = null): Value {
+  private inline fun createTypedVector(
+    key: Int,
+    start: Int,
+    length: Int,
+    keys: Value? = null,
+  ): Value {
     // We assume the callers of this method guarantees all elements are of the same type.
     val elementType: FlexBufferType = stack[start].type
     for (i in start + 1 until length) {
-      if (elementType != stack[i].type) error("TypedVector does not support array of different element types")
+      if (elementType != stack[i].type)
+        error("TypedVector does not support array of different element types")
     }
-    if (!elementType.isTypedVectorElementType()) error("TypedVector does not support this element type")
+    if (!elementType.isTypedVectorElementType())
+      error("TypedVector does not support this element type")
     return createAnyVector(key, start, length, elementType.toTypedVector(), keys)
   }
 
@@ -705,7 +760,7 @@
     length: Int,
     type: FlexBufferType,
     keys: Value? = null,
-    crossinline typeBlock: (BitWidth) -> Unit = {}
+    crossinline typeBlock: (BitWidth) -> Unit = {},
   ): Value {
     // Figure out the smallest bit width we can store this vector with.
     var bitWidth = W_8.max(length.toULong().widthInUBits())
@@ -742,45 +797,43 @@
   }
 
   // A lambda to sort map keys
-  internal val keyComparator = object : Comparator<Value> {
-    override fun compare(a: Value, b: Value): Int {
-      var ia: Int = a.key
-      var io: Int = b.key
-      var c1: Byte
-      var c2: Byte
-      do {
-        c1 = buffer[ia]
-        c2 = buffer[io]
-        if (c1.toInt() == 0) return c1 - c2
-        ia++
-        io++
-      } while (c1 == c2)
-      return c1 - c2
+  internal val keyComparator =
+    object : Comparator<Value> {
+      override fun compare(a: Value, b: Value): Int {
+        var ia: Int = a.key
+        var io: Int = b.key
+        var c1: Byte
+        var c2: Byte
+        do {
+          c1 = buffer[ia]
+          c2 = buffer[io]
+          if (c1.toInt() == 0) return c1 - c2
+          ia++
+          io++
+        } while (c1 == c2)
+        return c1 - c2
+      }
     }
-  }
 
   public companion object {
-    /**
-     * No keys or strings will be shared
-     */
+    /** No keys or strings will be shared */
     public const val SHARE_NONE: Int = 0
 
     /**
-     * Keys will be shared between elements. Identical keys will only be serialized once, thus possibly saving space.
-     * But serialization performance might be slower and consumes more memory.
+     * Keys will be shared between elements. Identical keys will only be serialized once, thus
+     * possibly saving space. But serialization performance might be slower and consumes more
+     * memory.
      */
     public const val SHARE_KEYS: Int = 1
 
     /**
-     * Strings will be shared between elements. Identical strings will only be serialized once, thus possibly saving space.
-     * But serialization performance might be slower and consumes more memory. This is ideal if you expect many repeated
-     * strings on the message.
+     * Strings will be shared between elements. Identical strings will only be serialized once, thus
+     * possibly saving space. But serialization performance might be slower and consumes more
+     * memory. This is ideal if you expect many repeated strings on the message.
      */
     public const val SHARE_STRINGS: Int = 2
 
-    /**
-     * Strings and keys will be shared between elements.
-     */
+    /** Strings and keys will be shared between elements. */
     public const val SHARE_KEYS_AND_STRINGS: Int = 3
   }
 }
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersInternals.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersInternals.kt
index 9a1e243..fe0c599 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersInternals.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersInternals.kt
@@ -24,19 +24,25 @@
   public inline fun max(other: BitWidth): BitWidth = if (this.value >= other.value) this else other
 }
 
-@JvmInline
-public value class ByteWidth(public val value: Int)
+@JvmInline public value class ByteWidth(public val value: Int)
 
 @JvmInline
 public value class FlexBufferType(public val value: Int) {
-  public operator fun minus(other: FlexBufferType): FlexBufferType = FlexBufferType(this.value - other.value)
-  public operator fun plus(other: FlexBufferType): FlexBufferType = FlexBufferType(this.value + other.value)
+  public operator fun minus(other: FlexBufferType): FlexBufferType =
+    FlexBufferType(this.value - other.value)
+
+  public operator fun plus(other: FlexBufferType): FlexBufferType =
+    FlexBufferType(this.value + other.value)
+
   public operator fun compareTo(other: FlexBufferType): Int = this.value - other.value
 }
 
 internal operator fun Int.times(width: ByteWidth): Int = this * width.value
+
 internal operator fun Int.minus(width: ByteWidth): Int = this - width.value
+
 internal operator fun Int.plus(width: ByteWidth): Int = this + width.value
+
 internal operator fun Int.minus(type: FlexBufferType): Int = this - type.value
 
 // Returns a Key string from the buffer starting at index [start]. Key Strings are stored as
@@ -61,23 +67,42 @@
   return when (byteWidth.value) {
     4 -> this.getFloat(end).toDouble()
     8 -> this.getDouble(end)
-    else -> error("invalid byte width $byteWidth for floating point scalar") // we should never reach here
+    else ->
+      error("invalid byte width $byteWidth for floating point scalar") // we should never reach here
   }
 }
+
 // return position on the [ReadBuffer] of the element that the offset is pointing to
 // we assume all offset fits on a int, since ReadBuffer operates with that assumption
-internal inline fun ReadBuffer.indirect(offset: Int, byteWidth: ByteWidth): Int = offset - readInt(offset, byteWidth)
+internal inline fun ReadBuffer.indirect(offset: Int, byteWidth: ByteWidth): Int =
+  offset - readInt(offset, byteWidth)
+
 // returns the size of an array-like element from [ReadBuffer].
-internal inline fun ReadBuffer.readSize(end: Int, byteWidth: ByteWidth) = readInt(end - byteWidth, byteWidth)
-internal inline fun ReadBuffer.readUInt(end: Int, byteWidth: ByteWidth): UInt = readULong(end, byteWidth).toUInt()
-internal inline fun ReadBuffer.readInt(end: Int, byteWidth: ByteWidth): Int = readULong(end, byteWidth).toInt()
-internal inline fun ReadBuffer.readLong(end: Int, byteWidth: ByteWidth): Long = readULong(end, byteWidth).toLong()
+internal inline fun ReadBuffer.readSize(end: Int, byteWidth: ByteWidth) =
+  readInt(end - byteWidth, byteWidth)
 
-internal fun IntArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
-internal fun ShortArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
-internal fun LongArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
+internal inline fun ReadBuffer.readUInt(end: Int, byteWidth: ByteWidth): UInt =
+  readULong(end, byteWidth).toUInt()
 
-private inline fun arrayWidthInUBits(size: Int, crossinline elemWidthBlock: (Int) -> BitWidth): BitWidth {
+internal inline fun ReadBuffer.readInt(end: Int, byteWidth: ByteWidth): Int =
+  readULong(end, byteWidth).toInt()
+
+internal inline fun ReadBuffer.readLong(end: Int, byteWidth: ByteWidth): Long =
+  readULong(end, byteWidth).toLong()
+
+internal fun IntArray.widthInUBits(): BitWidth =
+  arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
+
+internal fun ShortArray.widthInUBits(): BitWidth =
+  arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
+
+internal fun LongArray.widthInUBits(): BitWidth =
+  arrayWidthInUBits(this.size) { this[it].toULong().widthInUBits() }
+
+private inline fun arrayWidthInUBits(
+  size: Int,
+  crossinline elemWidthBlock: (Int) -> BitWidth,
+): BitWidth {
   // Figure out smallest bit width we can store this vector with.
   var bitWidth = W_8.max(size.toULong().widthInUBits())
   // Check bit widths and types for all elements.
@@ -88,27 +113,37 @@
   return bitWidth
 }
 
-internal fun ULong.widthInUBits(): BitWidth = when {
-  this <= MAX_UBYTE_ULONG -> W_8
-  this <= UShort.MAX_VALUE -> W_16
-  this <= UInt.MAX_VALUE -> W_32
-  else -> W_64
-}
+internal fun ULong.widthInUBits(): BitWidth =
+  when {
+    this <= MAX_UBYTE_ULONG -> W_8
+    this <= UShort.MAX_VALUE -> W_16
+    this <= UInt.MAX_VALUE -> W_32
+    else -> W_64
+  }
 
 // returns the number of bytes needed for padding the scalar of size scalarSize.
-internal inline fun paddingBytes(bufSize: Int, scalarSize: Int): Int = bufSize.inv() + 1 and scalarSize - 1
+internal inline fun paddingBytes(bufSize: Int, scalarSize: Int): Int =
+  bufSize.inv() + 1 and scalarSize - 1
 
-internal inline fun FlexBufferType.isInline(): Boolean = this.value <= T_FLOAT.value || this == T_BOOL
+internal inline fun FlexBufferType.isInline(): Boolean =
+  this.value <= T_FLOAT.value || this == T_BOOL
 
-internal fun FlexBufferType.isScalar(): Boolean = when (this) {
-  T_INT, T_UINT, T_FLOAT, T_BOOL -> true
-  else -> false
-}
+internal fun FlexBufferType.isScalar(): Boolean =
+  when (this) {
+    T_INT,
+    T_UINT,
+    T_FLOAT,
+    T_BOOL -> true
+    else -> false
+  }
 
-internal fun FlexBufferType.isIndirectScalar(): Boolean = when (this) {
-  T_INDIRECT_INT, T_INDIRECT_UINT, T_INDIRECT_FLOAT -> true
-  else -> false
-}
+internal fun FlexBufferType.isIndirectScalar(): Boolean =
+  when (this) {
+    T_INDIRECT_INT,
+    T_INDIRECT_UINT,
+    T_INDIRECT_FLOAT -> true
+    else -> false
+  }
 
 internal fun FlexBufferType.isTypedVector(): Boolean =
   this >= T_VECTOR_INT && this <= T_VECTOR_STRING_DEPRECATED || this == T_VECTOR_BOOL
@@ -118,6 +153,7 @@
 
 // returns the typed vector of a given scalar type.
 internal fun FlexBufferType.toTypedVector(): FlexBufferType = (this - T_INT) + T_VECTOR_INT
+
 // returns the element type of given typed vector.
 internal fun FlexBufferType.toElementTypedVector(): FlexBufferType = this - T_VECTOR_INT + T_INT
 
@@ -127,10 +163,11 @@
   var key: Int = -1,
   var minBitWidth: BitWidth = W_8,
   var iValue: ULong = 0UL, // integer value
-  var dValue: Double = 0.0 // TODO(paulovap): maybe we can keep floating type on iValue as well.
+  var dValue: Double = 0.0, // TODO(paulovap): maybe we can keep floating type on iValue as well.
 ) { // float value
 
-  inline fun storedPackedType(parentBitWidth: BitWidth = W_8): Byte = packedType(storedWidth(parentBitWidth), type)
+  inline fun storedPackedType(parentBitWidth: BitWidth = W_8): Byte =
+    packedType(storedWidth(parentBitWidth), type)
 
   private inline fun packedType(bitWidth: BitWidth, type: FlexBufferType): Byte =
     (bitWidth.value or (type.value shl 2)).toByte()
@@ -147,7 +184,7 @@
   minBitWidth: BitWidth,
   iValue: Long,
   bufSize: Int,
-  elemIndex: Int
+  elemIndex: Int,
 ): BitWidth {
   if (type.isInline()) return minBitWidth
 
@@ -173,43 +210,48 @@
 }
 
 // For debugging purposes, convert type to a human-readable string.
-internal fun FlexBufferType.typeToString(): String = when (this) {
-  T_NULL -> "Null"
-  T_INT -> "Int"
-  T_UINT -> "UInt"
-  T_FLOAT -> "Float"
-  T_KEY -> "Key"
-  T_STRING -> "String"
-  T_INDIRECT_INT -> "IndirectInt"
-  T_INDIRECT_UINT -> "IndirectUInt"
-  T_INDIRECT_FLOAT -> "IndirectFloat"
-  T_MAP -> "Map"
-  T_VECTOR -> "Vector"
-  T_VECTOR_INT -> "IntVector"
-  T_VECTOR_UINT -> "UIntVector"
-  T_VECTOR_FLOAT -> "FloatVector"
-  T_VECTOR_KEY -> "KeyVector"
-  T_VECTOR_STRING_DEPRECATED -> "StringVectorDeprecated"
-  T_VECTOR_INT2 -> "Int2Vector"
-  T_VECTOR_UINT2 -> "UInt2Vector"
-  T_VECTOR_FLOAT2 -> "Float2Vector"
-  T_VECTOR_INT3 -> "Int3Vector"
-  T_VECTOR_UINT3 -> "UInt3Vector"
-  T_VECTOR_FLOAT3 -> "Float3Vector"
-  T_VECTOR_INT4 -> "Int4Vector"
-  T_VECTOR_UINT4 -> "UInt4Vector"
-  T_VECTOR_FLOAT4 -> "Float4Vector"
-  T_BLOB -> "BlobVector"
-  T_BOOL -> "BoolVector"
-  T_VECTOR_BOOL -> "BoolVector"
-  else -> "UnknownType"
-}
+internal fun FlexBufferType.typeToString(): String =
+  when (this) {
+    T_NULL -> "Null"
+    T_INT -> "Int"
+    T_UINT -> "UInt"
+    T_FLOAT -> "Float"
+    T_KEY -> "Key"
+    T_STRING -> "String"
+    T_INDIRECT_INT -> "IndirectInt"
+    T_INDIRECT_UINT -> "IndirectUInt"
+    T_INDIRECT_FLOAT -> "IndirectFloat"
+    T_MAP -> "Map"
+    T_VECTOR -> "Vector"
+    T_VECTOR_INT -> "IntVector"
+    T_VECTOR_UINT -> "UIntVector"
+    T_VECTOR_FLOAT -> "FloatVector"
+    T_VECTOR_KEY -> "KeyVector"
+    T_VECTOR_STRING_DEPRECATED -> "StringVectorDeprecated"
+    T_VECTOR_INT2 -> "Int2Vector"
+    T_VECTOR_UINT2 -> "UInt2Vector"
+    T_VECTOR_FLOAT2 -> "Float2Vector"
+    T_VECTOR_INT3 -> "Int3Vector"
+    T_VECTOR_UINT3 -> "UInt3Vector"
+    T_VECTOR_FLOAT3 -> "Float3Vector"
+    T_VECTOR_INT4 -> "Int4Vector"
+    T_VECTOR_UINT4 -> "UInt4Vector"
+    T_VECTOR_FLOAT4 -> "Float4Vector"
+    T_BLOB -> "BlobVector"
+    T_BOOL -> "BoolVector"
+    T_VECTOR_BOOL -> "BoolVector"
+    else -> "UnknownType"
+  }
 
 // Few repeated values used in hot path is cached here
 internal fun emptyBlob() = Blob(emptyBuffer, 1, ByteWidth(1))
+
 internal fun emptyVector() = Vector(emptyBuffer, 1, ByteWidth(1))
+
 internal fun emptyMap() = Map(ArrayReadWriteBuffer(3), 3, ByteWidth(1))
+
 internal fun nullReference() = Reference(emptyBuffer, 1, ByteWidth(0), T_NULL.value)
+
 internal fun nullKey() = Key(emptyBuffer, 1)
 
 internal const val ZeroByte = 0.toByte()
@@ -228,7 +270,8 @@
 internal val T_NULL = FlexBufferType(0)
 internal val T_INT = FlexBufferType(1)
 internal val T_UINT = FlexBufferType(2)
-internal val T_FLOAT = FlexBufferType(3) // Types above stored inline, types below are stored in an offset.
+internal val T_FLOAT =
+  FlexBufferType(3) // Types above stored inline, types below are stored in an offset.
 internal val T_KEY = FlexBufferType(4)
 internal val T_STRING = FlexBufferType(5)
 internal val T_INDIRECT_INT = FlexBufferType(6)
@@ -254,4 +297,5 @@
 internal val T_VECTOR_FLOAT4 = FlexBufferType(24)
 internal val T_BLOB = FlexBufferType(25)
 internal val T_BOOL = FlexBufferType(26)
-internal val T_VECTOR_BOOL = FlexBufferType(36) // To Allow the same type of conversion of type to vector type
+internal val T_VECTOR_BOOL =
+  FlexBufferType(36) // To Allow the same type of conversion of type to vector type
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Utf8.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Utf8.kt
index bccc151..2f49650 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Utf8.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Utf8.kt
@@ -19,12 +19,10 @@
 
 public object Utf8 {
   /**
-   * Returns the number of bytes in the UTF-8-encoded form of `sequence`. For a string,
-   * this method is equivalent to `string.getBytes(UTF_8).length`, but is more efficient in
-   * both time and space.
+   * Returns the number of bytes in the UTF-8-encoded form of `sequence`. For a string, this method
+   * is equivalent to `string.getBytes(UTF_8).length`, but is more efficient in both time and space.
    *
-   * @throws IllegalArgumentException if `sequence` contains ill-formed UTF-16 (unpaired
-   * surrogates)
+   * @throws IllegalArgumentException if `sequence` contains ill-formed UTF-16 (unpaired surrogates)
    */
   private fun computeEncodedLength(sequence: CharSequence): Int {
     // Warning to maintainers: this implementation is highly optimized.
@@ -80,45 +78,30 @@
   }
 
   /**
-   * Returns the number of bytes in the UTF-8-encoded form of `sequence`. For a string,
-   * this method is equivalent to `string.getBytes(UTF_8).length`, but is more efficient in
-   * both time and space.
+   * Returns the number of bytes in the UTF-8-encoded form of `sequence`. For a string, this method
+   * is equivalent to `string.getBytes(UTF_8).length`, but is more efficient in both time and space.
    *
-   * @throws IllegalArgumentException if `sequence` contains ill-formed UTF-16 (unpaired
-   * surrogates)
+   * @throws IllegalArgumentException if `sequence` contains ill-formed UTF-16 (unpaired surrogates)
    */
   public fun encodedLength(sequence: CharSequence): Int = computeEncodedLength(sequence)
 
-  /**
-   * Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'.
-   */
+  /** Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'. */
   public inline fun isOneByte(b: Byte): Boolean = b >= 0
 
-  /**
-   * Returns whether this is a two-byte codepoint with the form 110xxxxx  0xC0..0xDF.
-   */
+  /** Returns whether this is a two-byte codepoint with the form 110xxxxx 0xC0..0xDF. */
   public inline fun isTwoBytes(b: Byte): Boolean = b < 0xE0.toByte()
 
-  /**
-   * Returns whether this is a three-byte codepoint with the form 1110xxxx  0xE0..0xEF.
-   */
+  /** Returns whether this is a three-byte codepoint with the form 1110xxxx 0xE0..0xEF. */
   public inline fun isThreeBytes(b: Byte): Boolean = b < 0xF0.toByte()
 
-  /**
-   * Returns whether this is a four-byte codepoint with the form 11110xxx  0xF0..0xF4.
-   */
+  /** Returns whether this is a four-byte codepoint with the form 11110xxx 0xF0..0xF4. */
   public inline fun isFourByte(b: Byte): Boolean = b < 0xF8.toByte()
 
   public fun handleOneByte(byte1: Byte, resultArr: CharArray, resultPos: Int) {
     resultArr[resultPos] = byte1.toInt().toChar()
   }
 
-  public fun handleTwoBytes(
-    byte1: Byte,
-    byte2: Byte,
-    resultArr: CharArray,
-    resultPos: Int
-  ) {
+  public fun handleTwoBytes(byte1: Byte, byte2: Byte, resultArr: CharArray, resultPos: Int) {
     // Simultaneously checks for illegal trailing-byte in leading position (<= '11000000') and
     // overlong 2-byte, '11000001'.
     if (byte1 < 0xC2.toByte()) {
@@ -135,17 +118,23 @@
     byte2: Byte,
     byte3: Byte,
     resultArr: CharArray,
-    resultPos: Int
+    resultPos: Int,
   ) {
-    if (isNotTrailingByte(byte2) || // overlong? 5 most significant bits must not all be zero
-      byte1 == 0xE0.toByte() && byte2 < 0xA0.toByte() || // check for illegal surrogate codepoints
-      byte1 == 0xED.toByte() && byte2 >= 0xA0.toByte() ||
-      isNotTrailingByte(byte3)
+    if (
+      isNotTrailingByte(byte2) || // overlong? 5 most significant bits must not all be zero
+        byte1 == 0xE0.toByte() && byte2 < 0xA0.toByte() || // check for illegal surrogate codepoints
+        byte1 == 0xED.toByte() && byte2 >= 0xA0.toByte() ||
+        isNotTrailingByte(byte3)
     ) {
       error("Invalid UTF-8")
     }
     resultArr[resultPos] =
-      (byte1.toInt() and 0x0F shl 12 or (trailingByteValue(byte2) shl 6) or trailingByteValue(byte3)).toChar()
+      (byte1.toInt() and
+          0x0F shl
+          12 or
+          (trailingByteValue(byte2) shl 6) or
+          trailingByteValue(byte3))
+        .toChar()
   }
 
   public fun handleFourBytes(
@@ -154,50 +143,47 @@
     byte3: Byte,
     byte4: Byte,
     resultArr: CharArray,
-    resultPos: Int
+    resultPos: Int,
   ) {
-    if (isNotTrailingByte(byte2) || // Check that 1 <= plane <= 16.  Tricky optimized form of:
-      //   valid 4-byte leading byte?
-      // if (byte1 > (byte) 0xF4 ||
-      //   overlong? 4 most significant bits must not all be zero
-      //     byte1 == (byte) 0xF0 && byte2 < (byte) 0x90 ||
-      //   codepoint larger than the highest code point (U+10FFFF)?
-      //     byte1 == (byte) 0xF4 && byte2 > (byte) 0x8F)
-      (byte1.toInt() shl 28) + (byte2 - 0x90.toByte()) shr 30 != 0 || isNotTrailingByte(byte3) ||
-      isNotTrailingByte(byte4)
+    if (
+      isNotTrailingByte(byte2) || // Check that 1 <= plane <= 16.  Tricky optimized form of:
+        //   valid 4-byte leading byte?
+        // if (byte1 > (byte) 0xF4 ||
+        //   overlong? 4 most significant bits must not all be zero
+        //     byte1 == (byte) 0xF0 && byte2 < (byte) 0x90 ||
+        //   codepoint larger than the highest code point (U+10FFFF)?
+        //     byte1 == (byte) 0xF4 && byte2 > (byte) 0x8F)
+        (byte1.toInt() shl 28) + (byte2 - 0x90.toByte()) shr 30 != 0 ||
+        isNotTrailingByte(byte3) ||
+        isNotTrailingByte(byte4)
     ) {
       error("Invalid UTF-8")
     }
-    val codepoint: Int = (
-      byte1.toInt() and 0x07 shl 18
-        or (trailingByteValue(byte2) shl 12)
-        or (trailingByteValue(byte3) shl 6)
-        or trailingByteValue(byte4)
-      )
+    val codepoint: Int =
+      (byte1.toInt() and
+        0x07 shl
+        18 or
+        (trailingByteValue(byte2) shl 12) or
+        (trailingByteValue(byte3) shl 6) or
+        trailingByteValue(byte4))
     resultArr[resultPos] = highSurrogate(codepoint)
     resultArr[resultPos + 1] = lowSurrogate(codepoint)
   }
 
-  /**
-   * Returns whether the byte is not a valid continuation of the form '10XXXXXX'.
-   */
+  /** Returns whether the byte is not a valid continuation of the form '10XXXXXX'. */
   private fun isNotTrailingByte(b: Byte): Boolean = b > 0xBF.toByte()
 
-  /**
-   * Returns the actual value of the trailing byte (removes the prefix '10') for composition.
-   */
+  /** Returns the actual value of the trailing byte (removes the prefix '10') for composition. */
   private fun trailingByteValue(b: Byte): Int = b.toInt() and 0x3F
 
   private fun highSurrogate(codePoint: Int): Char =
-    (
-      Char.MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT ushr 10) +
-        (codePoint ushr 10)
-      )
+    (Char.MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT ushr 10) + (codePoint ushr 10))
 
   private fun lowSurrogate(codePoint: Int): Char = (Char.MIN_LOW_SURROGATE + (codePoint and 0x3ff))
 
   /**
    * Encode a [CharSequence] UTF8 codepoint into a byte array.
+   *
    * @param `in` CharSequence to be encoded
    * @param start start position of the first char in the codepoint
    * @param out byte array of 4 bytes to be filled
@@ -297,10 +283,7 @@
         if (offset >= limit) {
           error("Invalid UTF-8")
         }
-        handleTwoBytes(
-          byte1, /* byte2 */
-          bytes[offset++], resultArr, resultPos++
-        )
+        handleTwoBytes(byte1, /* byte2 */ bytes[offset++], resultArr, resultPos++)
       } else if (isThreeBytes(byte1)) {
         if (offset >= limit - 1) {
           error("Invalid UTF-8")
@@ -310,7 +293,7 @@
           bytes[offset++], /* byte3 */
           bytes[offset++],
           resultArr,
-          resultPos++
+          resultPos++,
         )
       } else {
         if (offset >= limit - 2) {
@@ -322,7 +305,7 @@
           bytes[offset++], /* byte4 */
           bytes[offset++],
           resultArr,
-          resultPos++
+          resultPos++,
         )
         // 4-byte case requires two chars.
         resultPos++
@@ -331,10 +314,12 @@
     return resultArr.concatToString(0, resultPos)
   }
 
-  public fun encodeUtf8Array(input: CharSequence,
-                             out: ByteArray,
-                             offset: Int = 0,
-                             length: Int = out.size - offset): Int {
+  public fun encodeUtf8Array(
+    input: CharSequence,
+    out: ByteArray,
+    offset: Int = 0,
+    length: Int = out.size - offset,
+  ): Int {
     val utf16Length = input.length
     var j = offset
     var i = 0
@@ -342,8 +327,7 @@
     // Designed to take advantage of
     // https://wikis.oracle.com/display/HotSpotInternals/RangeCheckElimination
 
-    if (utf16Length == 0)
-      return 0
+    if (utf16Length == 0) return 0
     var cc: Char = input[i]
     while (i < utf16Length && i + j < limit && input[i].also { cc = it }.code < 0x80) {
       out[j + i] = cc.code.toByte()
@@ -370,9 +354,7 @@
         // Minimum code point represented by a surrogate pair is 0x10000, 17 bits,
         // four UTF-8 bytes
         var low: Char = Char.MIN_VALUE
-        if (i + 1 == input.length ||
-          !isSurrogatePair(c, input[++i].also { low = it })
-        ) {
+        if (i + 1 == input.length || !isSurrogatePair(c, input[++i].also { low = it })) {
           errorSurrogate(i - 1, utf16Length)
         }
         val codePoint: Int = toCodePoint(c, low)
@@ -383,8 +365,10 @@
       } else {
         // If we are surrogates and we're not a surrogate pair, always throw an
         // UnpairedSurrogateException instead of an ArrayOutOfBoundsException.
-        if (Char.MIN_SURROGATE <= c && c <= Char.MAX_SURROGATE &&
-          (i + 1 == input.length || !isSurrogatePair(c, input[i + 1]))
+        if (
+          Char.MIN_SURROGATE <= c &&
+            c <= Char.MAX_SURROGATE &&
+            (i + 1 == input.length || !isSurrogatePair(c, input[i + 1]))
         ) {
           errorSurrogate(i, utf16Length)
         }
@@ -407,10 +391,15 @@
     return c1.code
   }
 
-  private fun isSurrogatePair(high: Char, low: Char) = high.isHighSurrogate() and low.isLowSurrogate()
+  private fun isSurrogatePair(high: Char, low: Char) =
+    high.isHighSurrogate() and low.isLowSurrogate()
 
-  private fun toCodePoint(high: Char, low: Char): Int = (high.code shl 10) + low.code +
-    (MIN_SUPPLEMENTARY_CODE_POINT - (Char.MIN_HIGH_SURROGATE.code shl 10) - Char.MIN_LOW_SURROGATE.code)
+  private fun toCodePoint(high: Char, low: Char): Int =
+    (high.code shl 10) +
+      low.code +
+      (MIN_SUPPLEMENTARY_CODE_POINT -
+        (Char.MIN_HIGH_SURROGATE.code shl 10) -
+        Char.MIN_LOW_SURROGATE.code)
 
   private fun errorSurrogate(i: Int, utf16Length: Int): Unit =
     error("Unpaired surrogate at index $i of $utf16Length length")
diff --git a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/json.kt b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/json.kt
index 3386797..1aa8b33 100644
--- a/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/json.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/json.kt
@@ -22,17 +22,17 @@
 import kotlin.jvm.JvmInline
 import kotlin.math.pow
 
-/**
- * Returns a minified version of this FlexBuffer as a JSON.
- */
-public fun Reference.toJson(): String = ArrayReadWriteBuffer(1024).let {
-  toJson(it)
-  val data = it.data() // it.getString(0, it.writePosition)
-  return data.decodeToString(0, it.writePosition)
-}
+/** Returns a minified version of this FlexBuffer as a JSON. */
+public fun Reference.toJson(): String =
+  ArrayReadWriteBuffer(1024).let {
+    toJson(it)
+    val data = it.data() // it.getString(0, it.writePosition)
+    return data.decodeToString(0, it.writePosition)
+  }
 
 /**
  * Returns a minified version of this FlexBuffer as a JSON.
+ *
  * @param out [ReadWriteBuffer] the JSON will be written.
  */
 public fun Reference.toJson(out: ReadWriteBuffer) {
@@ -57,19 +57,27 @@
     T_NULL -> out.put("null")
     T_BOOL -> out.put(toBoolean().toString())
     T_MAP -> toMap().toJson(out)
-    T_VECTOR, T_VECTOR_BOOL, T_VECTOR_FLOAT, T_VECTOR_INT,
-    T_VECTOR_UINT, T_VECTOR_KEY, T_VECTOR_STRING_DEPRECATED -> toVector().toJson(out)
+    T_VECTOR,
+    T_VECTOR_BOOL,
+    T_VECTOR_FLOAT,
+    T_VECTOR_INT,
+    T_VECTOR_UINT,
+    T_VECTOR_KEY,
+    T_VECTOR_STRING_DEPRECATED -> toVector().toJson(out)
     else -> error("Unable to convert type ${type.typeToString()} to JSON")
   }
 }
 
-/**
- * Returns a minified version of this FlexBuffer as a JSON.
- */
-public fun Map.toJson(): String = ArrayReadWriteBuffer(1024).let { toJson(it); it.toString() }
+/** Returns a minified version of this FlexBuffer as a JSON. */
+public fun Map.toJson(): String =
+  ArrayReadWriteBuffer(1024).let {
+    toJson(it)
+    it.toString()
+  }
 
 /**
  * Returns a minified version of this FlexBuffer as a JSON.
+ *
  * @param out [ReadWriteBuffer] the JSON will be written.
  */
 public fun Map.toJson(out: ReadWriteBuffer) {
@@ -88,13 +96,16 @@
   out.put('}'.code.toByte())
 }
 
-/**
- * Returns a minified version of this FlexBuffer as a JSON.
- */
-public fun Vector.toJson(): String = ArrayReadWriteBuffer(1024).let { toJson(it); it.toString() }
+/** Returns a minified version of this FlexBuffer as a JSON. */
+public fun Vector.toJson(): String =
+  ArrayReadWriteBuffer(1024).let {
+    toJson(it)
+    it.toString()
+  }
 
 /**
  * Returns a minified version of this FlexBuffer as a JSON.
+ *
  * @param out that the JSON is being concatenated.
  */
 public fun Vector.toJson(out: ReadWriteBuffer) {
@@ -109,27 +120,23 @@
 }
 
 /**
- * JSONParser class is used to parse a JSON as FlexBuffers. Calling [JSONParser.parse] fiils [output]
- * and returns a [Reference] ready to be used.
+ * JSONParser class is used to parse a JSON as FlexBuffers. Calling [JSONParser.parse] fiils
+ * [output] and returns a [Reference] ready to be used.
  */
 @ExperimentalUnsignedTypes
-public class JSONParser(public var output: FlexBuffersBuilder = FlexBuffersBuilder(1024, SHARE_KEYS_AND_STRINGS)) {
+public class JSONParser(
+  public var output: FlexBuffersBuilder = FlexBuffersBuilder(1024, SHARE_KEYS_AND_STRINGS)
+) {
   private var readPos = 0
   private var scopes = ScopeStack()
 
-  /**
-   * Parse a json as [String] and returns a [Reference] to a FlexBuffer.
-   */
+  /** Parse a json as [String] and returns a [Reference] to a FlexBuffer. */
   public fun parse(data: String): Reference = parse(ArrayReadBuffer(data.encodeToByteArray()))
 
-  /**
-   * Parse a json as [ByteArray] and returns a [Reference] to a FlexBuffer.
-   */
+  /** Parse a json as [ByteArray] and returns a [Reference] to a FlexBuffer. */
   public fun parse(data: ByteArray): Reference = parse(ArrayReadBuffer(data))
 
-  /**
-   * Parse a json as [ReadBuffer] and returns a [Reference] to a FlexBuffer.
-   */
+  /** Parse a json as [ReadBuffer] and returns a [Reference] to a FlexBuffer. */
   public fun parse(data: ReadBuffer): Reference {
     reset()
     parseValue(data, nextToken(data), null)
@@ -165,7 +172,8 @@
       when (val tok = nextToken(data)) {
         TOK_END_OBJECT -> {
           this.scopes.pop()
-          output.endMap(fPos, key); return T_MAP
+          output.endMap(fPos, key)
+          return T_MAP
         }
         TOK_BEGIN_QUOTE -> {
           val childKey = readString(data)
@@ -347,7 +355,11 @@
     return readString(data, limit) { data[it] }
   }
 
-  private inline fun readString(data: ReadBuffer, limit: Int, crossinline fetch: (Int) -> Byte): String {
+  private inline fun readString(
+    data: ReadBuffer,
+    limit: Int,
+    crossinline fetch: (Int) -> Byte,
+  ): String {
     var cursorPos = readPos
     var foundEscape = false
     var currentChar: Byte = 0
@@ -420,7 +432,8 @@
           endOfString = pos + 1
         }
         else -> {
-          endOfString = pos; break
+          endOfString = pos
+          break
         }
       }
     }
@@ -478,7 +491,8 @@
           else -> makeError(data, "Unfinished Array", c)
         }
       }
-      SCOPE_OBJ_EMPTY, SCOPE_OBJ_FILLED -> {
+      SCOPE_OBJ_EMPTY,
+      SCOPE_OBJ_FILLED -> {
         this.scopes.last = SCOPE_OBJ_KEY
         // Look for a comma before the next element.
         if (scope == SCOPE_OBJ_FILLED) {
@@ -490,11 +504,12 @@
         }
         return when (val c = skipWhitespace(data)) {
           CHAR_DOUBLE_QUOTE -> TOK_BEGIN_QUOTE
-          CHAR_CLOSE_OBJECT -> if (scope != SCOPE_OBJ_FILLED) {
-            TOK_END_OBJECT
-          } else {
-            makeError(data, "Expected Key", c)
-          }
+          CHAR_CLOSE_OBJECT ->
+            if (scope != SCOPE_OBJ_FILLED) {
+              TOK_END_OBJECT
+            } else {
+              makeError(data, "Expected Key", c)
+            }
           else -> {
             makeError(data, "Expected Key/Value", c)
           }
@@ -510,8 +525,7 @@
       SCOPE_DOC_EMPTY -> this.scopes.last = SCOPE_DOC_FILLED
       SCOPE_DOC_FILLED -> {
         val c = skipWhitespace(data)
-        if (c != CHAR_EOF)
-          makeError(data, "Root object already finished", c)
+        if (c != CHAR_EOF) makeError(data, "Root object already finished", c)
         return TOK_EOF
       }
     }
@@ -550,10 +564,20 @@
         readPos += 4
         return TOK_FALSE
       }
-      CHAR_0, CHAR_1, CHAR_2, CHAR_3, CHAR_4, CHAR_5,
-      CHAR_6, CHAR_7, CHAR_8, CHAR_9, CHAR_MINUS -> return TOK_NUMBER.also {
-        readPos-- // rewind one position so we don't lose first digit
-      }
+      CHAR_0,
+      CHAR_1,
+      CHAR_2,
+      CHAR_3,
+      CHAR_4,
+      CHAR_5,
+      CHAR_6,
+      CHAR_7,
+      CHAR_8,
+      CHAR_9,
+      CHAR_MINUS ->
+        return TOK_NUMBER.also {
+          readPos-- // rewind one position so we don't lose first digit
+        }
     }
     makeError(data, "Expecting element", c)
   }
@@ -593,12 +617,13 @@
         while (i < end) {
           val part: Byte = data[i]
           result = (result.code shl 4).toChar()
-          result += when (part) {
-            in CHAR_0..CHAR_9 -> part - CHAR_0
-            in CHAR_a..CHAR_f -> part - CHAR_a + 10
-            in CHAR_A..CHAR_F -> part - CHAR_A + 10
-            else -> makeError(data, "Invalid utf8 escaped character", -1)
-          }
+          result +=
+            when (part) {
+              in CHAR_0..CHAR_9 -> part - CHAR_0
+              in CHAR_a..CHAR_f -> part - CHAR_a + 10
+              in CHAR_A..CHAR_F -> part - CHAR_A + 10
+              else -> makeError(data, "Invalid utf8 escaped character", -1)
+            }
           i++
         }
         result
@@ -608,16 +633,19 @@
       CHAR_r -> '\r'
       CHAR_n -> '\n'
       CHAR_f -> 12.toChar() // '\f'
-      CHAR_DOUBLE_QUOTE, CHAR_BACKSLASH, CHAR_FORWARDSLASH -> byte1.toInt().toChar()
+      CHAR_DOUBLE_QUOTE,
+      CHAR_BACKSLASH,
+      CHAR_FORWARDSLASH -> byte1.toInt().toChar()
       else -> makeError(data, "Invalid escape sequence.", byte1)
     }
   }
 
-  private fun Byte.print(): String = when (this) {
-    in 0x21..0x7E -> "'${this.toInt().toChar()}'" // visible ascii chars
-    CHAR_EOF -> "EOF"
-    else -> "'0x${this.toString(16)}'"
-  }
+  private fun Byte.print(): String =
+    when (this) {
+      in 0x21..0x7E -> "'${this.toInt().toChar()}'" // visible ascii chars
+      CHAR_EOF -> "EOF"
+      else -> "'0x${this.toString(16)}'"
+    }
 
   private inline fun makeError(data: ReadBuffer, msg: String, tok: Byte? = null): Nothing {
     val (line, column) = calculateErrorPosition(data, readPos)
@@ -634,8 +662,7 @@
   }
 
   private inline fun checkEOF(data: ReadBuffer, pos: Int) {
-    if (pos >= data.limit)
-      makeError(data, "Unexpected end of file", -1)
+    if (pos >= data.limit) makeError(data, "Unexpected end of file", -1)
   }
 
   private fun calculateErrorPosition(data: ReadBuffer, endPos: Int): Pair<Int, Int> {
@@ -686,22 +713,23 @@
 }
 
 // Following escape strategy defined in RFC7159.
-private val JSON_ESCAPE_CHARS: Array<ByteArray?> = arrayOfNulls<ByteArray>(128).apply {
-  this['\n'.code] = "\\n".encodeToByteArray()
-  this['\t'.code] = "\\t".encodeToByteArray()
-  this['\r'.code] = "\\r".encodeToByteArray()
-  this['\b'.code] = "\\b".encodeToByteArray()
-  this[0x0c] = "\\f".encodeToByteArray()
-  this['"'.code] = "\\\"".encodeToByteArray()
-  this['\\'.code] = "\\\\".encodeToByteArray()
-  for (i in 0..0x1f) {
-    this[i] = "\\u${i.toPaddedHex()}".encodeToByteArray()
+private val JSON_ESCAPE_CHARS: Array<ByteArray?> =
+  arrayOfNulls<ByteArray>(128).apply {
+    this['\n'.code] = "\\n".encodeToByteArray()
+    this['\t'.code] = "\\t".encodeToByteArray()
+    this['\r'.code] = "\\r".encodeToByteArray()
+    this['\b'.code] = "\\b".encodeToByteArray()
+    this[0x0c] = "\\f".encodeToByteArray()
+    this['"'.code] = "\\\"".encodeToByteArray()
+    this['\\'.code] = "\\\\".encodeToByteArray()
+    for (i in 0..0x1f) {
+      this[i] = "\\u${i.toPaddedHex()}".encodeToByteArray()
+    }
   }
-}
 
 // Scope is used to the define current space that the scanner is operating.
-@JvmInline
-private value class Scope(val id: Int)
+@JvmInline private value class Scope(val id: Int)
+
 private val SCOPE_DOC_EMPTY = Scope(0)
 private val SCOPE_DOC_FILLED = Scope(1)
 private val SCOPE_OBJ_EMPTY = Scope(2)
@@ -714,7 +742,7 @@
 // max stack size of 22, as per tests cases defined in http://json.org/JSON_checker/
 private class ScopeStack(
   private val ary: IntArray = IntArray(22) { SCOPE_DOC_EMPTY.id },
-  var lastPos: Int = 0
+  var lastPos: Int = 0,
 ) {
   var last: Scope
     get() = Scope(ary[lastPos])
@@ -743,20 +771,21 @@
 
 @JvmInline
 private value class Token(val id: Int) {
-  fun print(): String = when (this) {
-    TOK_EOF -> "TOK_EOF"
-    TOK_NONE -> "TOK_NONE"
-    TOK_BEGIN_OBJECT -> "TOK_BEGIN_OBJECT"
-    TOK_END_OBJECT -> "TOK_END_OBJECT"
-    TOK_BEGIN_ARRAY -> "TOK_BEGIN_ARRAY"
-    TOK_END_ARRAY -> "TOK_END_ARRAY"
-    TOK_NUMBER -> "TOK_NUMBER"
-    TOK_TRUE -> "TOK_TRUE"
-    TOK_FALSE -> "TOK_FALSE"
-    TOK_NULL -> "TOK_NULL"
-    TOK_BEGIN_QUOTE -> "TOK_BEGIN_QUOTE"
-    else -> this.toString()
-  }
+  fun print(): String =
+    when (this) {
+      TOK_EOF -> "TOK_EOF"
+      TOK_NONE -> "TOK_NONE"
+      TOK_BEGIN_OBJECT -> "TOK_BEGIN_OBJECT"
+      TOK_END_OBJECT -> "TOK_END_OBJECT"
+      TOK_BEGIN_ARRAY -> "TOK_BEGIN_ARRAY"
+      TOK_END_ARRAY -> "TOK_END_ARRAY"
+      TOK_NUMBER -> "TOK_NUMBER"
+      TOK_TRUE -> "TOK_TRUE"
+      TOK_FALSE -> "TOK_FALSE"
+      TOK_NULL -> "TOK_NULL"
+      TOK_BEGIN_QUOTE -> "TOK_BEGIN_QUOTE"
+      else -> this.toString()
+    }
 }
 
 private val TOK_EOF = Token(-1)
@@ -813,20 +842,265 @@
 // bit 0 (1) - set if: plain ASCII string character
 // bit 1 (2) - set if: whitespace
 // bit 4 (0x10) - set if: 0-9 e E .
-private val parseFlags = byteArrayOf(
-// 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, // 0
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1
-  3, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x11, 1, // 2
-  0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 1, 1, 1, 1, 1, 1, // 3
-  1, 1, 1, 1, 1, 0x11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 5
-  1, 1, 1, 1, 1, 0x11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+private val parseFlags =
+  byteArrayOf(
+    // 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    2,
+    2,
+    0,
+    0,
+    2,
+    0,
+    0, // 0
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0, // 1
+    3,
+    1,
+    0,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    0x11,
+    1, // 2
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    0x11,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1, // 3
+    1,
+    1,
+    1,
+    1,
+    1,
+    0x11,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1, // 4
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    0,
+    1,
+    1,
+    1, // 5
+    1,
+    1,
+    1,
+    1,
+    1,
+    0x11,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1, // 6
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1, // 7
 
-  // 128-255
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-)
+    // 128-255
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+  )
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/Asserts.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/Asserts.kt
index 563a5a6..0524b4a 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/Asserts.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/Asserts.kt
@@ -35,8 +35,7 @@
 fun arrayFailMessage(expected: LongArray, actual: LongArray): String =
   failMessage(expected.contentToString(), actual.contentToString())
 
-fun failMessage(expected: String, actual: String): String =
-  "Expected: $expected\nActual: $actual"
+fun failMessage(expected: String, actual: String): String = "Expected: $expected\nActual: $actual"
 
 fun arrayFailMessage(expected: FloatArray, actual: FloatArray): String {
   return "Expected: ${expected.contentToString()}\nActual: ${actual.contentToString()}"
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/BuffersTest.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/BuffersTest.kt
index acae4dd..71abde4 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/BuffersTest.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/BuffersTest.kt
@@ -16,10 +16,10 @@
 
     assertEquals(bytes.size, fullRead.limit)
     assertEquals(text, fullRead.getString(0, fullRead.limit))
-    assertEquals("Hello" , helloRead.getString(0, helloRead.limit))
-    assertEquals("world!" , worldRead.getString())
-    assertEquals(fullRead.getString(0, 5) , helloRead.getString(0, helloRead.limit))
-    assertEquals(fullRead.getString(6, 6) , worldRead.getString(0, worldRead.limit))
+    assertEquals("Hello", helloRead.getString(0, helloRead.limit))
+    assertEquals("world!", worldRead.getString())
+    assertEquals(fullRead.getString(0, 5), helloRead.getString(0, helloRead.limit))
+    assertEquals(fullRead.getString(6, 6), worldRead.getString(0, worldRead.limit))
 
     for (i in 0 until helloRead.limit) {
       assertEquals(fullRead[i], helloRead[i])
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/ByteArrayTest.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/ByteArrayTest.kt
index 776ab95..0b74956 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/ByteArrayTest.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/ByteArrayTest.kt
@@ -17,18 +17,18 @@
 
 import kotlin.test.Test
 import kotlin.test.assertEquals
-import kotlin.test.assertTrue
 
 class ByteArrayTest {
 
   @Test
   fun testByte() {
-    val testSet = arrayOf(
-      67.toByte() to byteArrayOf(67),
-      Byte.MIN_VALUE to byteArrayOf(-128),
-      Byte.MAX_VALUE to byteArrayOf(127),
-      0.toByte() to byteArrayOf(0)
-    )
+    val testSet =
+      arrayOf(
+        67.toByte() to byteArrayOf(67),
+        Byte.MIN_VALUE to byteArrayOf(-128),
+        Byte.MAX_VALUE to byteArrayOf(127),
+        0.toByte() to byteArrayOf(0),
+      )
     val data = ByteArray(1)
     testSet.forEach {
       data[0] = it.first
@@ -39,12 +39,13 @@
 
   @Test
   fun testShort() {
-    val testSet = arrayOf(
-      6712.toShort() to byteArrayOf(56, 26),
-      Short.MIN_VALUE to byteArrayOf(0, -128),
-      Short.MAX_VALUE to byteArrayOf(-1, 127),
-      0.toShort() to byteArrayOf(0, 0,)
-    )
+    val testSet =
+      arrayOf(
+        6712.toShort() to byteArrayOf(56, 26),
+        Short.MIN_VALUE to byteArrayOf(0, -128),
+        Short.MAX_VALUE to byteArrayOf(-1, 127),
+        0.toShort() to byteArrayOf(0, 0),
+      )
 
     val data = ByteArray(Short.SIZE_BYTES)
     testSet.forEach {
@@ -56,12 +57,13 @@
 
   @Test
   fun testInt() {
-    val testSet = arrayOf(
-      33333500 to byteArrayOf(-4, -96, -4, 1),
-      Int.MIN_VALUE to byteArrayOf(0, 0, 0, -128),
-      Int.MAX_VALUE to byteArrayOf(-1, -1, -1, 127),
-      0 to byteArrayOf(0, 0, 0, 0)
-    )
+    val testSet =
+      arrayOf(
+        33333500 to byteArrayOf(-4, -96, -4, 1),
+        Int.MIN_VALUE to byteArrayOf(0, 0, 0, -128),
+        Int.MAX_VALUE to byteArrayOf(-1, -1, -1, 127),
+        0 to byteArrayOf(0, 0, 0, 0),
+      )
     val data = ByteArray(Int.SIZE_BYTES)
     testSet.forEach {
       data.setInt(0, it.first)
@@ -72,13 +74,14 @@
 
   @Test
   fun testLong() {
-    val testSet = arrayOf(
-      1234567123122890123L to byteArrayOf(-117, -91, 29, -23, 65, 16, 34, 17),
-      -1L to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, -1),
-      Long.MIN_VALUE to byteArrayOf(0, 0, 0, 0, 0, 0, 0, -128),
-      Long.MAX_VALUE to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, 127),
-      0L to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0)
-    )
+    val testSet =
+      arrayOf(
+        1234567123122890123L to byteArrayOf(-117, -91, 29, -23, 65, 16, 34, 17),
+        -1L to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, -1),
+        Long.MIN_VALUE to byteArrayOf(0, 0, 0, 0, 0, 0, 0, -128),
+        Long.MAX_VALUE to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, 127),
+        0L to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0),
+      )
     val data = ByteArray(Long.SIZE_BYTES)
     testSet.forEach {
       data.setLong(0, it.first)
@@ -89,12 +92,13 @@
 
   @Test
   fun testULong() {
-    val testSet = arrayOf(
-      1234567123122890123UL to byteArrayOf(-117, -91, 29, -23, 65, 16, 34, 17),
-      ULong.MIN_VALUE to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0),
-      (-1L).toULong() to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, -1),
-      0UL to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0)
-    )
+    val testSet =
+      arrayOf(
+        1234567123122890123UL to byteArrayOf(-117, -91, 29, -23, 65, 16, 34, 17),
+        ULong.MIN_VALUE to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0),
+        (-1L).toULong() to byteArrayOf(-1, -1, -1, -1, -1, -1, -1, -1),
+        0UL to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0),
+      )
     val data = ByteArray(ULong.SIZE_BYTES)
     testSet.forEach {
       data.setULong(0, it.first)
@@ -105,12 +109,13 @@
 
   @Test
   fun testFloat() {
-    val testSet = arrayOf(
-      3545.56337f to byteArrayOf(4, -103, 93, 69),
-      Float.MIN_VALUE to byteArrayOf(1, 0, 0, 0),
-      Float.MAX_VALUE to byteArrayOf(-1, -1, 127, 127),
-      0f to byteArrayOf(0, 0, 0, 0)
-    )
+    val testSet =
+      arrayOf(
+        3545.56337f to byteArrayOf(4, -103, 93, 69),
+        Float.MIN_VALUE to byteArrayOf(1, 0, 0, 0),
+        Float.MAX_VALUE to byteArrayOf(-1, -1, 127, 127),
+        0f to byteArrayOf(0, 0, 0, 0),
+      )
     val data = ByteArray(Float.SIZE_BYTES)
     testSet.forEach {
       data.setFloat(0, it.first)
@@ -120,12 +125,13 @@
 
   @Test
   fun testDouble() {
-    val testSet = arrayOf(
-      123456.523423423412 to byteArrayOf(88, 61, -15, 95, 8, 36, -2, 64),
-      Double.MIN_VALUE to byteArrayOf(1, 0, 0, 0, 0, 0, 0, 0),
-      Double.MAX_VALUE to byteArrayOf(-1, -1, -1, -1, -1, -1, -17, 127),
-      0.0 to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0)
-    )
+    val testSet =
+      arrayOf(
+        123456.523423423412 to byteArrayOf(88, 61, -15, 95, 8, 36, -2, 64),
+        Double.MIN_VALUE to byteArrayOf(1, 0, 0, 0, 0, 0, 0, 0),
+        Double.MAX_VALUE to byteArrayOf(-1, -1, -1, -1, -1, -1, -17, 127),
+        0.0 to byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0),
+      )
     val data = ByteArray(Long.SIZE_BYTES)
     testSet.forEach {
       data.setDouble(0, it.first)
@@ -144,4 +150,3 @@
     assertEquals(testSet, data.getString(0, encoded.size))
   }
 }
-
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilderTest.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilderTest.kt
index 90c1021..190af54 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilderTest.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlatBufferBuilderTest.kt
@@ -18,19 +18,17 @@
 package com.google.flatbuffers.kotlin
 
 import Attacker
-import AttackerOffsetArray
 import CharacterEArray
-import dictionaryLookup.LongFloatEntry
-import dictionaryLookup.LongFloatMap
 import Movie
+import dictionaryLookup.LongFloatEntry
 import dictionaryLookup.LongFloatEntryOffsetArray
+import dictionaryLookup.LongFloatMap
+import kotlin.test.Test
+import kotlin.test.assertEquals
 import myGame.example.*
 import myGame.example.Test.Companion.createTest
 import optionalScalars.OptionalByte
 import optionalScalars.ScalarStuff
-import kotlin.test.Test
-import kotlin.test.assertEquals
-
 
 @ExperimentalUnsignedTypes
 class FlatBufferBuilderTest {
@@ -43,10 +41,8 @@
     val inv = Monster.createInventoryVector(fbb, invValues)
     Monster.startMonster(fbb)
     Monster.addPos(
-      fbb, Vec3.createVec3(
-        fbb, 1.0f, 2.0f, 3.0f, 3.0,
-        Color.Green, 5.toShort(), 6.toByte()
-      )
+      fbb,
+      Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, Color.Green, 5.toShort(), 6.toByte()),
     )
     Monster.addHp(fbb, 80.toShort())
     Monster.addName(fbb, name)
@@ -86,12 +82,14 @@
   @Test
   fun testSortedVector() {
     val fbb = FlatBufferBuilder()
-    val names = arrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
-    val monsters = MonsterOffsetArray(3) {
-      Monster.startMonster(fbb)
-      Monster.addName(fbb, names[it])
-      Monster.endMonster(fbb)
-    }
+    val names =
+      arrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
+    val monsters =
+      MonsterOffsetArray(3) {
+        Monster.startMonster(fbb)
+        Monster.addName(fbb, names[it])
+        Monster.endMonster(fbb)
+      }
     val ary = Monster.createTestarrayoftablesVector(fbb, monsters)
     Monster.startMonster(fbb)
     Monster.addName(fbb, names[0])
@@ -161,7 +159,8 @@
   @Test
   fun testBuilderBasics() {
     val fbb = FlatBufferBuilder()
-    val names = arrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
+    val names =
+      arrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
     val off = Array<Offset<Monster>>(3) { Offset(0) }
     Monster.startMonster(fbb)
     Monster.addName(fbb, names[0])
@@ -176,7 +175,7 @@
 
     // We set up the same values as monsterdata.json:
 
-    val inv = Monster.createInventoryVector(fbb, byteArrayOf(0,1,2,3,4).toUByteArray())
+    val inv = Monster.createInventoryVector(fbb, byteArrayOf(0, 1, 2, 3, 4).toUByteArray())
 
     val fred = fbb.createString("Fred")
     Monster.startMonster(fbb)
@@ -189,15 +188,14 @@
     val test4 = fbb.endVector<myGame.example.Test>()
 
     val strings = StringOffsetArray(2) { fbb.createString("test$it") }
-    val testArrayOfString =
-      Monster.createTestarrayofstringVector(fbb, strings)
+    val testArrayOfString = Monster.createTestarrayofstringVector(fbb, strings)
 
     Monster.startMonster(fbb)
     Monster.addName(fbb, names[0])
-    Monster.addPos(fbb, Vec3.createVec3(
-      fbb, 1.0f, 2.0f, 3.0f, 3.0,
-      Color.Green, 5.toShort(), 6.toByte()
-    ))
+    Monster.addPos(
+      fbb,
+      Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, Color.Green, 5.toShort(), 6.toByte()),
+    )
     Monster.addHp(fbb, 80)
     Monster.addMana(fbb, 150)
     Monster.addInventory(fbb, inv)
@@ -210,7 +208,7 @@
     Monster.addTestarrayoftables(fbb, sortMons)
     val mon = Monster.endMonster(fbb)
     Monster.finishMonsterBuffer(fbb, mon)
-    //Attempt to mutate Monster fields and check whether the buffer has been mutated properly
+    // Attempt to mutate Monster fields and check whether the buffer has been mutated properly
     // revert to original values after testing
     val monster = Monster.asRoot(fbb.dataBuffer())
 
@@ -255,14 +253,12 @@
         CharacterE.MuLan,
         attacker,
         Movie.createCharactersTypeVector(fbb, characters),
-        Movie.createCharactersVector(fbb, attackers)
-      )
+        Movie.createCharactersVector(fbb, attackers),
+      ),
     )
 
     val movie: Movie = Movie.asRoot(fbb.dataBuffer())
 
-
-
     assertEquals(movie.charactersTypeLength, 1)
     assertEquals(movie.charactersLength, 1)
 
@@ -326,7 +322,7 @@
     fbb.clear()
 
     val largeData = ByteArray(1024)
-    offset = fbb.createByteVector(largeData) as VectorOffset<UByte> //TODO: fix me
+    offset = fbb.createByteVector(largeData) as VectorOffset<UByte> // TODO: fix me
     str = fbb.createString("ByteMonster")
     Monster.startMonster(fbb)
     Monster.addName(fbb, str)
@@ -340,7 +336,7 @@
     fbb.clear()
 
     var bb = ArrayReadBuffer(largeData, 512)
-    offset = fbb.createByteVector(bb) as VectorOffset<UByte> //TODO: fix me
+    offset = fbb.createByteVector(bb) as VectorOffset<UByte> // TODO: fix me
     str = fbb.createString("ByteMonster")
     Monster.startMonster(fbb)
     Monster.addName(fbb, str)
@@ -354,7 +350,7 @@
 
     bb = ArrayReadBuffer(largeData, largeData.size - 216)
     val stringBuffer = ArrayReadBuffer("AlreadyBufferedString".encodeToByteArray())
-    offset = fbb.createByteVector(bb) as VectorOffset<UByte> //TODO: fix me
+    offset = fbb.createByteVector(bb) as VectorOffset<UByte> // TODO: fix me
     str = fbb.createString(stringBuffer)
     Monster.startMonster(fbb)
     Monster.addName(fbb, str)
@@ -507,19 +503,19 @@
     assertEquals(scalarStuff.defaultEnum, OptionalByte.Two)
   }
 
-// @todo Seems like nesting code generation is broken for all generators.
-// disabling test for now.
-//  @Test
-//  fun testNamespaceNesting() {
-//    // reference / manipulate these to verify compilation
-//    val fbb = FlatBufferBuilder(1)
-//    TableInNestedNS.startTableInNestedNS(fbb)
-//    TableInNestedNS.addFoo(fbb, 1234)
-//    val nestedTableOff = TableInNestedNS.endTableInNestedNs(fbb)
-//    TableInFirstNS.startTableInFirstNS(fbb)
-//    TableInFirstNS.addFooTable(fbb, nestedTableOff)
-//    TableInFirstNS.endTableInFirstNs(fbb)
-//  }
+  // @todo Seems like nesting code generation is broken for all generators.
+  // disabling test for now.
+  //  @Test
+  //  fun testNamespaceNesting() {
+  //    // reference / manipulate these to verify compilation
+  //    val fbb = FlatBufferBuilder(1)
+  //    TableInNestedNS.startTableInNestedNS(fbb)
+  //    TableInNestedNS.addFoo(fbb, 1234)
+  //    val nestedTableOff = TableInNestedNS.endTableInNestedNs(fbb)
+  //    TableInFirstNS.startTableInFirstNS(fbb)
+  //    TableInFirstNS.addFooTable(fbb, nestedTableOff)
+  //    TableInFirstNS.endTableInFirstNs(fbb)
+  //  }
 
   @Test
   fun testNestedFlatBuffer() {
@@ -558,7 +554,8 @@
   fun testDictionaryLookup() {
     val fbb = FlatBufferBuilder(16)
     val lfIndex = LongFloatEntry.createLongFloatEntry(fbb, 0, 99.0f)
-    val vectorEntriesIdx = LongFloatMap.createEntriesVector(fbb, LongFloatEntryOffsetArray(1) { lfIndex })
+    val vectorEntriesIdx =
+      LongFloatMap.createEntriesVector(fbb, LongFloatEntryOffsetArray(1) { lfIndex })
     val rootIdx = LongFloatMap.createLongFloatMap(fbb, vectorEntriesIdx)
     LongFloatMap.finishLongFloatMapBuffer(fbb, rootIdx)
     val map: LongFloatMap = LongFloatMap.asRoot(fbb.dataBuffer())
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlexBuffersTest.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlexBuffersTest.kt
index 524dd0e..005bf6c 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlexBuffersTest.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlexBuffersTest.kt
@@ -24,12 +24,13 @@
 
   @Test
   fun testWriteInt() {
-    val values = listOf(
-      Byte.MAX_VALUE.toLong() to 3,
-      Short.MAX_VALUE.toLong() to 4,
-      Int.MAX_VALUE.toLong() to 6,
-      Long.MAX_VALUE to 10
-    )
+    val values =
+      listOf(
+        Byte.MAX_VALUE.toLong() to 3,
+        Short.MAX_VALUE.toLong() to 4,
+        Int.MAX_VALUE.toLong() to 6,
+        Long.MAX_VALUE to 10,
+      )
     val builder = FlexBuffersBuilder()
     values.forEach {
       builder.clear()
@@ -44,12 +45,13 @@
 
   @Test
   fun testWriteUInt() {
-    val values = listOf(
-      UByte.MAX_VALUE.toULong() to 3,
-      UShort.MAX_VALUE.toULong() to 4,
-      UInt.MAX_VALUE.toULong() to 6,
-      ULong.MAX_VALUE to 10
-    )
+    val values =
+      listOf(
+        UByte.MAX_VALUE.toULong() to 3,
+        UShort.MAX_VALUE.toULong() to 4,
+        UInt.MAX_VALUE.toULong() to 6,
+        ULong.MAX_VALUE to 10,
+      )
     val builder = FlexBuffersBuilder()
     values.forEach {
       builder.clear()
@@ -126,7 +128,8 @@
 
   @Test
   fun testLongArray() {
-    val ary: LongArray = longArrayOf(0, Short.MIN_VALUE.toLong(), Int.MAX_VALUE.toLong(), Long.MAX_VALUE)
+    val ary: LongArray =
+      longArrayOf(0, Short.MIN_VALUE.toLong(), Int.MAX_VALUE.toLong(), Long.MAX_VALUE)
     val builder = FlexBuffersBuilder()
     builder.put(ary)
     val data = builder.finish()
@@ -139,9 +142,7 @@
   fun testStringArray() {
     val ary = Array(5) { "Hello world number: $it" }
     val builder = FlexBuffersBuilder(ArrayReadWriteBuffer(20), SHARE_NONE)
-    builder.putVector {
-      ary.forEach { put(it) }
-    }
+    builder.putVector { ary.forEach { put(it) } }
     val data = builder.finish()
     val vec = getRoot(data).toVector()
     // although we put a long, it is shrink to a byte
@@ -237,9 +238,7 @@
       this["int"] = 10
       this["float"] = 12.3
       this["intarray"] = intArrayOf(1, 2, 3, 4, 5)
-      this.putMap("myMap") {
-        this["cool"] = "beans"
-      }
+      this.putMap("myMap") { this["cool"] = "beans" }
     }
 
     val ref = getRoot(builder.finish())
@@ -257,7 +256,9 @@
     assertEquals(true, ref["invalid_key"].isNull)
 
     val keys = map.keys.toTypedArray()
-    arrayOf("hello", "int", "float", "intarray", "myMap").sortedArray().forEachIndexed { i: Int, it: String ->
+    arrayOf("hello", "int", "float", "intarray", "myMap").sortedArray().forEachIndexed {
+      i: Int,
+      it: String ->
       assertEquals(it, keys[i].toString())
     }
   }
diff --git a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/JSONTest.kt b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/JSONTest.kt
index 0375bb5..0cb2b4d 100644
--- a/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/JSONTest.kt
+++ b/kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/JSONTest.kt
@@ -23,9 +23,11 @@
 
   @Test
   fun parse2Test() {
-    val dataStr = """
-      { "myKey" : [1, "yay"] }
-    """.trimIndent()
+    val dataStr =
+      """
+        { "myKey" : [1, "yay"] }
+      """
+        .trimIndent()
     val data = dataStr.encodeToByteArray()
     val buffer = ArrayReadWriteBuffer(data, writePosition = data.size)
     val parser = JSONParser()
@@ -35,7 +37,8 @@
 
   @Test
   fun parseSample() {
-    val dataStr = """
+    val dataStr =
+      """
       {
         "ary" : [1, 2, 3],
         "boolean_false": false,
@@ -69,26 +72,29 @@
     val obj = map["object"]
     assertEquals(true, obj.isMap)
     assertEquals("{\"field1\":\"hello\"}", obj.toJson())
-    // TODO: Kotlin Double.toString() produce different strings dependending on the platform, so on JVM
+    // TODO: Kotlin Double.toString() produce different strings dependending on the platform, so on
+    // JVM
     // is 1.2E33, while on js is 1.2e+33. For now we are disabling this test.
     //
-    // val minified = data.filterNot { it == ' '.toByte() || it == '\n'.toByte() }.toByteArray().decodeToString()
+    // val minified = data.filterNot { it == ' '.toByte() || it == '\n'.toByte()
+    // }.toByteArray().decodeToString()
     // assertEquals(minified, root.toJson())
   }
 
   @Test
   fun testDoubles() {
-    val values = arrayOf(
-      "-0.0",
-      "1.0",
-      "1.7976931348613157",
-      "0.0",
-      "-0.5",
-      "3.141592653589793",
-      "2.718281828459045E-3",
-      "2.2250738585072014E-308",
-      "4.9E-15",
-    )
+    val values =
+      arrayOf(
+        "-0.0",
+        "1.0",
+        "1.7976931348613157",
+        "0.0",
+        "-0.5",
+        "3.141592653589793",
+        "2.718281828459045E-3",
+        "2.2250738585072014E-308",
+        "4.9E-15",
+      )
     val parser = JSONParser()
     assertEquals(-0.0, parser.parse(values[0]).toDouble())
     assertEquals(1.0, parser.parse(values[1]).toDouble())
@@ -103,15 +109,16 @@
 
   @Test
   fun testInts() {
-    val values = arrayOf(
-      "-0",
-      "0",
-      "-1",
-      "${Int.MAX_VALUE}",
-      "${Int.MIN_VALUE}",
-      "${Long.MAX_VALUE}",
-      "${Long.MIN_VALUE}",
-    )
+    val values =
+      arrayOf(
+        "-0",
+        "0",
+        "-1",
+        "${Int.MAX_VALUE}",
+        "${Int.MIN_VALUE}",
+        "${Long.MAX_VALUE}",
+        "${Long.MIN_VALUE}",
+      )
     val parser = JSONParser()
 
     assertEquals(parser.parse(values[0]).toInt(), 0)
@@ -125,11 +132,7 @@
 
   @Test
   fun testBooleansAndNull() {
-    val values = arrayOf(
-      "true",
-      "false",
-      "null"
-    )
+    val values = arrayOf("true", "false", "null")
     val parser = JSONParser()
 
     assertEquals(true, parser.parse(values[0]).toBoolean())
@@ -139,16 +142,17 @@
 
   @Test
   fun testStrings() {
-    val values = arrayOf(
-      "\"\"",
-      "\"a\"",
-      "\"hello world\"",
-      "\"\\\"\\\\\\/\\b\\f\\n\\r\\t cool\"",
-      "\"\\u0000\"",
-      "\"\\u0021\"",
-      "\"hell\\u24AC\\n\\ro wor \\u0021 ld\"",
-      "\"\\/_\\\\_\\\"_\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\n\\r\\t`1~!@#\$%^&*()_+-=[]{}|;:',./<>?\"",
-    )
+    val values =
+      arrayOf(
+        "\"\"",
+        "\"a\"",
+        "\"hello world\"",
+        "\"\\\"\\\\\\/\\b\\f\\n\\r\\t cool\"",
+        "\"\\u0000\"",
+        "\"\\u0021\"",
+        "\"hell\\u24AC\\n\\ro wor \\u0021 ld\"",
+        "\"\\/_\\\\_\\\"_\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\n\\r\\t`1~!@#\$%^&*()_+-=[]{}|;:',./<>?\"",
+      )
     val parser = JSONParser()
 
     // empty
@@ -189,39 +193,41 @@
   @Test
   fun testUnicode() {
     // took from test/unicode_test.json
-    val data = """
-      {
-        "name": "unicode_test",
-        "testarrayofstring": [
-          "Цлїςσδε",
-          "フムアムカモケモ",
-          "フムヤムカモケモ",
-          "㊀㊁㊂㊃㊄",
-          "☳☶☲",
-          "𡇙𝌆"
-        ],
-        "testarrayoftables": [
-          {
-            "name": "Цлїςσδε"
-          },
-          {
-            "name": "☳☶☲"
-          },
-          {
-            "name": "フムヤムカモケモ"
-          },
-          {
-            "name": "㊀㊁㊂㊃㊄"
-          },
-          {
-            "name": "フムアムカモケモ"
-          },
-          {
-            "name": "𡇙𝌆"
-          }
-        ]
-      }
-    """.trimIndent()
+    val data =
+      """
+        {
+          "name": "unicode_test",
+          "testarrayofstring": [
+            "Цлїςσδε",
+            "フムアムカモケモ",
+            "フムヤムカモケモ",
+            "㊀㊁㊂㊃㊄",
+            "☳☶☲",
+            "𡇙𝌆"
+          ],
+          "testarrayoftables": [
+            {
+              "name": "Цлїςσδε"
+            },
+            {
+              "name": "☳☶☲"
+            },
+            {
+              "name": "フムヤムカモケモ"
+            },
+            {
+              "name": "㊀㊁㊂㊃㊄"
+            },
+            {
+              "name": "フムアムカモケモ"
+            },
+            {
+              "name": "𡇙𝌆"
+            }
+          ]
+        }
+      """
+        .trimIndent()
     val parser = JSONParser()
     val ref = parser.parse(data)
 
@@ -248,15 +254,16 @@
 
   @Test
   fun testArrays() {
-    val values = arrayOf(
-      "[]",
-      "[1]",
-      "[0,1, 2,3  , 4 ]",
-      "[1.0, 2.2250738585072014E-308,  4.9E-320]",
-      "[1.0, 2,  \"hello world\"]   ",
-      "[ 1.1, 2, [ \"hello\" ] ]",
-      "[[[1]]]"
-    )
+    val values =
+      arrayOf(
+        "[]",
+        "[1]",
+        "[0,1, 2,3  , 4 ]",
+        "[1.0, 2.2250738585072014E-308,  4.9E-320]",
+        "[1.0, 2,  \"hello world\"]   ",
+        "[ 1.1, 2, [ \"hello\" ] ]",
+        "[[[1]]]",
+      )
     val parser = JSONParser()
 
     // empty
@@ -300,47 +307,47 @@
   }
 
   /**
-   * Several test cases provided by json.org
-   * For more details, see: http://json.org/JSON_checker/, with only
-   * one exception. Single strings are considered accepted, whereas on
-   * the test suit is should fail.
+   * Several test cases provided by json.org For more details, see: http://json.org/JSON_checker/,
+   * with only one exception. Single strings are considered accepted, whereas on the test suit is
+   * should fail.
    */
   @Test
   fun testParseMustFail() {
-    val failList = listOf(
-      "[\"Unclosed array\"",
-      "{unquoted_key: \"keys must be quoted\"}",
-      "[\"extra comma\",]",
-      "[\"double extra comma\",,]",
-      "[   , \"<-- missing value\"]",
-      "[\"Comma after the close\"],",
-      "[\"Extra close\"]]",
-      "{\"Extra comma\": true,}",
-      "{\"Extra value after close\": true} \"misplaced quoted value\"",
-      "{\"Illegal expression\": 1 + 2}",
-      "{\"Illegal invocation\": alert()}",
-      "{\"Numbers cannot have leading zeroes\": 013}",
-      "{\"Numbers cannot be hex\": 0x14}",
-      "[\"Illegal backslash escape: \\x15\"]",
-      "[\\naked]",
-      "[\"Illegal backslash escape: \\017\"]",
-      "[[[[[[[[[[[[[[[[[[[[[[[\"Too deep\"]]]]]]]]]]]]]]]]]]]]]]]",
-      "{\"Missing colon\" null}",
-      "{\"Double colon\":: null}",
-      "{\"Comma instead of colon\", null}",
-      "[\"Colon instead of comma\": false]",
-      "[\"Bad value\", truth]",
-      "['single quote']",
-      "[\"\ttab\tcharacter\tin\tstring\t\"]",
-      "[\"tab\\   character\\   in\\  string\\  \"]",
-      "[\"line\nbreak\"]",
-      "[\"line\\\nbreak\"]",
-      "[0e]",
-      "[0e+]",
-      "[0e+-1]",
-      "{\"Comma instead if closing brace\": true,",
-      "[\"mismatch\"}"
-    )
+    val failList =
+      listOf(
+        "[\"Unclosed array\"",
+        "{unquoted_key: \"keys must be quoted\"}",
+        "[\"extra comma\",]",
+        "[\"double extra comma\",,]",
+        "[   , \"<-- missing value\"]",
+        "[\"Comma after the close\"],",
+        "[\"Extra close\"]]",
+        "{\"Extra comma\": true,}",
+        "{\"Extra value after close\": true} \"misplaced quoted value\"",
+        "{\"Illegal expression\": 1 + 2}",
+        "{\"Illegal invocation\": alert()}",
+        "{\"Numbers cannot have leading zeroes\": 013}",
+        "{\"Numbers cannot be hex\": 0x14}",
+        "[\"Illegal backslash escape: \\x15\"]",
+        "[\\naked]",
+        "[\"Illegal backslash escape: \\017\"]",
+        "[[[[[[[[[[[[[[[[[[[[[[[\"Too deep\"]]]]]]]]]]]]]]]]]]]]]]]",
+        "{\"Missing colon\" null}",
+        "{\"Double colon\":: null}",
+        "{\"Comma instead of colon\", null}",
+        "[\"Colon instead of comma\": false]",
+        "[\"Bad value\", truth]",
+        "['single quote']",
+        "[\"\ttab\tcharacter\tin\tstring\t\"]",
+        "[\"tab\\   character\\   in\\  string\\  \"]",
+        "[\"line\nbreak\"]",
+        "[\"line\\\nbreak\"]",
+        "[0e]",
+        "[0e+]",
+        "[0e+-1]",
+        "{\"Comma instead if closing brace\": true,",
+        "[\"mismatch\"}",
+      )
     for (data in failList) {
       try {
         JSONParser().parse(ArrayReadBuffer(data.encodeToByteArray()))
@@ -353,73 +360,74 @@
 
   @Test
   fun testParseMustPass() {
-    val passList = listOf(
-      "[\n" +
-        "    \"JSON Test Pattern pass1\",\n" +
-        "    {\"object with 1 member\":[\"array with 1 element\"]},\n" +
-        "    {},\n" +
-        "    [],\n" +
-        "    -42,\n" +
-        "    true,\n" +
-        "    false,\n" +
-        "    null,\n" +
-        "    {\n" +
-        "        \"integer\": 1234567890,\n" +
-        "        \"real\": -9876.543210,\n" +
-        "        \"e\": 0.123456789e-12,\n" +
-        "        \"E\": 1.234567890E+34,\n" +
-        "        \"\":  23456789012E66,\n" +
-        "        \"zero\": 0,\n" +
-        "        \"one\": 1,\n" +
-        "        \"space\": \" \",\n" +
-        "        \"quote\": \"\\\"\",\n" +
-        "        \"backslash\": \"\\\\\",\n" +
-        "        \"controls\": \"\\b\\f\\n\\r\\t\",\n" +
-        "        \"slash\": \"/ & \\/\",\n" +
-        "        \"alpha\": \"abcdefghijklmnopqrstuvwyz\",\n" +
-        "        \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWYZ\",\n" +
-        "        \"digit\": \"0123456789\",\n" +
-        "        \"0123456789\": \"digit\",\n" +
-        "        \"special\": \"`1~!@#\$%^&*()_+-={':[,]}|;.</>?\",\n" +
-        "        \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\",\n" +
-        "        \"true\": true,\n" +
-        "        \"false\": false,\n" +
-        "        \"null\": null,\n" +
-        "        \"array\":[  ],\n" +
-        "        \"object\":{  },\n" +
-        "        \"address\": \"50 St. James Street\",\n" +
-        "        \"url\": \"http://www.JSON.org/\",\n" +
-        "        \"comment\": \"// /* <!-- --\",\n" +
-        "        \"# -- --> */\": \" \",\n" +
-        "        \" s p a c e d \" :[1,2 , 3\n" +
-        "\n" +
-        ",\n" +
-        "\n" +
-        "4 , 5        ,          6           ,7        ],\"compact\":[1,2,3,4,5,6,7],\n" +
-        "        \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\",\n" +
-        "        \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\",\n" +
-        "        \"\\/\\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#\$%^&*()_+-=[]{}|;:',./<>?\"\n" +
-        ": \"A key can be any string\"\n" +
-        "    },\n" +
-        "    0.5 ,98.6\n" +
-        ",\n" +
-        "99.44\n" +
-        ",\n" +
-        "\n" +
-        "1066,\n" +
-        "1e1,\n" +
-        "0.1e1,\n" +
-        "1e-1,\n" +
-        "1e00,2e+00,2e-00\n" +
-        ",\"rosebud\"]",
-      "{\n" +
-        "    \"JSON Test Pattern pass3\": {\n" +
-        "        \"The outermost value\": \"must be an object or array.\",\n" +
-        "        \"In this test\": \"It is an object.\"\n" +
-        "    }\n" +
-        "}",
-      "[[[[[[[[[[[[[[[[[[[\"Not too deep\"]]]]]]]]]]]]]]]]]]]",
-    )
+    val passList =
+      listOf(
+        "[\n" +
+          "    \"JSON Test Pattern pass1\",\n" +
+          "    {\"object with 1 member\":[\"array with 1 element\"]},\n" +
+          "    {},\n" +
+          "    [],\n" +
+          "    -42,\n" +
+          "    true,\n" +
+          "    false,\n" +
+          "    null,\n" +
+          "    {\n" +
+          "        \"integer\": 1234567890,\n" +
+          "        \"real\": -9876.543210,\n" +
+          "        \"e\": 0.123456789e-12,\n" +
+          "        \"E\": 1.234567890E+34,\n" +
+          "        \"\":  23456789012E66,\n" +
+          "        \"zero\": 0,\n" +
+          "        \"one\": 1,\n" +
+          "        \"space\": \" \",\n" +
+          "        \"quote\": \"\\\"\",\n" +
+          "        \"backslash\": \"\\\\\",\n" +
+          "        \"controls\": \"\\b\\f\\n\\r\\t\",\n" +
+          "        \"slash\": \"/ & \\/\",\n" +
+          "        \"alpha\": \"abcdefghijklmnopqrstuvwyz\",\n" +
+          "        \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWYZ\",\n" +
+          "        \"digit\": \"0123456789\",\n" +
+          "        \"0123456789\": \"digit\",\n" +
+          "        \"special\": \"`1~!@#\$%^&*()_+-={':[,]}|;.</>?\",\n" +
+          "        \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\",\n" +
+          "        \"true\": true,\n" +
+          "        \"false\": false,\n" +
+          "        \"null\": null,\n" +
+          "        \"array\":[  ],\n" +
+          "        \"object\":{  },\n" +
+          "        \"address\": \"50 St. James Street\",\n" +
+          "        \"url\": \"http://www.JSON.org/\",\n" +
+          "        \"comment\": \"// /* <!-- --\",\n" +
+          "        \"# -- --> */\": \" \",\n" +
+          "        \" s p a c e d \" :[1,2 , 3\n" +
+          "\n" +
+          ",\n" +
+          "\n" +
+          "4 , 5        ,          6           ,7        ],\"compact\":[1,2,3,4,5,6,7],\n" +
+          "        \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\",\n" +
+          "        \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\",\n" +
+          "        \"\\/\\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#\$%^&*()_+-=[]{}|;:',./<>?\"\n" +
+          ": \"A key can be any string\"\n" +
+          "    },\n" +
+          "    0.5 ,98.6\n" +
+          ",\n" +
+          "99.44\n" +
+          ",\n" +
+          "\n" +
+          "1066,\n" +
+          "1e1,\n" +
+          "0.1e1,\n" +
+          "1e-1,\n" +
+          "1e00,2e+00,2e-00\n" +
+          ",\"rosebud\"]",
+        "{\n" +
+          "    \"JSON Test Pattern pass3\": {\n" +
+          "        \"The outermost value\": \"must be an object or array.\",\n" +
+          "        \"In this test\": \"It is an object.\"\n" +
+          "    }\n" +
+          "}",
+        "[[[[[[[[[[[[[[[[[[[\"Not too deep\"]]]]]]]]]]]]]]]]]]]",
+      )
     for (data in passList) {
       JSONParser().parse(ArrayReadBuffer(data.encodeToByteArray()))
     }
diff --git a/kotlin/flatbuffers-kotlin/src/jsMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt b/kotlin/flatbuffers-kotlin/src/jsMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
index 99c6b51..b8ad5c9 100644
--- a/kotlin/flatbuffers-kotlin/src/jsMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
+++ b/kotlin/flatbuffers-kotlin/src/jsMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
@@ -17,25 +17,50 @@
 
 package com.google.flatbuffers.kotlin
 
-/**
- * This implementation uses Little Endian order.
- */
+/** This implementation uses Little Endian order. */
 public actual inline fun ByteArray.getUByte(index: Int): UByte = ByteArrayOps.getUByte(this, index)
-public actual inline fun ByteArray.getShort(index: Int): Short = ByteArrayOps.getShort(this, index)
-public actual inline fun ByteArray.getUShort(index: Int): UShort = ByteArrayOps.getUShort(this, index)
-public actual inline fun ByteArray.getInt(index: Int): Int = ByteArrayOps.getInt(this, index)
-public actual inline fun ByteArray.getUInt(index: Int): UInt = ByteArrayOps.getUInt(this, index)
-public actual inline fun ByteArray.getLong(index: Int): Long = ByteArrayOps.getLong(this, index)
-public actual inline fun ByteArray.getULong(index: Int): ULong = ByteArrayOps.getULong(this, index)
-public actual inline fun ByteArray.getFloat(index: Int): Float = ByteArrayOps.getFloat(this, index)
-public actual inline fun ByteArray.getDouble(index: Int): Double = ByteArrayOps.getDouble(this, index)
 
-public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit = ByteArrayOps.setUByte(this, index, value)
-public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit = ByteArrayOps.setShort(this, index, value)
-public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit = ByteArrayOps.setUShort(this, index, value)
-public actual inline fun ByteArray.setInt(index: Int, value: Int): Unit = ByteArrayOps.setInt(this, index, value)
-public actual inline fun ByteArray.setUInt(index: Int, value: UInt): Unit = ByteArrayOps.setUInt(this, index, value)
-public actual inline fun ByteArray.setLong(index: Int, value: Long): Unit = ByteArrayOps.setLong(this, index, value)
-public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit = ByteArrayOps.setULong(this, index, value)
-public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit = ByteArrayOps.setFloat(this, index, value)
-public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit = ByteArrayOps.setDouble(this, index, value)
+public actual inline fun ByteArray.getShort(index: Int): Short = ByteArrayOps.getShort(this, index)
+
+public actual inline fun ByteArray.getUShort(index: Int): UShort =
+  ByteArrayOps.getUShort(this, index)
+
+public actual inline fun ByteArray.getInt(index: Int): Int = ByteArrayOps.getInt(this, index)
+
+public actual inline fun ByteArray.getUInt(index: Int): UInt = ByteArrayOps.getUInt(this, index)
+
+public actual inline fun ByteArray.getLong(index: Int): Long = ByteArrayOps.getLong(this, index)
+
+public actual inline fun ByteArray.getULong(index: Int): ULong = ByteArrayOps.getULong(this, index)
+
+public actual inline fun ByteArray.getFloat(index: Int): Float = ByteArrayOps.getFloat(this, index)
+
+public actual inline fun ByteArray.getDouble(index: Int): Double =
+  ByteArrayOps.getDouble(this, index)
+
+public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit =
+  ByteArrayOps.setUByte(this, index, value)
+
+public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit =
+  ByteArrayOps.setShort(this, index, value)
+
+public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit =
+  ByteArrayOps.setUShort(this, index, value)
+
+public actual inline fun ByteArray.setInt(index: Int, value: Int): Unit =
+  ByteArrayOps.setInt(this, index, value)
+
+public actual inline fun ByteArray.setUInt(index: Int, value: UInt): Unit =
+  ByteArrayOps.setUInt(this, index, value)
+
+public actual inline fun ByteArray.setLong(index: Int, value: Long): Unit =
+  ByteArrayOps.setLong(this, index, value)
+
+public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit =
+  ByteArrayOps.setULong(this, index, value)
+
+public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit =
+  ByteArrayOps.setFloat(this, index, value)
+
+public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit =
+  ByteArrayOps.setDouble(this, index, value)
diff --git a/kotlin/flatbuffers-kotlin/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt b/kotlin/flatbuffers-kotlin/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
index 94da7d3..9c17659 100644
--- a/kotlin/flatbuffers-kotlin/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
+++ b/kotlin/flatbuffers-kotlin/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
@@ -19,25 +19,50 @@
 
 package com.google.flatbuffers.kotlin
 
-/**
- * This implementation uses Little Endian order.
- */
+/** This implementation uses Little Endian order. */
 public actual inline fun ByteArray.getUByte(index: Int): UByte = ByteArrayOps.getUByte(this, index)
-public actual inline fun ByteArray.getShort(index: Int): Short = ByteArrayOps.getShort(this, index)
-public actual inline fun ByteArray.getUShort(index: Int): UShort = ByteArrayOps.getUShort(this, index)
-public actual inline fun ByteArray.getInt(index: Int): Int = ByteArrayOps.getInt(this, index)
-public actual inline fun ByteArray.getUInt(index: Int): UInt = ByteArrayOps.getUInt(this, index)
-public actual inline fun ByteArray.getLong(index: Int): Long = ByteArrayOps.getLong(this, index)
-public actual inline fun ByteArray.getULong(index: Int): ULong = ByteArrayOps.getULong(this, index)
-public actual inline fun ByteArray.getFloat(index: Int): Float = ByteArrayOps.getFloat(this, index)
-public actual inline fun ByteArray.getDouble(index: Int): Double = ByteArrayOps.getDouble(this, index)
 
-public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit = ByteArrayOps.setUByte(this, index, value)
-public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit = ByteArrayOps.setShort(this, index, value)
-public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit = ByteArrayOps.setUShort(this, index, value)
-public actual inline fun ByteArray.setInt(index: Int, value: Int): Unit = ByteArrayOps.setInt(this, index, value)
-public actual inline fun ByteArray.setUInt(index: Int, value: UInt): Unit = ByteArrayOps.setUInt(this, index, value)
-public actual inline fun ByteArray.setLong(index: Int, value: Long): Unit = ByteArrayOps.setLong(this, index, value)
-public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit = ByteArrayOps.setULong(this, index, value)
-public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit = ByteArrayOps.setFloat(this, index, value)
-public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit = ByteArrayOps.setDouble(this, index, value)
+public actual inline fun ByteArray.getShort(index: Int): Short = ByteArrayOps.getShort(this, index)
+
+public actual inline fun ByteArray.getUShort(index: Int): UShort =
+  ByteArrayOps.getUShort(this, index)
+
+public actual inline fun ByteArray.getInt(index: Int): Int = ByteArrayOps.getInt(this, index)
+
+public actual inline fun ByteArray.getUInt(index: Int): UInt = ByteArrayOps.getUInt(this, index)
+
+public actual inline fun ByteArray.getLong(index: Int): Long = ByteArrayOps.getLong(this, index)
+
+public actual inline fun ByteArray.getULong(index: Int): ULong = ByteArrayOps.getULong(this, index)
+
+public actual inline fun ByteArray.getFloat(index: Int): Float = ByteArrayOps.getFloat(this, index)
+
+public actual inline fun ByteArray.getDouble(index: Int): Double =
+  ByteArrayOps.getDouble(this, index)
+
+public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit =
+  ByteArrayOps.setUByte(this, index, value)
+
+public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit =
+  ByteArrayOps.setShort(this, index, value)
+
+public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit =
+  ByteArrayOps.setUShort(this, index, value)
+
+public actual inline fun ByteArray.setInt(index: Int, value: Int): Unit =
+  ByteArrayOps.setInt(this, index, value)
+
+public actual inline fun ByteArray.setUInt(index: Int, value: UInt): Unit =
+  ByteArrayOps.setUInt(this, index, value)
+
+public actual inline fun ByteArray.setLong(index: Int, value: Long): Unit =
+  ByteArrayOps.setLong(this, index, value)
+
+public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit =
+  ByteArrayOps.setULong(this, index, value)
+
+public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit =
+  ByteArrayOps.setFloat(this, index, value)
+
+public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit =
+  ByteArrayOps.setDouble(this, index, value)
diff --git a/kotlin/flatbuffers-kotlin/src/jvmTest/kotlin/com/google/flatbuffers/kotlin/Utf8Test.kt b/kotlin/flatbuffers-kotlin/src/jvmTest/kotlin/com/google/flatbuffers/kotlin/Utf8Test.kt
index 9b21741..9ace5ca 100644
--- a/kotlin/flatbuffers-kotlin/src/jvmTest/kotlin/com/google/flatbuffers/kotlin/Utf8Test.kt
+++ b/kotlin/flatbuffers-kotlin/src/jvmTest/kotlin/com/google/flatbuffers/kotlin/Utf8Test.kt
@@ -15,23 +15,21 @@
  */
 package com.google.flatbuffers.kotlin
 
-import org.junit.Test
 import kotlin.test.assertEquals
+import org.junit.Test
 
 class Utf8Test {
 
   @Test
   fun testUtf8EncodingDecoding() {
     val classLoader = this.javaClass.classLoader
-    val utf8Lines = String(classLoader.getResourceAsStream("utf8_sample.txt")!!.readBytes())
-      .split("\n")
-      .filter { it.trim().isNotEmpty() }
+    val utf8Lines =
+      String(classLoader.getResourceAsStream("utf8_sample.txt")!!.readBytes()).split("\n").filter {
+        it.trim().isNotEmpty()
+      }
 
-    val utf8Bytes = utf8Lines.map {
-        s -> ByteArray(Utf8.encodedLength(s)).also {
-          Utf8.encodeUtf8Array(s, it)
-        }
-    }
+    val utf8Bytes =
+      utf8Lines.map { s -> ByteArray(Utf8.encodedLength(s)).also { Utf8.encodeUtf8Array(s, it) } }
     utf8Bytes.indices.forEach {
       assertArrayEquals(utf8Lines[it].encodeToByteArray(), utf8Bytes[it])
       assertEquals(utf8Lines[it], Utf8.decodeUtf8Array(utf8Bytes[it]))
diff --git a/kotlin/flatbuffers-kotlin/src/nativeMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt b/kotlin/flatbuffers-kotlin/src/nativeMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
index 7c60952..21cc45a 100644
--- a/kotlin/flatbuffers-kotlin/src/nativeMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
+++ b/kotlin/flatbuffers-kotlin/src/nativeMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt
@@ -18,25 +18,47 @@
 package com.google.flatbuffers.kotlin
 
 /**
- * This implementation assumes that of native macOSX64 the byte order of the implementation is Little Endian.
+ * This implementation assumes that of native macOSX64 the byte order of the implementation is
+ * Little Endian.
  */
-
 public actual inline fun ByteArray.getUByte(index: Int): UByte = getUByteAt(index)
+
 public actual inline fun ByteArray.getShort(index: Int): Short = getShortAt(index)
+
 public actual inline fun ByteArray.getUShort(index: Int): UShort = getUShortAt(index)
+
 public actual inline fun ByteArray.getInt(index: Int): Int = getIntAt(index)
+
 public actual inline fun ByteArray.getUInt(index: Int): UInt = getUIntAt(index)
+
 public actual inline fun ByteArray.getLong(index: Int): Long = getLongAt(index)
+
 public actual inline fun ByteArray.getULong(index: Int): ULong = getULongAt(index)
 
-public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit = setUByteAt(index, value)
-public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit = setShortAt(index, value)
-public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit = setUShortAt(index, value)
+public actual inline fun ByteArray.setUByte(index: Int, value: UByte): Unit =
+  setUByteAt(index, value)
+
+public actual inline fun ByteArray.setShort(index: Int, value: Short): Unit =
+  setShortAt(index, value)
+
+public actual inline fun ByteArray.setUShort(index: Int, value: UShort): Unit =
+  setUShortAt(index, value)
+
 public actual inline fun ByteArray.setInt(index: Int, value: Int): Unit = setIntAt(index, value)
+
 public actual inline fun ByteArray.setUInt(index: Int, value: UInt): Unit = setUIntAt(index, value)
+
 public actual inline fun ByteArray.setLong(index: Int, value: Long): Unit = setLongAt(index, value)
-public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit = setULongAt(index, value)
-public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit = setFloatAt(index, value)
-public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit = setDoubleAt(index, value)
+
+public actual inline fun ByteArray.setULong(index: Int, value: ULong): Unit =
+  setULongAt(index, value)
+
+public actual inline fun ByteArray.setFloat(index: Int, value: Float): Unit =
+  setFloatAt(index, value)
+
+public actual inline fun ByteArray.setDouble(index: Int, value: Double): Unit =
+  setDoubleAt(index, value)
+
 public actual inline fun ByteArray.getFloat(index: Int): Float = Float.fromBits(getIntAt(index))
+
 public actual inline fun ByteArray.getDouble(index: Int): Double = Double.fromBits(getLongAt(index))
diff --git a/kotlin/settings.gradle.kts b/kotlin/settings.gradle.kts
index 9b6981e..f13e296 100644
--- a/kotlin/settings.gradle.kts
+++ b/kotlin/settings.gradle.kts
@@ -1,4 +1,7 @@
 rootProject.name = "flatbuffers-kotlin"
+
 includeBuild("convention-plugins")
+
 include("flatbuffers-kotlin")
+
 include("benchmark")
diff --git a/python/flatbuffers/__init__.py b/python/flatbuffers/__init__.py
index 74dc7ee..55ef937 100644
--- a/python/flatbuffers/__init__.py
+++ b/python/flatbuffers/__init__.py
@@ -12,8 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from .builder import Builder
-from .table import Table
-from .compat import range_func as compat_range
-from ._version import __version__
 from . import util
+from ._version import __version__
+from .builder import Builder
+from .compat import range_func as compat_range
+from .table import Table
diff --git a/python/flatbuffers/_version.py b/python/flatbuffers/_version.py
index a54de43..3ce910a 100644
--- a/python/flatbuffers/_version.py
+++ b/python/flatbuffers/_version.py
@@ -14,4 +14,4 @@
 
 # Placeholder, to be updated during the release process
 # by the setup.py
-__version__ = u"25.2.10"
+__version__ = "25.2.10"
diff --git a/python/flatbuffers/builder.py b/python/flatbuffers/builder.py
index c39cd28..71d0eba 100644
--- a/python/flatbuffers/builder.py
+++ b/python/flatbuffers/builder.py
@@ -12,813 +12,859 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from . import number_types as N
-from .number_types import (UOffsetTFlags, SOffsetTFlags, VOffsetTFlags)
-
-from . import encode
-from . import packer
+import warnings
 
 from . import compat
-from .compat import range_func
+from . import encode
+from . import number_types as N
+from . import packer
 from .compat import memoryview_type
-from .compat import import_numpy, NumpyRequiredForThisFeature
-
-import warnings
+from .compat import NumpyRequiredForThisFeature, import_numpy
+from .compat import range_func
+from .number_types import (SOffsetTFlags, UOffsetTFlags, VOffsetTFlags)
 
 np = import_numpy()
 ## @file
 ## @addtogroup flatbuffers_python_api
 ## @{
 
+
 ## @cond FLATBUFFERS_INTERNAL
 class OffsetArithmeticError(RuntimeError):
-    """
-    Error caused by an Offset arithmetic error. Probably caused by bad
-    writing of fields. This is considered an unreachable situation in
-    normal circumstances.
-    """
-    pass
+  """Error caused by an Offset arithmetic error.
+
+  Probably caused by bad writing of fields. This is considered an unreachable
+  situation in normal circumstances.
+  """
+
+  pass
 
 
 class IsNotNestedError(RuntimeError):
-    """
-    Error caused by using a Builder to write Object data when not inside
-    an Object.
-    """
-    pass
+  """Error caused by using a Builder to write Object data when not inside
+
+  an Object.
+  """
+
+  pass
 
 
 class IsNestedError(RuntimeError):
-    """
-    Error caused by using a Builder to begin an Object when an Object is
-    already being built.
-    """
-    pass
+  """Error caused by using a Builder to begin an Object when an Object is
+
+  already being built.
+  """
+
+  pass
 
 
 class StructIsNotInlineError(RuntimeError):
-    """
-    Error caused by using a Builder to write a Struct at a location that
-    is not the current Offset.
-    """
-    pass
+  """Error caused by using a Builder to write a Struct at a location that
+
+  is not the current Offset.
+  """
+
+  pass
 
 
 class BuilderSizeError(RuntimeError):
-    """
-    Error caused by causing a Builder to exceed the hardcoded limit of 2
-    gigabytes.
-    """
-    pass
+  """Error caused by causing a Builder to exceed the hardcoded limit of 2
+
+  gigabytes.
+  """
+
+  pass
+
 
 class BuilderNotFinishedError(RuntimeError):
-    """
-    Error caused by not calling `Finish` before calling `Output`.
-    """
-    pass
+  """Error caused by not calling `Finish` before calling `Output`."""
+
+  pass
+
 
 class EndVectorLengthMismatched(RuntimeError):
-    """
-    The number of elements passed to EndVector does not match the number 
-    specified in StartVector.
-    """
-    pass
+  """The number of elements passed to EndVector does not match the number
+
+  specified in StartVector.
+  """
+
+  pass
 
 
 # VtableMetadataFields is the count of metadata fields in each vtable.
 VtableMetadataFields = 2
 ## @endcond
 
+
 class Builder(object):
-    """ A Builder is used to construct one or more FlatBuffers.
+  """A Builder is used to construct one or more FlatBuffers.
 
-    Typically, Builder objects will be used from code generated by the `flatc`
-    compiler.
+  Typically, Builder objects will be used from code generated by the `flatc`
+  compiler.
 
-    A Builder constructs byte buffers in a last-first manner for simplicity and
-    performance during reading.
+  A Builder constructs byte buffers in a last-first manner for simplicity and
+  performance during reading.
 
-    Internally, a Builder is a state machine for creating FlatBuffer objects.
+  Internally, a Builder is a state machine for creating FlatBuffer objects.
 
-    It holds the following internal state:
-        - Bytes: an array of bytes.
-        - current_vtable: a list of integers.
-        - vtables: a hash of vtable entries.
+  It holds the following internal state:
+      - Bytes: an array of bytes.
+      - current_vtable: a list of integers.
+      - vtables: a hash of vtable entries.
 
-    Attributes:
-      Bytes: The internal `bytearray` for the Builder.
-      finished: A boolean determining if the Builder has been finalized.
-    """
+  Attributes:
+    Bytes: The internal `bytearray` for the Builder.
+    finished: A boolean determining if the Builder has been finalized.
+  """
 
-    ## @cond FLATBUFFERS_INTENRAL
-    __slots__ = ("Bytes", "current_vtable", "head", "minalign", "objectEnd",
-                 "vtables", "nested", "forceDefaults", "finished", "vectorNumElems",
-                 "sharedStrings")
+  ## @cond FLATBUFFERS_INTENRAL
+  __slots__ = (
+      "Bytes",
+      "current_vtable",
+      "head",
+      "minalign",
+      "objectEnd",
+      "vtables",
+      "nested",
+      "forceDefaults",
+      "finished",
+      "vectorNumElems",
+      "sharedStrings",
+  )
 
-    """Maximum buffer size constant, in bytes.
+  """Maximum buffer size constant, in bytes.
 
     Builder will never allow it's buffer grow over this size.
     Currently equals 2Gb.
     """
-    MAX_BUFFER_SIZE = 2**31
-    ## @endcond
+  MAX_BUFFER_SIZE = 2**31
+  ## @endcond
 
-    def __init__(self, initialSize=1024):
-        """Initializes a Builder of size `initial_size`.
+  def __init__(self, initialSize=1024):
+    """Initializes a Builder of size `initial_size`.
 
-        The internal buffer is grown as needed.
-        """
+    The internal buffer is grown as needed.
+    """
 
-        if not (0 <= initialSize <= Builder.MAX_BUFFER_SIZE):
-            msg = "flatbuffers: Cannot create Builder larger than 2 gigabytes."
-            raise BuilderSizeError(msg)
+    if not (0 <= initialSize <= Builder.MAX_BUFFER_SIZE):
+      msg = "flatbuffers: Cannot create Builder larger than 2 gigabytes."
+      raise BuilderSizeError(msg)
 
-        self.Bytes = bytearray(initialSize)
-        ## @cond FLATBUFFERS_INTERNAL
-        self.current_vtable = None
-        self.head = UOffsetTFlags.py_type(initialSize)
-        self.minalign = 1
-        self.objectEnd = None
-        self.vtables = {}
-        self.nested = False
-        self.forceDefaults = False
-        self.sharedStrings = {}
-        ## @endcond
-        self.finished = False
-
-    def Clear(self) -> None:
-        ## @cond FLATBUFFERS_INTERNAL
-        self.current_vtable = None
-        self.head = UOffsetTFlags.py_type(len(self.Bytes))
-        self.minalign = 1
-        self.objectEnd = None
-        self.vtables = {}
-        self.nested = False
-        self.forceDefaults = False
-        self.sharedStrings = {}
-        self.vectorNumElems = None
-        ## @endcond
-        self.finished = False
-
-    def Output(self):
-        """Return the portion of the buffer that has been used for writing data.
-
-        This is the typical way to access the FlatBuffer data inside the
-        builder. If you try to access `Builder.Bytes` directly, you would need
-        to manually index it with `Head()`, since the buffer is constructed
-        backwards.
-
-        It raises BuilderNotFinishedError if the buffer has not been finished
-        with `Finish`.
-        """
-
-        if not self.finished:
-            raise BuilderNotFinishedError()
-
-        return self.Bytes[self.Head():]
-
+    self.Bytes = bytearray(initialSize)
     ## @cond FLATBUFFERS_INTERNAL
-    def StartObject(self, numfields):
-        """StartObject initializes bookkeeping for writing a new object."""
+    self.current_vtable = None
+    self.head = UOffsetTFlags.py_type(initialSize)
+    self.minalign = 1
+    self.objectEnd = None
+    self.vtables = {}
+    self.nested = False
+    self.forceDefaults = False
+    self.sharedStrings = {}
+    ## @endcond
+    self.finished = False
 
-        self.assertNotNested()
+  def Clear(self) -> None:
+    ## @cond FLATBUFFERS_INTERNAL
+    self.current_vtable = None
+    self.head = UOffsetTFlags.py_type(len(self.Bytes))
+    self.minalign = 1
+    self.objectEnd = None
+    self.vtables = {}
+    self.nested = False
+    self.forceDefaults = False
+    self.sharedStrings = {}
+    self.vectorNumElems = None
+    ## @endcond
+    self.finished = False
 
-        # use 32-bit offsets so that arithmetic doesn't overflow.
-        self.current_vtable = [0 for _ in range_func(numfields)]
-        self.objectEnd = self.Offset()
-        self.nested = True
+  def Output(self):
+    """Return the portion of the buffer that has been used for writing data.
 
-    def WriteVtable(self):
-        """
-        WriteVtable serializes the vtable for the current object, if needed.
+    This is the typical way to access the FlatBuffer data inside the
+    builder. If you try to access `Builder.Bytes` directly, you would need
+    to manually index it with `Head()`, since the buffer is constructed
+    backwards.
 
-        Before writing out the vtable, this checks pre-existing vtables for
-        equality to this one. If an equal vtable is found, point the object to
-        the existing vtable and return.
+    It raises BuilderNotFinishedError if the buffer has not been finished
+    with `Finish`.
+    """
 
-        Because vtable values are sensitive to alignment of object data, not
-        all logically-equal vtables will be deduplicated.
+    if not self.finished:
+      raise BuilderNotFinishedError()
 
-        A vtable has the following format:
-          <VOffsetT: size of the vtable in bytes, including this value>
-          <VOffsetT: size of the object in bytes, including the vtable offset>
-          <VOffsetT: offset for a field> * N, where N is the number of fields
-                     in the schema for this type. Includes deprecated fields.
-        Thus, a vtable is made of 2 + N elements, each VOffsetT bytes wide.
+    return self.Bytes[self.Head() :]
 
-        An object has the following format:
-          <SOffsetT: offset to this object's vtable (may be negative)>
-          <byte: data>+
-        """
+  ## @cond FLATBUFFERS_INTERNAL
+  def StartObject(self, numfields):
+    """StartObject initializes bookkeeping for writing a new object."""
 
-        # Prepend a zero scalar to the object. Later in this function we'll
-        # write an offset here that points to the object's vtable:
-        self.PrependSOffsetTRelative(0)
+    self.assertNotNested()
 
-        objectOffset = self.Offset()
+    # use 32-bit offsets so that arithmetic doesn't overflow.
+    self.current_vtable = [0 for _ in range_func(numfields)]
+    self.objectEnd = self.Offset()
+    self.nested = True
 
-        vtKey = []
-        trim = True
-        for elem in reversed(self.current_vtable):
-            if elem == 0:
-                if trim:
-                    continue
-            else:
-                elem = objectOffset - elem
-                trim = False
+  def WriteVtable(self):
+    """WriteVtable serializes the vtable for the current object, if needed.
 
-            vtKey.append(elem)
+    Before writing out the vtable, this checks pre-existing vtables for
+    equality to this one. If an equal vtable is found, point the object to
+    the existing vtable and return.
 
-        vtKey = tuple(vtKey)
-        vt2Offset = self.vtables.get(vtKey)
-        if vt2Offset is None:
-            # Did not find a vtable, so write this one to the buffer.
+    Because vtable values are sensitive to alignment of object data, not
+    all logically-equal vtables will be deduplicated.
 
-            # Write out the current vtable in reverse , because
-            # serialization occurs in last-first order:
-            i = len(self.current_vtable) - 1
-            trailing = 0
-            trim = True
-            while i >= 0:
-                off = 0
-                elem = self.current_vtable[i]
-                i -= 1
+    A vtable has the following format:
+      <VOffsetT: size of the vtable in bytes, including this value>
+      <VOffsetT: size of the object in bytes, including the vtable offset>
+      <VOffsetT: offset for a field> * N, where N is the number of fields
+                 in the schema for this type. Includes deprecated fields.
+    Thus, a vtable is made of 2 + N elements, each VOffsetT bytes wide.
 
-                if elem == 0:
-                    if trim:
-                        trailing += 1
-                        continue
-                else:
-                    # Forward reference to field;
-                    # use 32bit number to ensure no overflow:
-                    off = objectOffset - elem
-                    trim = False
+    An object has the following format:
+      <SOffsetT: offset to this object's vtable (may be negative)>
+      <byte: data>+
+    """
 
-                self.PrependVOffsetT(off)
+    # Prepend a zero scalar to the object. Later in this function we'll
+    # write an offset here that points to the object's vtable:
+    self.PrependSOffsetTRelative(0)
 
-            # The two metadata fields are written last.
+    objectOffset = self.Offset()
 
-            # First, store the object bytesize:
-            objectSize = UOffsetTFlags.py_type(objectOffset - self.objectEnd)
-            self.PrependVOffsetT(VOffsetTFlags.py_type(objectSize))
+    vtKey = []
+    trim = True
+    for elem in reversed(self.current_vtable):
+      if elem == 0:
+        if trim:
+          continue
+      else:
+        elem = objectOffset - elem
+        trim = False
 
-            # Second, store the vtable bytesize:
-            vBytes = len(self.current_vtable) - trailing + VtableMetadataFields
-            vBytes *= N.VOffsetTFlags.bytewidth
-            self.PrependVOffsetT(VOffsetTFlags.py_type(vBytes))
+      vtKey.append(elem)
 
-            # Next, write the offset to the new vtable in the
-            # already-allocated SOffsetT at the beginning of this object:
-            objectStart = SOffsetTFlags.py_type(len(self.Bytes) - objectOffset)
-            encode.Write(packer.soffset, self.Bytes, objectStart,
-                         SOffsetTFlags.py_type(self.Offset() - objectOffset))
+    vtKey = tuple(vtKey)
+    vt2Offset = self.vtables.get(vtKey)
+    if vt2Offset is None:
+      # Did not find a vtable, so write this one to the buffer.
 
-            # Finally, store this vtable in memory for future
-            # deduplication:
-            self.vtables[vtKey] = self.Offset()
+      # Write out the current vtable in reverse , because
+      # serialization occurs in last-first order:
+      i = len(self.current_vtable) - 1
+      trailing = 0
+      trim = True
+      while i >= 0:
+        off = 0
+        elem = self.current_vtable[i]
+        i -= 1
+
+        if elem == 0:
+          if trim:
+            trailing += 1
+            continue
         else:
-            # Found a duplicate vtable.
-            objectStart = SOffsetTFlags.py_type(len(self.Bytes) - objectOffset)
-            self.head = UOffsetTFlags.py_type(objectStart)
+          # Forward reference to field;
+          # use 32bit number to ensure no overflow:
+          off = objectOffset - elem
+          trim = False
 
-            # Write the offset to the found vtable in the
-            # already-allocated SOffsetT at the beginning of this object:
-            encode.Write(packer.soffset, self.Bytes, self.Head(),
-                         SOffsetTFlags.py_type(vt2Offset - objectOffset))
+        self.PrependVOffsetT(off)
 
-        self.current_vtable = None
-        return objectOffset
+      # The two metadata fields are written last.
 
-    def EndObject(self):
-        """EndObject writes data necessary to finish object construction."""
-        self.assertNested()
-        self.nested = False
-        return self.WriteVtable()
+      # First, store the object bytesize:
+      objectSize = UOffsetTFlags.py_type(objectOffset - self.objectEnd)
+      self.PrependVOffsetT(VOffsetTFlags.py_type(objectSize))
 
-    def growByteBuffer(self):
-        """Doubles the size of the byteslice, and copies the old data towards
-           the end of the new buffer (since we build the buffer backwards)."""
-        if len(self.Bytes) == Builder.MAX_BUFFER_SIZE:
-            msg = "flatbuffers: cannot grow buffer beyond 2 gigabytes"
-            raise BuilderSizeError(msg)
+      # Second, store the vtable bytesize:
+      vBytes = len(self.current_vtable) - trailing + VtableMetadataFields
+      vBytes *= N.VOffsetTFlags.bytewidth
+      self.PrependVOffsetT(VOffsetTFlags.py_type(vBytes))
 
-        newSize = min(len(self.Bytes) * 2, Builder.MAX_BUFFER_SIZE)
-        if newSize == 0:
-            newSize = 1
-        bytes2 = bytearray(newSize)
-        bytes2[newSize-len(self.Bytes):] = self.Bytes
-        self.Bytes = bytes2
-    ## @endcond
+      # Next, write the offset to the new vtable in the
+      # already-allocated SOffsetT at the beginning of this object:
+      objectStart = SOffsetTFlags.py_type(len(self.Bytes) - objectOffset)
+      encode.Write(
+          packer.soffset,
+          self.Bytes,
+          objectStart,
+          SOffsetTFlags.py_type(self.Offset() - objectOffset),
+      )
 
-    def Head(self):
-        """Get the start of useful data in the underlying byte buffer.
+      # Finally, store this vtable in memory for future
+      # deduplication:
+      self.vtables[vtKey] = self.Offset()
+    else:
+      # Found a duplicate vtable.
+      objectStart = SOffsetTFlags.py_type(len(self.Bytes) - objectOffset)
+      self.head = UOffsetTFlags.py_type(objectStart)
 
-        Note: unlike other functions, this value is interpreted as from the
-        left.
-        """
-        ## @cond FLATBUFFERS_INTERNAL
-        return self.head
-        ## @endcond
+      # Write the offset to the found vtable in the
+      # already-allocated SOffsetT at the beginning of this object:
+      encode.Write(
+          packer.soffset,
+          self.Bytes,
+          self.Head(),
+          SOffsetTFlags.py_type(vt2Offset - objectOffset),
+      )
 
+    self.current_vtable = None
+    return objectOffset
+
+  def EndObject(self):
+    """EndObject writes data necessary to finish object construction."""
+    self.assertNested()
+    self.nested = False
+    return self.WriteVtable()
+
+  def growByteBuffer(self):
+    """Doubles the size of the byteslice, and copies the old data towards
+
+    the end of the new buffer (since we build the buffer backwards).
+    """
+    if len(self.Bytes) == Builder.MAX_BUFFER_SIZE:
+      msg = "flatbuffers: cannot grow buffer beyond 2 gigabytes"
+      raise BuilderSizeError(msg)
+
+    newSize = min(len(self.Bytes) * 2, Builder.MAX_BUFFER_SIZE)
+    if newSize == 0:
+      newSize = 1
+    bytes2 = bytearray(newSize)
+    bytes2[newSize - len(self.Bytes) :] = self.Bytes
+    self.Bytes = bytes2
+
+  ## @endcond
+
+  def Head(self):
+    """Get the start of useful data in the underlying byte buffer.
+
+    Note: unlike other functions, this value is interpreted as from the
+    left.
+    """
     ## @cond FLATBUFFERS_INTERNAL
-    def Offset(self):
-        """Offset relative to the end of the buffer."""
-        return UOffsetTFlags.py_type(len(self.Bytes) - self.Head())
-
-    def Pad(self, n):
-        """Pad places zeros at the current offset."""
-        for i in range_func(n):
-            self.Place(0, N.Uint8Flags)
-
-    def Prep(self, size, additionalBytes):
-        """
-        Prep prepares to write an element of `size` after `additional_bytes`
-        have been written, e.g. if you write a string, you need to align
-        such the int length field is aligned to SizeInt32, and the string
-        data follows it directly.
-        If all you need to do is align, `additionalBytes` will be 0.
-        """
-
-        # Track the biggest thing we've ever aligned to.
-        if size > self.minalign:
-            self.minalign = size
-
-        # Find the amount of alignment needed such that `size` is properly
-        # aligned after `additionalBytes`:
-        alignSize = (~(len(self.Bytes) - self.Head() + additionalBytes)) + 1
-        alignSize &= (size - 1)
-
-        # Reallocate the buffer if needed:
-        while self.Head() < alignSize+size+additionalBytes:
-            oldBufSize = len(self.Bytes)
-            self.growByteBuffer()
-            updated_head = self.head + len(self.Bytes) - oldBufSize
-            self.head = UOffsetTFlags.py_type(updated_head)
-        self.Pad(alignSize)
-
-    def PrependSOffsetTRelative(self, off):
-        """
-        PrependSOffsetTRelative prepends an SOffsetT, relative to where it
-        will be written.
-        """
-
-        # Ensure alignment is already done:
-        self.Prep(N.SOffsetTFlags.bytewidth, 0)
-        if not (off <= self.Offset()):
-            msg = "flatbuffers: Offset arithmetic error."
-            raise OffsetArithmeticError(msg)
-        off2 = self.Offset() - off + N.SOffsetTFlags.bytewidth
-        self.PlaceSOffsetT(off2)
+    return self.head
     ## @endcond
 
-    def PrependUOffsetTRelative(self, off):
-        """Prepends an unsigned offset into vector data, relative to where it
-        will be written.
-        """
+  ## @cond FLATBUFFERS_INTERNAL
+  def Offset(self):
+    """Offset relative to the end of the buffer."""
+    return UOffsetTFlags.py_type(len(self.Bytes) - self.Head())
 
-        # Ensure alignment is already done:
-        self.Prep(N.UOffsetTFlags.bytewidth, 0)
-        if not (off <= self.Offset()):
-            msg = "flatbuffers: Offset arithmetic error."
-            raise OffsetArithmeticError(msg)
-        off2 = self.Offset() - off + N.UOffsetTFlags.bytewidth
-        self.PlaceUOffsetT(off2)
+  def Pad(self, n):
+    """Pad places zeros at the current offset."""
+    for i in range_func(n):
+      self.Place(0, N.Uint8Flags)
 
+  def Prep(self, size, additionalBytes):
+    """Prep prepares to write an element of `size` after `additional_bytes`
+
+    have been written, e.g. if you write a string, you need to align
+    such the int length field is aligned to SizeInt32, and the string
+    data follows it directly.
+    If all you need to do is align, `additionalBytes` will be 0.
+    """
+
+    # Track the biggest thing we've ever aligned to.
+    if size > self.minalign:
+      self.minalign = size
+
+    # Find the amount of alignment needed such that `size` is properly
+    # aligned after `additionalBytes`:
+    alignSize = (~(len(self.Bytes) - self.Head() + additionalBytes)) + 1
+    alignSize &= size - 1
+
+    # Reallocate the buffer if needed:
+    while self.Head() < alignSize + size + additionalBytes:
+      oldBufSize = len(self.Bytes)
+      self.growByteBuffer()
+      updated_head = self.head + len(self.Bytes) - oldBufSize
+      self.head = UOffsetTFlags.py_type(updated_head)
+    self.Pad(alignSize)
+
+  def PrependSOffsetTRelative(self, off):
+    """PrependSOffsetTRelative prepends an SOffsetT, relative to where it
+
+    will be written.
+    """
+
+    # Ensure alignment is already done:
+    self.Prep(N.SOffsetTFlags.bytewidth, 0)
+    if not (off <= self.Offset()):
+      msg = "flatbuffers: Offset arithmetic error."
+      raise OffsetArithmeticError(msg)
+    off2 = self.Offset() - off + N.SOffsetTFlags.bytewidth
+    self.PlaceSOffsetT(off2)
+
+  ## @endcond
+
+  def PrependUOffsetTRelative(self, off):
+    """Prepends an unsigned offset into vector data, relative to where it
+
+    will be written.
+    """
+
+    # Ensure alignment is already done:
+    self.Prep(N.UOffsetTFlags.bytewidth, 0)
+    if not (off <= self.Offset()):
+      msg = "flatbuffers: Offset arithmetic error."
+      raise OffsetArithmeticError(msg)
+    off2 = self.Offset() - off + N.UOffsetTFlags.bytewidth
+    self.PlaceUOffsetT(off2)
+
+  ## @cond FLATBUFFERS_INTERNAL
+  def StartVector(self, elemSize, numElems, alignment):
+    """StartVector initializes bookkeeping for writing a new vector.
+
+    A vector has the following format:
+      - <UOffsetT: number of elements in this vector>
+      - <T: data>+, where T is the type of elements of this vector.
+    """
+
+    self.assertNotNested()
+    self.nested = True
+    self.vectorNumElems = numElems
+    self.Prep(N.Uint32Flags.bytewidth, elemSize * numElems)
+    self.Prep(alignment, elemSize * numElems)  # In case alignment > int.
+    return self.Offset()
+
+  ## @endcond
+
+  def EndVector(self, numElems=None):
+    """EndVector writes data necessary to finish vector construction."""
+
+    self.assertNested()
     ## @cond FLATBUFFERS_INTERNAL
-    def StartVector(self, elemSize, numElems, alignment):
-        """
-        StartVector initializes bookkeeping for writing a new vector.
-
-        A vector has the following format:
-          - <UOffsetT: number of elements in this vector>
-          - <T: data>+, where T is the type of elements of this vector.
-        """
-
-        self.assertNotNested()
-        self.nested = True
-        self.vectorNumElems = numElems
-        self.Prep(N.Uint32Flags.bytewidth, elemSize*numElems)
-        self.Prep(alignment, elemSize*numElems)  # In case alignment > int.
-        return self.Offset()
+    self.nested = False
     ## @endcond
 
-    def EndVector(self, numElems = None):
-        """EndVector writes data necessary to finish vector construction."""
+    if numElems:
+      warnings.warn("numElems is deprecated.", DeprecationWarning, stacklevel=2)
+      if numElems != self.vectorNumElems:
+        raise EndVectorLengthMismatched()
 
-        self.assertNested()
-        ## @cond FLATBUFFERS_INTERNAL
-        self.nested = False
-        ## @endcond
-               
-        if numElems:
-            warnings.warn("numElems is deprecated.", 
-                          DeprecationWarning, stacklevel=2)
-            if numElems != self.vectorNumElems:
-                raise EndVectorLengthMismatched();
+    # we already made space for this, so write without PrependUint32
+    self.PlaceUOffsetT(self.vectorNumElems)
+    self.vectorNumElems = None
+    return self.Offset()
 
-        # we already made space for this, so write without PrependUint32
-        self.PlaceUOffsetT(self.vectorNumElems)
-        self.vectorNumElems = None
-        return self.Offset()
+  def CreateSharedString(self, s, encoding="utf-8", errors="strict"):
+    """CreateSharedString checks if the string is already written to the buffer
 
-    def CreateSharedString(self, s, encoding='utf-8', errors='strict'):
-        """
-        CreateSharedString checks if the string is already written to the buffer
-        before calling CreateString.
-        """
+    before calling CreateString.
+    """
 
-        if s in self.sharedStrings:
-            return self.sharedStrings[s]
+    if s in self.sharedStrings:
+      return self.sharedStrings[s]
 
-        off = self.CreateString(s, encoding, errors)
-        self.sharedStrings[s] = off
+    off = self.CreateString(s, encoding, errors)
+    self.sharedStrings[s] = off
 
-        return off
+    return off
 
-    def CreateString(self, s, encoding='utf-8', errors='strict'):
-        """CreateString writes a null-terminated byte string as a vector."""
+  def CreateString(self, s, encoding="utf-8", errors="strict"):
+    """CreateString writes a null-terminated byte string as a vector."""
 
-        self.assertNotNested()
-        ## @cond FLATBUFFERS_INTERNAL
-        self.nested = True
-        ## @endcond
-
-        if isinstance(s, compat.string_types):
-            x = s.encode(encoding, errors)
-        elif isinstance(s, compat.binary_types):
-            x = s
-        else:
-            raise TypeError("non-string passed to CreateString")
-
-        self.Prep(N.UOffsetTFlags.bytewidth, (len(x)+1)*N.Uint8Flags.bytewidth)
-        self.Place(0, N.Uint8Flags)
-
-        l = UOffsetTFlags.py_type(len(s))
-        ## @cond FLATBUFFERS_INTERNAL
-        self.head = UOffsetTFlags.py_type(self.Head() - l)
-        ## @endcond
-        self.Bytes[self.Head():self.Head()+l] = x
-
-        self.vectorNumElems = len(x)
-        return self.EndVector()
-
-    def CreateByteVector(self, x):
-        """CreateString writes a byte vector."""
-
-        self.assertNotNested()
-        ## @cond FLATBUFFERS_INTERNAL
-        self.nested = True
-        ## @endcond
-
-        if not isinstance(x, compat.binary_types):
-            raise TypeError("non-byte vector passed to CreateByteVector")
-
-        self.Prep(N.UOffsetTFlags.bytewidth, len(x)*N.Uint8Flags.bytewidth)
-
-        l = UOffsetTFlags.py_type(len(x))
-        ## @cond FLATBUFFERS_INTERNAL
-        self.head = UOffsetTFlags.py_type(self.Head() - l)
-        ## @endcond
-        self.Bytes[self.Head():self.Head()+l] = x
-
-        self.vectorNumElems = len(x)
-        return self.EndVector()
-
-    def CreateNumpyVector(self, x):
-        """CreateNumpyVector writes a numpy array into the buffer."""
-
-        if np is None:
-            # Numpy is required for this feature
-            raise NumpyRequiredForThisFeature("Numpy was not found.")
-
-        if not isinstance(x, np.ndarray):
-            raise TypeError("non-numpy-ndarray passed to CreateNumpyVector")
-
-        if x.dtype.kind not in ['b', 'i', 'u', 'f']:
-            raise TypeError("numpy-ndarray holds elements of unsupported datatype")
-
-        if x.ndim > 1:
-            raise TypeError("multidimensional-ndarray passed to CreateNumpyVector")
-
-        self.StartVector(x.itemsize, x.size, x.dtype.alignment)
-
-        # Ensure little endian byte ordering
-        if x.dtype.str[0] == "<":
-            x_lend = x
-        else:
-            x_lend = x.byteswap(inplace=False)
-
-        # Calculate total length
-        l = UOffsetTFlags.py_type(x_lend.itemsize * x_lend.size)
-        ## @cond FLATBUFFERS_INTERNAL
-        self.head = UOffsetTFlags.py_type(self.Head() - l)
-        ## @endcond
-
-        # tobytes ensures c_contiguous ordering
-        self.Bytes[self.Head():self.Head()+l] = x_lend.tobytes(order='C')
-
-        self.vectorNumElems = x.size
-        return self.EndVector()
-
+    self.assertNotNested()
     ## @cond FLATBUFFERS_INTERNAL
-    def assertNested(self):
-        """
-        Check that we are in the process of building an object.
-        """
-
-        if not self.nested:
-            raise IsNotNestedError()
-
-    def assertNotNested(self):
-        """
-        Check that no other objects are being built while making this
-        object. If not, raise an exception.
-        """
-
-        if self.nested:
-            raise IsNestedError()
-
-    def assertStructIsInline(self, obj):
-        """
-        Structs are always stored inline, so need to be created right
-        where they are used. You'll get this error if you created it
-        elsewhere.
-        """
-
-        N.enforce_number(obj, N.UOffsetTFlags)
-        if obj != self.Offset():
-            msg = ("flatbuffers: Tried to write a Struct at an Offset that "
-                   "is different from the current Offset of the Builder.")
-            raise StructIsNotInlineError(msg)
-
-    def Slot(self, slotnum):
-        """
-        Slot sets the vtable key `voffset` to the current location in the
-        buffer.
-
-        """
-        self.assertNested()
-        self.current_vtable[slotnum] = self.Offset()
+    self.nested = True
     ## @endcond
 
-    def __Finish(self, rootTable, sizePrefix, file_identifier=None):
-        """Finish finalizes a buffer, pointing to the given `rootTable`."""
-        N.enforce_number(rootTable, N.UOffsetTFlags)
+    if isinstance(s, compat.string_types):
+      x = s.encode(encoding, errors)
+    elif isinstance(s, compat.binary_types):
+      x = s
+    else:
+      raise TypeError("non-string passed to CreateString")
 
-        prepSize = N.UOffsetTFlags.bytewidth
-        if file_identifier is not None:
-            prepSize += N.Int32Flags.bytewidth
-        if sizePrefix:
-            prepSize += N.Int32Flags.bytewidth
-        self.Prep(self.minalign, prepSize)
+    self.Prep(N.UOffsetTFlags.bytewidth, (len(x) + 1) * N.Uint8Flags.bytewidth)
+    self.Place(0, N.Uint8Flags)
 
-        if file_identifier is not None:
-            self.Prep(N.UOffsetTFlags.bytewidth, encode.FILE_IDENTIFIER_LENGTH)
-
-            # Convert bytes object file_identifier to an array of 4 8-bit integers,
-            # and use big-endian to enforce size compliance.
-            # https://docs.python.org/2/library/struct.html#format-characters
-            file_identifier = N.struct.unpack(">BBBB", file_identifier)
-            for i in range(encode.FILE_IDENTIFIER_LENGTH-1, -1, -1):
-                # Place the bytes of the file_identifer in reverse order:
-                self.Place(file_identifier[i], N.Uint8Flags)
-
-        self.PrependUOffsetTRelative(rootTable)
-        if sizePrefix:
-            size = len(self.Bytes) - self.Head()
-            N.enforce_number(size, N.Int32Flags)
-            self.PrependInt32(size)
-        self.finished = True
-        return self.Head()
-
-    def Finish(self, rootTable, file_identifier=None):
-        """Finish finalizes a buffer, pointing to the given `rootTable`."""
-        return self.__Finish(rootTable, False, file_identifier=file_identifier)
-
-    def FinishSizePrefixed(self, rootTable, file_identifier=None):
-        """
-        Finish finalizes a buffer, pointing to the given `rootTable`,
-        with the size prefixed.
-        """
-        return self.__Finish(rootTable, True, file_identifier=file_identifier)
-
+    l = UOffsetTFlags.py_type(len(s))
     ## @cond FLATBUFFERS_INTERNAL
-    def Prepend(self, flags, off):
-        self.Prep(flags.bytewidth, 0)
-        self.Place(off, flags)
-
-    def PrependSlot(self, flags, o, x, d):
-        if x is not None:
-            N.enforce_number(x, flags)
-        if d is not None:
-            N.enforce_number(d, flags)
-        if x != d or (self.forceDefaults and d is not None):
-            self.Prepend(flags, x)
-            self.Slot(o)
-
-    def PrependBoolSlot(self, *args): self.PrependSlot(N.BoolFlags, *args)
-
-    def PrependByteSlot(self, *args): self.PrependSlot(N.Uint8Flags, *args)
-
-    def PrependUint8Slot(self, *args): self.PrependSlot(N.Uint8Flags, *args)
-
-    def PrependUint16Slot(self, *args): self.PrependSlot(N.Uint16Flags, *args)
-
-    def PrependUint32Slot(self, *args): self.PrependSlot(N.Uint32Flags, *args)
-
-    def PrependUint64Slot(self, *args): self.PrependSlot(N.Uint64Flags, *args)
-
-    def PrependInt8Slot(self, *args): self.PrependSlot(N.Int8Flags, *args)
-
-    def PrependInt16Slot(self, *args): self.PrependSlot(N.Int16Flags, *args)
-
-    def PrependInt32Slot(self, *args): self.PrependSlot(N.Int32Flags, *args)
-
-    def PrependInt64Slot(self, *args): self.PrependSlot(N.Int64Flags, *args)
-
-    def PrependFloat32Slot(self, *args): self.PrependSlot(N.Float32Flags,
-                                                          *args)
-
-    def PrependFloat64Slot(self, *args): self.PrependSlot(N.Float64Flags,
-                                                          *args)
-
-    def PrependUOffsetTRelativeSlot(self, o, x, d):
-        """
-        PrependUOffsetTRelativeSlot prepends an UOffsetT onto the object at
-        vtable slot `o`. If value `x` equals default `d`, then the slot will
-        be set to zero and no other data will be written.
-        """
-
-        if x != d or self.forceDefaults:
-            self.PrependUOffsetTRelative(x)
-            self.Slot(o)
-
-    def PrependStructSlot(self, v, x, d):
-        """
-        PrependStructSlot prepends a struct onto the object at vtable slot `o`.
-        Structs are stored inline, so nothing additional is being added.
-        In generated code, `d` is always 0.
-        """
-
-        N.enforce_number(d, N.UOffsetTFlags)
-        if x != d:
-            self.assertStructIsInline(x)
-            self.Slot(v)
-
+    self.head = UOffsetTFlags.py_type(self.Head() - l)
     ## @endcond
+    self.Bytes[self.Head() : self.Head() + l] = x
 
-    def PrependBool(self, x):
-        """Prepend a `bool` to the Builder buffer.
+    self.vectorNumElems = len(x)
+    return self.EndVector()
 
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.BoolFlags, x)
+  def CreateByteVector(self, x):
+    """CreateString writes a byte vector."""
 
-    def PrependByte(self, x):
-        """Prepend a `byte` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Uint8Flags, x)
-
-    def PrependUint8(self, x):
-        """Prepend an `uint8` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Uint8Flags, x)
-
-    def PrependUint16(self, x):
-        """Prepend an `uint16` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Uint16Flags, x)
-
-    def PrependUint32(self, x):
-        """Prepend an `uint32` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Uint32Flags, x)
-
-    def PrependUint64(self, x):
-        """Prepend an `uint64` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Uint64Flags, x)
-
-    def PrependInt8(self, x):
-        """Prepend an `int8` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Int8Flags, x)
-
-    def PrependInt16(self, x):
-        """Prepend an `int16` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Int16Flags, x)
-
-    def PrependInt32(self, x):
-        """Prepend an `int32` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Int32Flags, x)
-
-    def PrependInt64(self, x):
-        """Prepend an `int64` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Int64Flags, x)
-
-    def PrependFloat32(self, x):
-        """Prepend a `float32` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Float32Flags, x)
-
-    def PrependFloat64(self, x):
-        """Prepend a `float64` to the Builder buffer.
-
-        Note: aligns and checks for space.
-        """
-        self.Prepend(N.Float64Flags, x)
-
-    def ForceDefaults(self, forceDefaults):
-        """
-        In order to save space, fields that are set to their default value
-        don't get serialized into the buffer. Forcing defaults provides a
-        way to manually disable this optimization. When set to `True`, will
-        always serialize default values.
-        """
-        self.forceDefaults = forceDefaults
-
-##############################################################
-
+    self.assertNotNested()
     ## @cond FLATBUFFERS_INTERNAL
-    def PrependVOffsetT(self, x): self.Prepend(N.VOffsetTFlags, x)
-
-    def Place(self, x, flags):
-        """
-        Place prepends a value specified by `flags` to the Builder,
-        without checking for available space.
-        """
-
-        N.enforce_number(x, flags)
-        self.head = self.head - flags.bytewidth
-        encode.Write(flags.packer_type, self.Bytes, self.Head(), x)
-
-    def PlaceVOffsetT(self, x):
-        """PlaceVOffsetT prepends a VOffsetT to the Builder, without checking
-        for space.
-        """
-        N.enforce_number(x, N.VOffsetTFlags)
-        self.head = self.head - N.VOffsetTFlags.bytewidth
-        encode.Write(packer.voffset, self.Bytes, self.Head(), x)
-
-    def PlaceSOffsetT(self, x):
-        """PlaceSOffsetT prepends a SOffsetT to the Builder, without checking
-        for space.
-        """
-        N.enforce_number(x, N.SOffsetTFlags)
-        self.head = self.head - N.SOffsetTFlags.bytewidth
-        encode.Write(packer.soffset, self.Bytes, self.Head(), x)
-
-    def PlaceUOffsetT(self, x):
-        """PlaceUOffsetT prepends a UOffsetT to the Builder, without checking
-        for space.
-        """
-        N.enforce_number(x, N.UOffsetTFlags)
-        self.head = self.head - N.UOffsetTFlags.bytewidth
-        encode.Write(packer.uoffset, self.Bytes, self.Head(), x)
+    self.nested = True
     ## @endcond
 
+    if not isinstance(x, compat.binary_types):
+      raise TypeError("non-byte vector passed to CreateByteVector")
+
+    self.Prep(N.UOffsetTFlags.bytewidth, len(x) * N.Uint8Flags.bytewidth)
+
+    l = UOffsetTFlags.py_type(len(x))
+    ## @cond FLATBUFFERS_INTERNAL
+    self.head = UOffsetTFlags.py_type(self.Head() - l)
+    ## @endcond
+    self.Bytes[self.Head() : self.Head() + l] = x
+
+    self.vectorNumElems = len(x)
+    return self.EndVector()
+
+  def CreateNumpyVector(self, x):
+    """CreateNumpyVector writes a numpy array into the buffer."""
+
+    if np is None:
+      # Numpy is required for this feature
+      raise NumpyRequiredForThisFeature("Numpy was not found.")
+
+    if not isinstance(x, np.ndarray):
+      raise TypeError("non-numpy-ndarray passed to CreateNumpyVector")
+
+    if x.dtype.kind not in ["b", "i", "u", "f"]:
+      raise TypeError("numpy-ndarray holds elements of unsupported datatype")
+
+    if x.ndim > 1:
+      raise TypeError("multidimensional-ndarray passed to CreateNumpyVector")
+
+    self.StartVector(x.itemsize, x.size, x.dtype.alignment)
+
+    # Ensure little endian byte ordering
+    if x.dtype.str[0] == "<":
+      x_lend = x
+    else:
+      x_lend = x.byteswap(inplace=False)
+
+    # Calculate total length
+    l = UOffsetTFlags.py_type(x_lend.itemsize * x_lend.size)
+    ## @cond FLATBUFFERS_INTERNAL
+    self.head = UOffsetTFlags.py_type(self.Head() - l)
+    ## @endcond
+
+    # tobytes ensures c_contiguous ordering
+    self.Bytes[self.Head() : self.Head() + l] = x_lend.tobytes(order="C")
+
+    self.vectorNumElems = x.size
+    return self.EndVector()
+
+  ## @cond FLATBUFFERS_INTERNAL
+  def assertNested(self):
+    """Check that we are in the process of building an object."""
+
+    if not self.nested:
+      raise IsNotNestedError()
+
+  def assertNotNested(self):
+    """Check that no other objects are being built while making this object.
+
+    If not, raise an exception.
+    """
+
+    if self.nested:
+      raise IsNestedError()
+
+  def assertStructIsInline(self, obj):
+    """Structs are always stored inline, so need to be created right
+
+    where they are used. You'll get this error if you created it
+    elsewhere.
+    """
+
+    N.enforce_number(obj, N.UOffsetTFlags)
+    if obj != self.Offset():
+      msg = (
+          "flatbuffers: Tried to write a Struct at an Offset that "
+          "is different from the current Offset of the Builder."
+      )
+      raise StructIsNotInlineError(msg)
+
+  def Slot(self, slotnum):
+    """Slot sets the vtable key `voffset` to the current location in the
+
+    buffer.
+    """
+    self.assertNested()
+    self.current_vtable[slotnum] = self.Offset()
+
+  ## @endcond
+
+  def __Finish(self, rootTable, sizePrefix, file_identifier=None):
+    """Finish finalizes a buffer, pointing to the given `rootTable`."""
+    N.enforce_number(rootTable, N.UOffsetTFlags)
+
+    prepSize = N.UOffsetTFlags.bytewidth
+    if file_identifier is not None:
+      prepSize += N.Int32Flags.bytewidth
+    if sizePrefix:
+      prepSize += N.Int32Flags.bytewidth
+    self.Prep(self.minalign, prepSize)
+
+    if file_identifier is not None:
+      self.Prep(N.UOffsetTFlags.bytewidth, encode.FILE_IDENTIFIER_LENGTH)
+
+      # Convert bytes object file_identifier to an array of 4 8-bit integers,
+      # and use big-endian to enforce size compliance.
+      # https://docs.python.org/2/library/struct.html#format-characters
+      file_identifier = N.struct.unpack(">BBBB", file_identifier)
+      for i in range(encode.FILE_IDENTIFIER_LENGTH - 1, -1, -1):
+        # Place the bytes of the file_identifer in reverse order:
+        self.Place(file_identifier[i], N.Uint8Flags)
+
+    self.PrependUOffsetTRelative(rootTable)
+    if sizePrefix:
+      size = len(self.Bytes) - self.Head()
+      N.enforce_number(size, N.Int32Flags)
+      self.PrependInt32(size)
+    self.finished = True
+    return self.Head()
+
+  def Finish(self, rootTable, file_identifier=None):
+    """Finish finalizes a buffer, pointing to the given `rootTable`."""
+    return self.__Finish(rootTable, False, file_identifier=file_identifier)
+
+  def FinishSizePrefixed(self, rootTable, file_identifier=None):
+    """Finish finalizes a buffer, pointing to the given `rootTable`,
+
+    with the size prefixed.
+    """
+    return self.__Finish(rootTable, True, file_identifier=file_identifier)
+
+  ## @cond FLATBUFFERS_INTERNAL
+  def Prepend(self, flags, off):
+    self.Prep(flags.bytewidth, 0)
+    self.Place(off, flags)
+
+  def PrependSlot(self, flags, o, x, d):
+    if x is not None:
+      N.enforce_number(x, flags)
+    if d is not None:
+      N.enforce_number(d, flags)
+    if x != d or (self.forceDefaults and d is not None):
+      self.Prepend(flags, x)
+      self.Slot(o)
+
+  def PrependBoolSlot(self, *args):
+    self.PrependSlot(N.BoolFlags, *args)
+
+  def PrependByteSlot(self, *args):
+    self.PrependSlot(N.Uint8Flags, *args)
+
+  def PrependUint8Slot(self, *args):
+    self.PrependSlot(N.Uint8Flags, *args)
+
+  def PrependUint16Slot(self, *args):
+    self.PrependSlot(N.Uint16Flags, *args)
+
+  def PrependUint32Slot(self, *args):
+    self.PrependSlot(N.Uint32Flags, *args)
+
+  def PrependUint64Slot(self, *args):
+    self.PrependSlot(N.Uint64Flags, *args)
+
+  def PrependInt8Slot(self, *args):
+    self.PrependSlot(N.Int8Flags, *args)
+
+  def PrependInt16Slot(self, *args):
+    self.PrependSlot(N.Int16Flags, *args)
+
+  def PrependInt32Slot(self, *args):
+    self.PrependSlot(N.Int32Flags, *args)
+
+  def PrependInt64Slot(self, *args):
+    self.PrependSlot(N.Int64Flags, *args)
+
+  def PrependFloat32Slot(self, *args):
+    self.PrependSlot(N.Float32Flags, *args)
+
+  def PrependFloat64Slot(self, *args):
+    self.PrependSlot(N.Float64Flags, *args)
+
+  def PrependUOffsetTRelativeSlot(self, o, x, d):
+    """PrependUOffsetTRelativeSlot prepends an UOffsetT onto the object at
+
+    vtable slot `o`. If value `x` equals default `d`, then the slot will
+    be set to zero and no other data will be written.
+    """
+
+    if x != d or self.forceDefaults:
+      self.PrependUOffsetTRelative(x)
+      self.Slot(o)
+
+  def PrependStructSlot(self, v, x, d):
+    """PrependStructSlot prepends a struct onto the object at vtable slot `o`.
+
+    Structs are stored inline, so nothing additional is being added. In
+    generated code, `d` is always 0.
+    """
+
+    N.enforce_number(d, N.UOffsetTFlags)
+    if x != d:
+      self.assertStructIsInline(x)
+      self.Slot(v)
+
+  ## @endcond
+
+  def PrependBool(self, x):
+    """Prepend a `bool` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.BoolFlags, x)
+
+  def PrependByte(self, x):
+    """Prepend a `byte` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Uint8Flags, x)
+
+  def PrependUint8(self, x):
+    """Prepend an `uint8` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Uint8Flags, x)
+
+  def PrependUint16(self, x):
+    """Prepend an `uint16` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Uint16Flags, x)
+
+  def PrependUint32(self, x):
+    """Prepend an `uint32` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Uint32Flags, x)
+
+  def PrependUint64(self, x):
+    """Prepend an `uint64` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Uint64Flags, x)
+
+  def PrependInt8(self, x):
+    """Prepend an `int8` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Int8Flags, x)
+
+  def PrependInt16(self, x):
+    """Prepend an `int16` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Int16Flags, x)
+
+  def PrependInt32(self, x):
+    """Prepend an `int32` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Int32Flags, x)
+
+  def PrependInt64(self, x):
+    """Prepend an `int64` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Int64Flags, x)
+
+  def PrependFloat32(self, x):
+    """Prepend a `float32` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Float32Flags, x)
+
+  def PrependFloat64(self, x):
+    """Prepend a `float64` to the Builder buffer.
+
+    Note: aligns and checks for space.
+    """
+    self.Prepend(N.Float64Flags, x)
+
+  def ForceDefaults(self, forceDefaults):
+    """In order to save space, fields that are set to their default value
+
+    don't get serialized into the buffer. Forcing defaults provides a
+    way to manually disable this optimization. When set to `True`, will
+    always serialize default values.
+    """
+    self.forceDefaults = forceDefaults
+
+  ##############################################################
+
+  ## @cond FLATBUFFERS_INTERNAL
+  def PrependVOffsetT(self, x):
+    self.Prepend(N.VOffsetTFlags, x)
+
+  def Place(self, x, flags):
+    """Place prepends a value specified by `flags` to the Builder,
+
+    without checking for available space.
+    """
+
+    N.enforce_number(x, flags)
+    self.head = self.head - flags.bytewidth
+    encode.Write(flags.packer_type, self.Bytes, self.Head(), x)
+
+  def PlaceVOffsetT(self, x):
+    """PlaceVOffsetT prepends a VOffsetT to the Builder, without checking
+
+    for space.
+    """
+    N.enforce_number(x, N.VOffsetTFlags)
+    self.head = self.head - N.VOffsetTFlags.bytewidth
+    encode.Write(packer.voffset, self.Bytes, self.Head(), x)
+
+  def PlaceSOffsetT(self, x):
+    """PlaceSOffsetT prepends a SOffsetT to the Builder, without checking
+
+    for space.
+    """
+    N.enforce_number(x, N.SOffsetTFlags)
+    self.head = self.head - N.SOffsetTFlags.bytewidth
+    encode.Write(packer.soffset, self.Bytes, self.Head(), x)
+
+  def PlaceUOffsetT(self, x):
+    """PlaceUOffsetT prepends a UOffsetT to the Builder, without checking
+
+    for space.
+    """
+    N.enforce_number(x, N.UOffsetTFlags)
+    self.head = self.head - N.UOffsetTFlags.bytewidth
+    encode.Write(packer.uoffset, self.Bytes, self.Head(), x)
+
+  ## @endcond
+
+
 ## @cond FLATBUFFERS_INTERNAL
 def vtableEqual(a, objectStart, b):
-    """vtableEqual compares an unwritten vtable to a written vtable."""
+  """vtableEqual compares an unwritten vtable to a written vtable."""
 
-    N.enforce_number(objectStart, N.UOffsetTFlags)
+  N.enforce_number(objectStart, N.UOffsetTFlags)
 
-    if len(a) * N.VOffsetTFlags.bytewidth != len(b):
+  if len(a) * N.VOffsetTFlags.bytewidth != len(b):
+    return False
+
+  for i, elem in enumerate(a):
+    x = encode.Get(packer.voffset, b, i * N.VOffsetTFlags.bytewidth)
+
+    # Skip vtable entries that indicate a default value.
+    if x == 0 and elem == 0:
+      pass
+    else:
+      y = objectStart - elem
+      if x != y:
         return False
+  return True
 
-    for i, elem in enumerate(a):
-        x = encode.Get(packer.voffset, b, i * N.VOffsetTFlags.bytewidth)
 
-        # Skip vtable entries that indicate a default value.
-        if x == 0 and elem == 0:
-            pass
-        else:
-            y = objectStart - elem
-            if x != y:
-                return False
-    return True
 ## @endcond
 ## @}
diff --git a/python/flatbuffers/compat.py b/python/flatbuffers/compat.py
index 0244c97..5668ad7 100644
--- a/python/flatbuffers/compat.py
+++ b/python/flatbuffers/compat.py
@@ -12,8 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-""" A tiny version of `six` to help with backwards compability. Also includes
- compatibility helpers for numpy. """
+"""A tiny version of `six` to help with backwards compability.
+
+Also includes compatibility helpers for numpy.
+"""
 
 import sys
 
@@ -25,62 +27,65 @@
 PY34 = sys.version_info[0:2] >= (3, 4)
 
 if PY3:
-    import importlib.machinery
-    string_types = (str,)
-    binary_types = (bytes,bytearray)
-    range_func = range
+  import importlib.machinery
+
+  string_types = (str,)
+  binary_types = (bytes, bytearray)
+  range_func = range
+  memoryview_type = memoryview
+  struct_bool_decl = "?"
+else:
+  import imp
+
+  string_types = (unicode,)
+  if PY26 or PY27:
+    binary_types = (str, bytearray)
+  else:
+    binary_types = (str,)
+  range_func = xrange
+  if PY26 or (PY27 and not PY275):
+    memoryview_type = buffer
+    struct_bool_decl = "<b"
+  else:
     memoryview_type = memoryview
     struct_bool_decl = "?"
-else:
-    import imp
-    string_types = (unicode,)
-    if PY26 or PY27:
-        binary_types = (str,bytearray)
-    else:
-        binary_types = (str,)
-    range_func = xrange
-    if PY26 or (PY27 and not PY275):
-        memoryview_type = buffer
-        struct_bool_decl = "<b"
-    else:
-        memoryview_type = memoryview
-        struct_bool_decl = "?"
 
 # Helper functions to facilitate making numpy optional instead of required
 
+
 def import_numpy():
-    """
-    Returns the numpy module if it exists on the system,
-    otherwise returns None.
-    """
-    if PY3:
-        numpy_exists = (
-            importlib.machinery.PathFinder.find_spec('numpy') is not None)
-    else:
-        try:
-            imp.find_module('numpy')
-            numpy_exists = True
-        except ImportError:
-            numpy_exists = False
+  """Returns the numpy module if it exists on the system,
 
-    if numpy_exists:
-        # We do this outside of try/except block in case numpy exists
-        # but is not installed correctly. We do not want to catch an
-        # incorrect installation which would manifest as an
-        # ImportError.
-        import numpy as np
-    else:
-        np = None
+  otherwise returns None.
+  """
+  if PY3:
+    numpy_exists = importlib.machinery.PathFinder.find_spec("numpy") is not None
+  else:
+    try:
+      imp.find_module("numpy")
+      numpy_exists = True
+    except ImportError:
+      numpy_exists = False
 
-    return np
+  if numpy_exists:
+    # We do this outside of try/except block in case numpy exists
+    # but is not installed correctly. We do not want to catch an
+    # incorrect installation which would manifest as an
+    # ImportError.
+    import numpy as np
+  else:
+    np = None
+
+  return np
 
 
 class NumpyRequiredForThisFeature(RuntimeError):
-    """
-    Error raised when user tries to use a feature that
-    requires numpy without having numpy installed.
-    """
-    pass
+  """Error raised when user tries to use a feature that
+
+  requires numpy without having numpy installed.
+  """
+
+  pass
 
 
 # NOTE: Future Jython support may require code here (look at `six`).
diff --git a/python/flatbuffers/encode.py b/python/flatbuffers/encode.py
index c4f1a59..91771c4 100644
--- a/python/flatbuffers/encode.py
+++ b/python/flatbuffers/encode.py
@@ -15,28 +15,31 @@
 from . import number_types as N
 from . import packer
 from .compat import memoryview_type
-from .compat import import_numpy, NumpyRequiredForThisFeature
+from .compat import NumpyRequiredForThisFeature, import_numpy
 
 np = import_numpy()
 
-FILE_IDENTIFIER_LENGTH=4
+FILE_IDENTIFIER_LENGTH = 4
+
 
 def Get(packer_type, buf, head):
-    """ Get decodes a value at buf[head] using `packer_type`. """
-    return packer_type.unpack_from(memoryview_type(buf), head)[0]
+  """Get decodes a value at buf[head] using `packer_type`."""
+  return packer_type.unpack_from(memoryview_type(buf), head)[0]
 
 
 def GetVectorAsNumpy(numpy_type, buf, count, offset):
-    """ GetVecAsNumpy decodes values starting at buf[head] as
-    `numpy_type`, where `numpy_type` is a numpy dtype. """
-    if np is not None:
-        # TODO: could set .flags.writeable = False to make users jump through
-        #       hoops before modifying...
-        return np.frombuffer(buf, dtype=numpy_type, count=count, offset=offset)
-    else:
-        raise NumpyRequiredForThisFeature('Numpy was not found.')
+  """GetVecAsNumpy decodes values starting at buf[head] as
+
+  `numpy_type`, where `numpy_type` is a numpy dtype.
+  """
+  if np is not None:
+    # TODO: could set .flags.writeable = False to make users jump through
+    #       hoops before modifying...
+    return np.frombuffer(buf, dtype=numpy_type, count=count, offset=offset)
+  else:
+    raise NumpyRequiredForThisFeature('Numpy was not found.')
 
 
 def Write(packer_type, buf, head, n):
-    """ Write encodes `n` at buf[head] using `packer_type`. """
-    packer_type.pack_into(buf, head, n)
+  """Write encodes `n` at buf[head] using `packer_type`."""
+  packer_type.pack_into(buf, head, n)
diff --git a/python/flatbuffers/flexbuffers.py b/python/flatbuffers/flexbuffers.py
index 34d42a6..7d5d691 100644
--- a/python/flatbuffers/flexbuffers.py
+++ b/python/flatbuffers/flexbuffers.py
@@ -36,6 +36,7 @@
   These are used in the lower 2 bits of a type field to determine the size of
   the elements (and or size field) of the item pointed to (e.g. vector).
   """
+
   W8 = 0  # 2^0 = 1 byte
   W16 = 1  # 2^1 = 2 bytes
   W32 = 2  # 2^2 = 4 bytes
@@ -81,12 +82,9 @@
 
   @staticmethod
   def B(byte_width):
-    return {
-        1: BitWidth.W8,
-        2: BitWidth.W16,
-        4: BitWidth.W32,
-        8: BitWidth.W64
-    }[byte_width]
+    return {1: BitWidth.W8, 2: BitWidth.W16, 4: BitWidth.W32, 8: BitWidth.W64}[
+        byte_width
+    ]
 
 
 I = {1: 'b', 2: 'h', 4: 'i', 8: 'q'}  # Integer formats
@@ -165,6 +163,7 @@
   These are used as the upper 6 bits of a type field to indicate the actual
   type.
   """
+
   NULL = 0
   INT = 1
   UINT = 2
@@ -214,8 +213,10 @@
 
   @staticmethod
   def IsTypedVector(type_):
-    return Type.VECTOR_INT <= type_ <= Type.VECTOR_STRING_DEPRECATED or \
-           type_ == Type.VECTOR_BOOL
+    return (
+        Type.VECTOR_INT <= type_ <= Type.VECTOR_STRING_DEPRECATED
+        or type_ == Type.VECTOR_BOOL
+    )
 
   @staticmethod
   def IsTypedVectorElementType(type_):
@@ -306,7 +307,7 @@
 
   def Find(self, sub):
     """Returns the lowest index where the sub subsequence is found."""
-    return self._buf[self._offset:].find(sub)
+    return self._buf[self._offset :].find(sub)
 
   def Slice(self, offset):
     """Returns new `Buf` which starts from the given offset."""
@@ -314,11 +315,12 @@
 
   def Indirect(self, offset, byte_width):
     """Return new `Buf` based on the encoded offset (indirect encoding)."""
-    return self.Slice(offset - _Unpack(U, self[offset:offset + byte_width]))
+    return self.Slice(offset - _Unpack(U, self[offset : offset + byte_width]))
 
 
 class Object:
   """Base class for all non-trivial data accessors."""
+
   __slots__ = '_buf', '_byte_width'
 
   def __init__(self, buf, byte_width):
@@ -332,7 +334,8 @@
 
 class Sized(Object):
   """Base class for all data accessors which need to read encoded size."""
-  __slots__ = '_size',
+
+  __slots__ = ('_size',)
 
   def __init__(self, buf, byte_width, size=0):
     super().__init__(buf, byte_width)
@@ -343,7 +346,7 @@
 
   @property
   def SizeBytes(self):
-    return self._buf[-self._byte_width:0]
+    return self._buf[-self._byte_width : 0]
 
   def __len__(self):
     return self._size
@@ -351,11 +354,12 @@
 
 class Blob(Sized):
   """Data accessor for the encoded blob bytes."""
+
   __slots__ = ()
 
   @property
   def Bytes(self):
-    return self._buf[0:len(self)]
+    return self._buf[0 : len(self)]
 
   def __repr__(self):
     return 'Blob(%s, size=%d)' % (self._buf, len(self))
@@ -363,11 +367,12 @@
 
 class String(Sized):
   """Data accessor for the encoded string bytes."""
+
   __slots__ = ()
 
   @property
   def Bytes(self):
-    return self._buf[0:len(self)]
+    return self._buf[0 : len(self)]
 
   def Mutate(self, value):
     """Mutates underlying string bytes in place.
@@ -383,9 +388,9 @@
     encoded = value.encode('utf-8')
     n = len(encoded)
     if n <= len(self):
-      self._buf[-self._byte_width:0] = _Pack(U, n, self._byte_width)
+      self._buf[-self._byte_width : 0] = _Pack(U, n, self._byte_width)
       self._buf[0:n] = encoded
-      self._buf[n:len(self)] = bytearray(len(self) - n)
+      self._buf[n : len(self)] = bytearray(len(self) - n)
       return True
     return False
 
@@ -398,6 +403,7 @@
 
 class Key(Object):
   """Data accessor for the encoded key bytes."""
+
   __slots__ = ()
 
   def __init__(self, buf, byte_width):
@@ -406,7 +412,7 @@
 
   @property
   def Bytes(self):
-    return self._buf[0:len(self)]
+    return self._buf[0 : len(self)]
 
   def __len__(self):
     return self._buf.Find(0)
@@ -420,12 +426,14 @@
 
 class Vector(Sized):
   """Data accessor for the encoded vector bytes."""
+
   __slots__ = ()
 
   def __getitem__(self, index):
     if index < 0 or index >= len(self):
-      raise IndexError('vector index %s is out of [0, %d) range' % \
-          (index, len(self)))
+      raise IndexError(
+          'vector index %s is out of [0, %d) range' % (index, len(self))
+      )
 
     packed_type = self._buf[len(self) * self._byte_width + index]
     buf = self._buf.Slice(index * self._byte_width)
@@ -437,12 +445,16 @@
     return [e.Value for e in self]
 
   def __repr__(self):
-    return 'Vector(%s, byte_width=%d, size=%d)' % \
-        (self._buf, self._byte_width, self._size)
+    return 'Vector(%s, byte_width=%d, size=%d)' % (
+        self._buf,
+        self._byte_width,
+        self._size,
+    )
 
 
 class TypedVector(Sized):
   """Data accessor for the encoded typed vector or fixed typed vector bytes."""
+
   __slots__ = '_element_type', '_size'
 
   def __init__(self, buf, byte_width, element_type, size=0):
@@ -461,7 +473,7 @@
 
   @property
   def Bytes(self):
-    return self._buf[:self._byte_width * len(self)]
+    return self._buf[: self._byte_width * len(self)]
 
   @property
   def ElementType(self):
@@ -469,8 +481,9 @@
 
   def __getitem__(self, index):
     if index < 0 or index >= len(self):
-      raise IndexError('vector index %s is out of [0, %d) range' % \
-          (index, len(self)))
+      raise IndexError(
+          'vector index %s is out of [0, %d) range' % (index, len(self))
+      )
 
     buf = self._buf.Slice(index * self._byte_width)
     return Ref(buf, self._byte_width, 1, self._element_type)
@@ -497,8 +510,12 @@
       raise TypeError('unsupported element_type: %s' % self._element_type)
 
   def __repr__(self):
-    return 'TypedVector(%s, byte_width=%d, element_type=%s, size=%d)' % \
-        (self._buf, self._byte_width, self._element_type, self._size)
+    return 'TypedVector(%s, byte_width=%d, element_type=%s, size=%d)' % (
+        self._buf,
+        self._byte_width,
+        self._element_type,
+        self._size,
+    )
 
 
 class Map(Vector):
@@ -524,7 +541,9 @@
 
   @property
   def Keys(self):
-    byte_width = _Unpack(U, self._buf[-2 * self._byte_width:-self._byte_width])
+    byte_width = _Unpack(
+        U, self._buf[-2 * self._byte_width : -self._byte_width]
+    )
     buf = self._buf.Indirect(-3 * self._byte_width, self._byte_width)
     return TypedVector(buf, byte_width, Type.KEY)
 
@@ -542,6 +561,7 @@
 
 class Ref:
   """Data accessor for the encoded data bytes."""
+
   __slots__ = '_buf', '_parent_width', '_byte_width', '_type'
 
   @staticmethod
@@ -556,12 +576,16 @@
     self._type = type_
 
   def __repr__(self):
-    return 'Ref(%s, parent_width=%d, byte_width=%d, type_=%s)' % \
-            (self._buf, self._parent_width, self._byte_width, self._type)
+    return 'Ref(%s, parent_width=%d, byte_width=%d, type_=%s)' % (
+        self._buf,
+        self._parent_width,
+        self._byte_width,
+        self._type,
+    )
 
   @property
   def _Bytes(self):
-    return self._buf[:self._parent_width]
+    return self._buf[: self._parent_width]
 
   def _ConvertError(self, target_type):
     raise TypeError('cannot convert %s to %s' % (self._type, target_type))
@@ -593,8 +617,9 @@
     Returns:
       Whether the value was mutated or not.
     """
-    return self.IsBool and \
-           _Mutate(U, self._buf, value, self._parent_width, BitWidth.W8)
+    return self.IsBool and _Mutate(
+        U, self._buf, value, self._parent_width, BitWidth.W8
+    )
 
   @property
   def IsNumeric(self):
@@ -602,8 +627,12 @@
 
   @property
   def IsInt(self):
-    return self._type in (Type.INT, Type.INDIRECT_INT, Type.UINT,
-                          Type.INDIRECT_UINT)
+    return self._type in (
+        Type.INT,
+        Type.INDIRECT_INT,
+        Type.UINT,
+        Type.INDIRECT_UINT,
+    )
 
   @property
   def AsInt(self):
@@ -615,11 +644,11 @@
     elif self._type is Type.INT:
       return _Unpack(I, self._Bytes)
     elif self._type is Type.INDIRECT_INT:
-      return _Unpack(I, self._Indirect()[:self._byte_width])
+      return _Unpack(I, self._Indirect()[: self._byte_width])
     if self._type is Type.UINT:
       return _Unpack(U, self._Bytes)
     elif self._type is Type.INDIRECT_UINT:
-      return _Unpack(U, self._Indirect()[:self._byte_width])
+      return _Unpack(U, self._Indirect()[: self._byte_width])
     elif self.IsString:
       return len(self.AsString)
     elif self.IsKey:
@@ -648,13 +677,15 @@
     if self._type is Type.INT:
       return _Mutate(I, self._buf, value, self._parent_width, BitWidth.I(value))
     elif self._type is Type.INDIRECT_INT:
-      return _Mutate(I, self._Indirect(), value, self._byte_width,
-                     BitWidth.I(value))
+      return _Mutate(
+          I, self._Indirect(), value, self._byte_width, BitWidth.I(value)
+      )
     elif self._type is Type.UINT:
       return _Mutate(U, self._buf, value, self._parent_width, BitWidth.U(value))
     elif self._type is Type.INDIRECT_UINT:
-      return _Mutate(U, self._Indirect(), value, self._byte_width,
-                     BitWidth.U(value))
+      return _Mutate(
+          U, self._Indirect(), value, self._byte_width, BitWidth.U(value)
+      )
     else:
       return False
 
@@ -674,7 +705,7 @@
     elif self._type is Type.FLOAT:
       return _Unpack(F, self._Bytes)
     elif self._type is Type.INDIRECT_FLOAT:
-      return _Unpack(F, self._Indirect()[:self._byte_width])
+      return _Unpack(F, self._Indirect()[: self._byte_width])
     elif self.IsString:
       return float(self.AsString)
     elif self.IsVector:
@@ -697,11 +728,21 @@
       Whether the value was mutated or not.
     """
     if self._type is Type.FLOAT:
-      return _Mutate(F, self._buf, value, self._parent_width,
-                     BitWidth.B(self._parent_width))
+      return _Mutate(
+          F,
+          self._buf,
+          value,
+          self._parent_width,
+          BitWidth.B(self._parent_width),
+      )
     elif self._type is Type.INDIRECT_FLOAT:
-      return _Mutate(F, self._Indirect(), value, self._byte_width,
-                     BitWidth.B(self._byte_width))
+      return _Mutate(
+          F,
+          self._Indirect(),
+          value,
+          self._byte_width,
+          BitWidth.B(self._byte_width),
+      )
     else:
       return False
 
@@ -781,8 +822,11 @@
   @property
   def AsTypedVector(self):
     if self.IsTypedVector:
-      return TypedVector(self._Indirect(), self._byte_width,
-                         Type.ToTypedVectorElementType(self._type))
+      return TypedVector(
+          self._Indirect(),
+          self._byte_width,
+          Type.ToTypedVectorElementType(self._type),
+      )
     else:
       raise self._ConvertError('TYPED_VECTOR')
 
@@ -911,8 +955,11 @@
     if Type.IsInline(self._type):
       return self._min_bit_width
     for byte_width in 1, 2, 4, 8:
-      offset_loc = buf_size + _PaddingBytes(buf_size, byte_width) + \
-                   elem_index * byte_width
+      offset_loc = (
+          buf_size
+          + _PaddingBytes(buf_size, byte_width)
+          + elem_index * byte_width
+      )
       bit_width = BitWidth.U(offset_loc - self._value)
       if byte_width == (1 << bit_width):
         return bit_width
@@ -937,6 +984,7 @@
       func(self, *args[1:], **kwargs)
     else:
       func(self, *args, **kwargs)
+
   return wrapper
 
 
@@ -949,6 +997,7 @@
       func(self, args[1])
     else:
       raise ValueError('invalid number of arguments')
+
   return wrapper
 
 
@@ -978,10 +1027,12 @@
 class Builder:
   """Helper class to encode structural data into flexbuffers format."""
 
-  def __init__(self,
-               share_strings=False,
-               share_keys=True,
-               force_min_bit_width=BitWidth.W8):
+  def __init__(
+      self,
+      share_strings=False,
+      share_keys=True,
+      force_min_bit_width=BitWidth.W8,
+  ):
     self._share_strings = share_strings
     self._share_keys = share_keys
     self._force_min_bit_width = force_min_bit_width
@@ -1034,7 +1085,7 @@
 
   def _ReadKey(self, offset):
     key = self._buf[offset:]
-    return key[:key.find(0)]
+    return key[: key.find(0)]
 
   def _Align(self, alignment):
     byte_width = 1 << alignment
@@ -1054,7 +1105,11 @@
 
   def _WriteAny(self, value, byte_width):
     fmt = {
-        Type.NULL: U, Type.BOOL: U, Type.INT: I, Type.UINT: U, Type.FLOAT: F
+        Type.NULL: U,
+        Type.BOOL: U,
+        Type.INT: I,
+        Type.UINT: U,
+        Type.FLOAT: F,
     }.get(value.Type)
     if fmt:
       self._Write(fmt, value.Value, byte_width)
@@ -1157,11 +1212,9 @@
   def _PushIndirect(self, value, type_, bit_width):
     byte_width = self._Align(bit_width)
     loc = len(self._buf)
-    fmt = {
-        Type.INDIRECT_INT: I,
-        Type.INDIRECT_UINT: U,
-        Type.INDIRECT_FLOAT: F
-    }[type_]
+    fmt = {Type.INDIRECT_INT: I, Type.INDIRECT_UINT: U, Type.INDIRECT_FLOAT: F}[
+        type_
+    ]
     self._Write(fmt, value, byte_width)
     self._stack.append(Value(loc, type_, bit_width))
 
@@ -1362,10 +1415,12 @@
         self._WriteScalarVector(Type.FLOAT, 8, elements, fixed=False)
       elif elements.typecode in ('b', 'h', 'i', 'l', 'q'):
         self._WriteScalarVector(
-            Type.INT, elements.itemsize, elements, fixed=False)
+            Type.INT, elements.itemsize, elements, fixed=False
+        )
       elif elements.typecode in ('B', 'H', 'I', 'L', 'Q'):
         self._WriteScalarVector(
-            Type.UINT, elements.itemsize, elements, fixed=False)
+            Type.UINT, elements.itemsize, elements, fixed=False
+        )
       else:
         raise ValueError('unsupported array typecode: %s' % elements.typecode)
     else:
@@ -1375,10 +1430,9 @@
           add(e)
 
   @InMap
-  def FixedTypedVectorFromElements(self,
-                                   elements,
-                                   element_type=None,
-                                   byte_width=0):
+  def FixedTypedVectorFromElements(
+      self, elements, element_type=None, byte_width=0
+  ):
     """Encodes sequence of elements of the same type as fixed typed vector.
 
     Args:
@@ -1399,7 +1453,7 @@
     if len(types) != 1:
       raise TypeError('all elements must be of the same type')
 
-    type_, = types
+    (type_,) = types
 
     if element_type is None:
       element_type = {int: Type.INT, float: Type.FLOAT}.get(type_)
@@ -1410,7 +1464,7 @@
       width = {
           Type.UINT: BitWidth.U,
           Type.INT: BitWidth.I,
-          Type.FLOAT: BitWidth.F
+          Type.FLOAT: BitWidth.F,
       }[element_type]
       byte_width = 1 << max(width(e) for e in elements)
 
@@ -1441,7 +1495,8 @@
 
     keys = self._CreateVector(self._stack[start::2], typed=True, fixed=False)
     values = self._CreateVector(
-        self._stack[start + 1::2], typed=False, fixed=False, keys=keys)
+        self._stack[start + 1 :: 2], typed=False, fixed=False, keys=keys
+    )
 
     del self._stack[start:]
     self._stack.append(values)
@@ -1521,7 +1576,8 @@
     raise ValueError('buffer is too small')
   byte_width = buf[-1]
   return Ref.PackedType(
-      Buf(buf, -(2 + byte_width)), byte_width, packed_type=buf[-2])
+      Buf(buf, -(2 + byte_width)), byte_width, packed_type=buf[-2]
+  )
 
 
 def Dumps(obj):
diff --git a/python/flatbuffers/number_types.py b/python/flatbuffers/number_types.py
index 47942ff..e47f66f 100644
--- a/python/flatbuffers/number_types.py
+++ b/python/flatbuffers/number_types.py
@@ -16,7 +16,7 @@
 import struct
 
 from . import packer
-from .compat import import_numpy, NumpyRequiredForThisFeature
+from .compat import NumpyRequiredForThisFeature, import_numpy
 
 np = import_numpy()
 
@@ -26,156 +26,157 @@
 # These classes could be collections.namedtuple instances, but those are new
 # in 2.6 and we want to work towards 2.5 compatability.
 
+
 class BoolFlags(object):
-    bytewidth = 1
-    min_val = False
-    max_val = True
-    py_type = bool
-    name = "bool"
-    packer_type = packer.boolean
+  bytewidth = 1
+  min_val = False
+  max_val = True
+  py_type = bool
+  name = "bool"
+  packer_type = packer.boolean
 
 
 class Uint8Flags(object):
-    bytewidth = 1
-    min_val = 0
-    max_val = (2**8) - 1
-    py_type = int
-    name = "uint8"
-    packer_type = packer.uint8
+  bytewidth = 1
+  min_val = 0
+  max_val = (2**8) - 1
+  py_type = int
+  name = "uint8"
+  packer_type = packer.uint8
 
 
 class Uint16Flags(object):
-    bytewidth = 2
-    min_val = 0
-    max_val = (2**16) - 1
-    py_type = int
-    name = "uint16"
-    packer_type = packer.uint16
+  bytewidth = 2
+  min_val = 0
+  max_val = (2**16) - 1
+  py_type = int
+  name = "uint16"
+  packer_type = packer.uint16
 
 
 class Uint32Flags(object):
-    bytewidth = 4
-    min_val = 0
-    max_val = (2**32) - 1
-    py_type = int
-    name = "uint32"
-    packer_type = packer.uint32
+  bytewidth = 4
+  min_val = 0
+  max_val = (2**32) - 1
+  py_type = int
+  name = "uint32"
+  packer_type = packer.uint32
 
 
 class Uint64Flags(object):
-    bytewidth = 8
-    min_val = 0
-    max_val = (2**64) - 1
-    py_type = int
-    name = "uint64"
-    packer_type = packer.uint64
+  bytewidth = 8
+  min_val = 0
+  max_val = (2**64) - 1
+  py_type = int
+  name = "uint64"
+  packer_type = packer.uint64
 
 
 class Int8Flags(object):
-    bytewidth = 1
-    min_val = -(2**7)
-    max_val = (2**7) - 1
-    py_type = int
-    name = "int8"
-    packer_type = packer.int8
+  bytewidth = 1
+  min_val = -(2**7)
+  max_val = (2**7) - 1
+  py_type = int
+  name = "int8"
+  packer_type = packer.int8
 
 
 class Int16Flags(object):
-    bytewidth = 2
-    min_val = -(2**15)
-    max_val = (2**15) - 1
-    py_type = int
-    name = "int16"
-    packer_type = packer.int16
+  bytewidth = 2
+  min_val = -(2**15)
+  max_val = (2**15) - 1
+  py_type = int
+  name = "int16"
+  packer_type = packer.int16
 
 
 class Int32Flags(object):
-    bytewidth = 4
-    min_val = -(2**31)
-    max_val = (2**31) - 1
-    py_type = int
-    name = "int32"
-    packer_type = packer.int32
+  bytewidth = 4
+  min_val = -(2**31)
+  max_val = (2**31) - 1
+  py_type = int
+  name = "int32"
+  packer_type = packer.int32
 
 
 class Int64Flags(object):
-    bytewidth = 8
-    min_val = -(2**63)
-    max_val = (2**63) - 1
-    py_type = int
-    name = "int64"
-    packer_type = packer.int64
+  bytewidth = 8
+  min_val = -(2**63)
+  max_val = (2**63) - 1
+  py_type = int
+  name = "int64"
+  packer_type = packer.int64
 
 
 class Float32Flags(object):
-    bytewidth = 4
-    min_val = None
-    max_val = None
-    py_type = float
-    name = "float32"
-    packer_type = packer.float32
+  bytewidth = 4
+  min_val = None
+  max_val = None
+  py_type = float
+  name = "float32"
+  packer_type = packer.float32
 
 
 class Float64Flags(object):
-    bytewidth = 8
-    min_val = None
-    max_val = None
-    py_type = float
-    name = "float64"
-    packer_type = packer.float64
+  bytewidth = 8
+  min_val = None
+  max_val = None
+  py_type = float
+  name = "float64"
+  packer_type = packer.float64
 
 
 class SOffsetTFlags(Int32Flags):
-    pass
+  pass
 
 
 class UOffsetTFlags(Uint32Flags):
-    pass
+  pass
 
 
 class VOffsetTFlags(Uint16Flags):
-    pass
+  pass
 
 
 def valid_number(n, flags):
-    if flags.min_val is None and flags.max_val is None:
-        return True
-    return flags.min_val <= n <= flags.max_val
+  if flags.min_val is None and flags.max_val is None:
+    return True
+  return flags.min_val <= n <= flags.max_val
 
 
 def enforce_number(n, flags):
-    if flags.min_val is None and flags.max_val is None:
-        return
-    if not flags.min_val <= n <= flags.max_val:
-        raise TypeError("bad number %s for type %s" % (str(n), flags.name))
+  if flags.min_val is None and flags.max_val is None:
+    return
+  if not flags.min_val <= n <= flags.max_val:
+    raise TypeError("bad number %s for type %s" % (str(n), flags.name))
 
 
 def float32_to_uint32(n):
-    packed = struct.pack("<1f", n)
-    (converted,) = struct.unpack("<1L", packed)
-    return converted
+  packed = struct.pack("<1f", n)
+  (converted,) = struct.unpack("<1L", packed)
+  return converted
 
 
 def uint32_to_float32(n):
-    packed = struct.pack("<1L", n)
-    (unpacked,) = struct.unpack("<1f", packed)
-    return unpacked
+  packed = struct.pack("<1L", n)
+  (unpacked,) = struct.unpack("<1f", packed)
+  return unpacked
 
 
 def float64_to_uint64(n):
-    packed = struct.pack("<1d", n)
-    (converted,) = struct.unpack("<1Q", packed)
-    return converted
+  packed = struct.pack("<1d", n)
+  (converted,) = struct.unpack("<1Q", packed)
+  return converted
 
 
 def uint64_to_float64(n):
-    packed = struct.pack("<1Q", n)
-    (unpacked,) = struct.unpack("<1d", packed)
-    return unpacked
+  packed = struct.pack("<1Q", n)
+  (unpacked,) = struct.unpack("<1d", packed)
+  return unpacked
 
 
 def to_numpy_type(number_type):
-    if np is not None:
-        return np.dtype(number_type.name).newbyteorder('<')
-    else:
-        raise NumpyRequiredForThisFeature('Numpy was not found.')
+  if np is not None:
+    return np.dtype(number_type.name).newbyteorder("<")
+  else:
+    raise NumpyRequiredForThisFeature("Numpy was not found.")
diff --git a/python/flatbuffers/packer.py b/python/flatbuffers/packer.py
index 20ee9f1..0296e52 100644
--- a/python/flatbuffers/packer.py
+++ b/python/flatbuffers/packer.py
@@ -12,8 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-"""
-Provide pre-compiled struct packers for encoding and decoding.
+"""Provide pre-compiled struct packers for encoding and decoding.
 
 See: https://docs.python.org/2/library/struct.html#format-characters
 """
diff --git a/python/flatbuffers/table.py b/python/flatbuffers/table.py
index d5336ca..97f95a7 100644
--- a/python/flatbuffers/table.py
+++ b/python/flatbuffers/table.py
@@ -17,122 +17,132 @@
 
 
 class Table(object):
-    """Table wraps a byte slice and provides read access to its data.
+  """Table wraps a byte slice and provides read access to its data.
 
-    The variable `Pos` indicates the root of the FlatBuffers object therein."""
+  The variable `Pos` indicates the root of the FlatBuffers object therein.
+  """
 
-    __slots__ = ("Bytes", "Pos")
+  __slots__ = ("Bytes", "Pos")
 
-    def __init__(self, buf, pos):
-        N.enforce_number(pos, N.UOffsetTFlags)
+  def __init__(self, buf, pos):
+    N.enforce_number(pos, N.UOffsetTFlags)
 
-        self.Bytes = buf
-        self.Pos = pos
+    self.Bytes = buf
+    self.Pos = pos
 
-    def Offset(self, vtableOffset):
-        """Offset provides access into the Table's vtable.
+  def Offset(self, vtableOffset):
+    """Offset provides access into the Table's vtable.
 
-        Deprecated fields are ignored by checking the vtable's length."""
+    Deprecated fields are ignored by checking the vtable's length.
+    """
 
-        vtable = self.Pos - self.Get(N.SOffsetTFlags, self.Pos)
-        vtableEnd = self.Get(N.VOffsetTFlags, vtable)
-        if vtableOffset < vtableEnd:
-            return self.Get(N.VOffsetTFlags, vtable + vtableOffset)
-        return 0
+    vtable = self.Pos - self.Get(N.SOffsetTFlags, self.Pos)
+    vtableEnd = self.Get(N.VOffsetTFlags, vtable)
+    if vtableOffset < vtableEnd:
+      return self.Get(N.VOffsetTFlags, vtable + vtableOffset)
+    return 0
 
-    def Indirect(self, off):
-        """Indirect retrieves the relative offset stored at `offset`."""
-        N.enforce_number(off, N.UOffsetTFlags)
-        return off + encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
+  def Indirect(self, off):
+    """Indirect retrieves the relative offset stored at `offset`."""
+    N.enforce_number(off, N.UOffsetTFlags)
+    return off + encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
 
-    def String(self, off):
-        """String gets a string from data stored inside the flatbuffer."""
-        N.enforce_number(off, N.UOffsetTFlags)
-        off += encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
-        start = off + N.UOffsetTFlags.bytewidth
-        length = encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
-        return bytes(self.Bytes[start:start+length])
+  def String(self, off):
+    """String gets a string from data stored inside the flatbuffer."""
+    N.enforce_number(off, N.UOffsetTFlags)
+    off += encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
+    start = off + N.UOffsetTFlags.bytewidth
+    length = encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
+    return bytes(self.Bytes[start : start + length])
 
-    def VectorLen(self, off):
-        """VectorLen retrieves the length of the vector whose offset is stored
-           at "off" in this object."""
-        N.enforce_number(off, N.UOffsetTFlags)
+  def VectorLen(self, off):
+    """VectorLen retrieves the length of the vector whose offset is stored
 
-        off += self.Pos
-        off += encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
-        ret = encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
-        return ret
+    at "off" in this object.
+    """
+    N.enforce_number(off, N.UOffsetTFlags)
 
-    def Vector(self, off):
-        """Vector retrieves the start of data of the vector whose offset is
-           stored at "off" in this object."""
-        N.enforce_number(off, N.UOffsetTFlags)
+    off += self.Pos
+    off += encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
+    ret = encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
+    return ret
 
-        off += self.Pos
-        x = off + self.Get(N.UOffsetTFlags, off)
-        # data starts after metadata containing the vector length
-        x += N.UOffsetTFlags.bytewidth
-        return x
+  def Vector(self, off):
+    """Vector retrieves the start of data of the vector whose offset is
 
-    def Union(self, t2, off):
-        """Union initializes any Table-derived type to point to the union at
-           the given offset."""
-        assert type(t2) is Table
-        N.enforce_number(off, N.UOffsetTFlags)
+    stored at "off" in this object.
+    """
+    N.enforce_number(off, N.UOffsetTFlags)
 
-        off += self.Pos
-        t2.Pos = off + self.Get(N.UOffsetTFlags, off)
-        t2.Bytes = self.Bytes
+    off += self.Pos
+    x = off + self.Get(N.UOffsetTFlags, off)
+    # data starts after metadata containing the vector length
+    x += N.UOffsetTFlags.bytewidth
+    return x
 
-    def Get(self, flags, off):
-        """
-        Get retrieves a value of the type specified by `flags`  at the
-        given offset.
-        """
-        N.enforce_number(off, N.UOffsetTFlags)
-        return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
+  def Union(self, t2, off):
+    """Union initializes any Table-derived type to point to the union at
 
-    def GetSlot(self, slot, d, validator_flags):
-        N.enforce_number(slot, N.VOffsetTFlags)
-        if validator_flags is not None:
-            N.enforce_number(d, validator_flags)
-        off = self.Offset(slot)
-        if off == 0:
-            return d
-        return self.Get(validator_flags, self.Pos + off)
+    the given offset.
+    """
+    assert type(t2) is Table
+    N.enforce_number(off, N.UOffsetTFlags)
 
-    def GetVectorAsNumpy(self, flags, off):
-        """
-        GetVectorAsNumpy returns the vector that starts at `Vector(off)`
-        as a numpy array with the type specified by `flags`. The array is
-        a `view` into Bytes, so modifying the returned array will
-        modify Bytes in place.
-        """
-        offset = self.Vector(off)
-        length = self.VectorLen(off) # TODO: length accounts for bytewidth, right?
-        numpy_dtype = N.to_numpy_type(flags)
-        return encode.GetVectorAsNumpy(numpy_dtype, self.Bytes, length, offset)
+    off += self.Pos
+    t2.Pos = off + self.Get(N.UOffsetTFlags, off)
+    t2.Bytes = self.Bytes
 
-    def GetArrayAsNumpy(self, flags, off, length):
-        """
-        GetArrayAsNumpy returns the array with fixed width that starts at `Vector(offset)`
-        with length `length` as a numpy array with the type specified by `flags`. The
-        array is a `view` into Bytes so modifying the returned will modify Bytes in place.
-        """
-        numpy_dtype = N.to_numpy_type(flags)
-        return encode.GetVectorAsNumpy(numpy_dtype, self.Bytes, length, off)
+  def Get(self, flags, off):
+    """Get retrieves a value of the type specified by `flags`  at the
 
-    def GetVOffsetTSlot(self, slot, d):
-        """
-        GetVOffsetTSlot retrieves the VOffsetT that the given vtable location
-        points to. If the vtable value is zero, the default value `d`
-        will be returned.
-        """
+    given offset.
+    """
+    N.enforce_number(off, N.UOffsetTFlags)
+    return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
 
-        N.enforce_number(slot, N.VOffsetTFlags)
-        N.enforce_number(d, N.VOffsetTFlags)
+  def GetSlot(self, slot, d, validator_flags):
+    N.enforce_number(slot, N.VOffsetTFlags)
+    if validator_flags is not None:
+      N.enforce_number(d, validator_flags)
+    off = self.Offset(slot)
+    if off == 0:
+      return d
+    return self.Get(validator_flags, self.Pos + off)
 
-        off = self.Offset(slot)
-        if off == 0:
-            return d
-        return off
+  def GetVectorAsNumpy(self, flags, off):
+    """GetVectorAsNumpy returns the vector that starts at `Vector(off)`
+
+    as a numpy array with the type specified by `flags`. The array is
+    a `view` into Bytes, so modifying the returned array will
+    modify Bytes in place.
+    """
+    offset = self.Vector(off)
+    length = self.VectorLen(off)  # TODO: length accounts for bytewidth, right?
+    numpy_dtype = N.to_numpy_type(flags)
+    return encode.GetVectorAsNumpy(numpy_dtype, self.Bytes, length, offset)
+
+  def GetArrayAsNumpy(self, flags, off, length):
+    """GetArrayAsNumpy returns the array with fixed width that starts at `Vector(offset)`
+
+    with length `length` as a numpy array with the type specified by `flags`.
+    The
+    array is a `view` into Bytes so modifying the returned will modify Bytes in
+    place.
+    """
+    numpy_dtype = N.to_numpy_type(flags)
+    return encode.GetVectorAsNumpy(numpy_dtype, self.Bytes, length, off)
+
+  def GetVOffsetTSlot(self, slot, d):
+    """GetVOffsetTSlot retrieves the VOffsetT that the given vtable location
+
+    points to. If the vtable value is zero, the default value `d`
+    will be returned.
+    """
+
+    N.enforce_number(slot, N.VOffsetTFlags)
+    N.enforce_number(d, N.VOffsetTFlags)
+
+    off = self.Offset(slot)
+    if off == 0:
+      return d
+    return off
diff --git a/python/flatbuffers/util.py b/python/flatbuffers/util.py
index a5a7838..03feb26 100644
--- a/python/flatbuffers/util.py
+++ b/python/flatbuffers/util.py
@@ -16,28 +16,32 @@
 from . import number_types
 from . import packer
 
+
 def GetSizePrefix(buf, offset):
-	"""Extract the size prefix from a buffer."""
-	return encode.Get(packer.int32, buf, offset)
+  """Extract the size prefix from a buffer."""
+  return encode.Get(packer.int32, buf, offset)
+
 
 def GetBufferIdentifier(buf, offset, size_prefixed=False):
-        """Extract the file_identifier from a buffer"""
-        if size_prefixed:
-            # increase offset by size of UOffsetTFlags
-            offset += number_types.UOffsetTFlags.bytewidth
-        # increase offset by size of root table pointer
-        offset += number_types.UOffsetTFlags.bytewidth
-        # end of FILE_IDENTIFIER
-        end = offset + encode.FILE_IDENTIFIER_LENGTH
-        return buf[offset:end]
+  """Extract the file_identifier from a buffer"""
+  if size_prefixed:
+    # increase offset by size of UOffsetTFlags
+    offset += number_types.UOffsetTFlags.bytewidth
+  # increase offset by size of root table pointer
+  offset += number_types.UOffsetTFlags.bytewidth
+  # end of FILE_IDENTIFIER
+  end = offset + encode.FILE_IDENTIFIER_LENGTH
+  return buf[offset:end]
+
 
 def BufferHasIdentifier(buf, offset, file_identifier, size_prefixed=False):
-        got = GetBufferIdentifier(buf, offset, size_prefixed=size_prefixed)
-        return got == file_identifier
+  got = GetBufferIdentifier(buf, offset, size_prefixed=size_prefixed)
+  return got == file_identifier
+
 
 def RemoveSizePrefix(buf, offset):
-	"""
-	Create a slice of a size-prefixed buffer that has
-	its position advanced just past the size prefix.
-	"""
-	return buf, offset + number_types.Int32Flags.bytewidth
+  """Create a slice of a size-prefixed buffer that has
+
+  its position advanced just past the size prefix.
+  """
+  return buf, offset + number_types.Int32Flags.bytewidth
diff --git a/python/setup.py b/python/setup.py
index 8f13456..321121b 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -21,9 +21,11 @@
     author='Derek Bailey',
     author_email='derekbailey@google.com',
     url='https://google.github.io/flatbuffers/',
-    long_description=('Python runtime library for use with the '
-                      '`Flatbuffers <https://google.github.io/flatbuffers/>`_ '
-                      'serialization format.'),
+    long_description=(
+        'Python runtime library for use with the '
+        '`Flatbuffers <https://google.github.io/flatbuffers/>`_ '
+        'serialization format.'
+    ),
     packages=['flatbuffers'],
     include_package_data=True,
     requires=[],
diff --git a/rust/flatbuffers/src/builder.rs b/rust/flatbuffers/src/builder.rs
index a6e6818..d8a6e81 100644
--- a/rust/flatbuffers/src/builder.rs
+++ b/rust/flatbuffers/src/builder.rs
@@ -223,9 +223,7 @@
     /// new object.
     pub fn reset(&mut self) {
         // memset only the part of the buffer that could be dirty:
-        self.allocator[self.head.range_to_end()]
-            .iter_mut()
-            .for_each(|x| *x = 0);
+        self.allocator[self.head.range_to_end()].iter_mut().for_each(|x| *x = 0);
 
         self.head = ReverseIndex::end();
         self.written_vtable_revpos.clear();
@@ -627,15 +625,13 @@
             }
         }
         let new_vt_bytes = &self.allocator[vt_start_pos.range_to(vt_end_pos)];
-        let found = self
-            .written_vtable_revpos
-            .binary_search_by(|old_vtable_revpos: &UOffsetT| {
-                let old_vtable_pos = self.allocator.len() - *old_vtable_revpos as usize;
-                // Safety:
-                // Already written vtables are valid by construction
-                let old_vtable = unsafe { VTable::init(&self.allocator, old_vtable_pos) };
-                new_vt_bytes.cmp(old_vtable.as_bytes())
-            });
+        let found = self.written_vtable_revpos.binary_search_by(|old_vtable_revpos: &UOffsetT| {
+            let old_vtable_pos = self.allocator.len() - *old_vtable_revpos as usize;
+            // Safety:
+            // Already written vtables are valid by construction
+            let old_vtable = unsafe { VTable::init(&self.allocator, old_vtable_pos) };
+            new_vt_bytes.cmp(old_vtable.as_bytes())
+        });
         let final_vtable_revpos = match found {
             Ok(i) => {
                 // The new vtable is a duplicate so clear it.
@@ -680,9 +676,7 @@
     #[inline]
     fn grow_allocator(&mut self) {
         let starting_active_size = self.used_space();
-        self.allocator
-            .grow_downwards()
-            .expect("Flatbuffer allocation failure");
+        self.allocator.grow_downwards().expect("Flatbuffer allocation failure");
 
         let ending_active_size = self.used_space();
         debug_assert_eq!(starting_active_size, ending_active_size);
@@ -708,11 +702,7 @@
             // for the size prefix:
             let b = if size_prefixed { SIZE_UOFFSET } else { 0 };
             // for the file identifier (a string that is not zero-terminated):
-            let c = if file_identifier.is_some() {
-                FILE_IDENTIFIER_LENGTH
-            } else {
-                0
-            };
+            let c = if file_identifier.is_some() { FILE_IDENTIFIER_LENGTH } else { 0 };
             a + b + c
         };
 
@@ -767,10 +757,7 @@
         if self.unused_ready_space() >= want {
             return want;
         }
-        assert!(
-            want <= FLATBUFFERS_MAX_BUFFER_SIZE,
-            "cannot grow buffer beyond 2 gigabytes"
-        );
+        assert!(want <= FLATBUFFERS_MAX_BUFFER_SIZE, "cannot grow buffer beyond 2 gigabytes");
 
         while self.unused_ready_space() < want {
             self.grow_allocator();
diff --git a/rust/flatbuffers/src/lib.rs b/rust/flatbuffers/src/lib.rs
index 9ed3080..600d6d9 100644
--- a/rust/flatbuffers/src/lib.rs
+++ b/rust/flatbuffers/src/lib.rs
@@ -56,8 +56,8 @@
 pub use crate::table::{buffer_has_identifier, Table};
 pub use crate::vector::{follow_cast_ref, Vector, VectorIter};
 pub use crate::verifier::{
-    ErrorTraceDetail, InvalidFlatbuffer, SimpleToVerifyInSlice, TableVerifier, Verifiable, Verifier,
-    VerifierOptions,
+    ErrorTraceDetail, InvalidFlatbuffer, SimpleToVerifyInSlice, TableVerifier, Verifiable,
+    Verifier, VerifierOptions,
 };
 pub use crate::vtable::field_index_to_field_offset;
 pub use bitflags;
diff --git a/rust/flatbuffers/src/vector.rs b/rust/flatbuffers/src/vector.rs
index e156951..6c559b4 100644
--- a/rust/flatbuffers/src/vector.rs
+++ b/rust/flatbuffers/src/vector.rs
@@ -31,11 +31,7 @@
     fn default() -> Self {
         // Static, length 0 vector.
         // Note that derived default causes UB due to issues in read_scalar_at /facepalm.
-        Self(
-            &[0; core::mem::size_of::<UOffsetT>()],
-            0,
-            Default::default(),
-        )
+        Self(&[0; core::mem::size_of::<UOffsetT>()], 0, Default::default())
     }
 }
 
@@ -123,11 +119,11 @@
                 Ordering::Equal => return Some(value),
                 Ordering::Less => left = mid + 1,
                 Ordering::Greater => {
-                  if mid == 0 {
-                    return None;
-                  }
-                  right = mid - 1;
-                },
+                    if mid == 0 {
+                        return None;
+                    }
+                    right = mid - 1;
+                }
             }
         }
 
@@ -209,12 +205,7 @@
     ///
     #[inline]
     pub unsafe fn from_slice(buf: &'a [u8], items_num: usize) -> Self {
-        VectorIter {
-            buf,
-            loc: 0,
-            remaining: items_num,
-            phantom: PhantomData,
-        }
+        VectorIter { buf, loc: 0, remaining: items_num, phantom: PhantomData }
     }
 }
 
diff --git a/rust/flatbuffers/src/verifier.rs b/rust/flatbuffers/src/verifier.rs
index c4c55f5..a841bf7 100644
--- a/rust/flatbuffers/src/verifier.rs
+++ b/rust/flatbuffers/src/verifier.rs
@@ -20,18 +20,9 @@
 /// the other errors should not be producible by correct flatbuffers implementations.
 #[derive(Clone, Debug, PartialEq, Eq)]
 pub enum ErrorTraceDetail {
-    VectorElement {
-        index: usize,
-        position: usize,
-    },
-    TableField {
-        field_name: Cow<'static, str>,
-        position: usize,
-    },
-    UnionVariant {
-        variant: Cow<'static, str>,
-        position: usize,
-    },
+    VectorElement { index: usize, position: usize },
+    TableField { field_name: Cow<'static, str>, position: usize },
+    UnionVariant { variant: Cow<'static, str>, position: usize },
 }
 
 #[derive(PartialEq, Eq, Default, Debug, Clone)]
@@ -100,33 +91,18 @@
 impl core::fmt::Display for InvalidFlatbuffer {
     fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         match self {
-            InvalidFlatbuffer::MissingRequiredField {
-                required,
-                error_trace,
-            } => {
+            InvalidFlatbuffer::MissingRequiredField { required, error_trace } => {
                 writeln!(f, "Missing required field `{}`.\n{}", required, error_trace)?;
             }
-            InvalidFlatbuffer::InconsistentUnion {
-                field,
-                field_type,
-                error_trace,
-            } => {
+            InvalidFlatbuffer::InconsistentUnion { field, field_type, error_trace } => {
                 writeln!(
                     f,
                     "Exactly one of union discriminant (`{}`) and value (`{}`) are present.\n{}",
                     field_type, field, error_trace
                 )?;
             }
-            InvalidFlatbuffer::Utf8Error {
-                error,
-                range,
-                error_trace,
-            } => {
-                writeln!(
-                    f,
-                    "Utf8 error for string in {:?}: {}\n{}",
-                    range, error, error_trace
-                )?;
+            InvalidFlatbuffer::Utf8Error { error, range, error_trace } => {
+                writeln!(f, "Utf8 error for string in {:?}: {}\n{}", range, error, error_trace)?;
             }
             InvalidFlatbuffer::MissingNullTerminator { range, error_trace } => {
                 writeln!(
@@ -135,11 +111,7 @@
                     range.start, range.end, error_trace
                 )?;
             }
-            InvalidFlatbuffer::Unaligned {
-                position,
-                unaligned_type,
-                error_trace,
-            } => {
+            InvalidFlatbuffer::Unaligned { position, unaligned_type, error_trace } => {
                 writeln!(
                     f,
                     "Type `{}` at position {} is unaligned.\n{}",
@@ -153,11 +125,7 @@
                     range.start, range.end, error_trace
                 )?;
             }
-            InvalidFlatbuffer::SignedOffsetOutOfBounds {
-                soffset,
-                position,
-                error_trace,
-            } => {
+            InvalidFlatbuffer::SignedOffsetOutOfBounds { soffset, position, error_trace } => {
                 writeln!(
                     f,
                     "Signed offset at position {} has value {} which points out of bounds.\n{}",
@@ -190,10 +158,7 @@
                         index, position
                     )?;
                 }
-                TableField {
-                    field_name,
-                    position,
-                } => {
+                TableField { field_name, position } => {
                     writeln!(
                         f,
                         "\twhile verifying table field `{}` at position {:?}",
@@ -217,10 +182,7 @@
 
 impl InvalidFlatbuffer {
     fn new_range_oob<T>(start: usize, end: usize) -> Result<T> {
-        Err(Self::RangeOutOfBounds {
-            range: Range { start, end },
-            error_trace: Default::default(),
-        })
+        Err(Self::RangeOutOfBounds { range: Range { start, end }, error_trace: Default::default() })
     }
     pub fn new_inconsistent_union<T>(
         field: impl Into<Cow<'static, str>>,
@@ -260,13 +222,7 @@
 
 /// Adds a TableField trace detail if `res` is a data error.
 fn trace_field<T>(res: Result<T>, field_name: Cow<'static, str>, position: usize) -> Result<T> {
-    append_trace(
-        res,
-        ErrorTraceDetail::TableField {
-            field_name,
-            position,
-        },
-    )
+    append_trace(res, ErrorTraceDetail::TableField { field_name, position })
 }
 
 /// Adds a TableField trace detail if `res` is a data error.
@@ -315,13 +271,7 @@
 
 impl<'opts, 'buf> Verifier<'opts, 'buf> {
     pub fn new(opts: &'opts VerifierOptions, buffer: &'buf [u8]) -> Self {
-        Self {
-            opts,
-            buffer,
-            depth: 0,
-            num_tables: 0,
-            apparent_size: 0,
-        }
+        Self { opts, buffer, depth: 0, num_tables: 0, apparent_size: 0 }
     }
     /// Resets verifier internal state.
     #[inline]
@@ -435,12 +385,7 @@
         if self.depth > self.opts.max_depth {
             return Err(InvalidFlatbuffer::DepthLimitReached);
         }
-        Ok(TableVerifier {
-            pos: table_pos,
-            vtable: vtable_pos,
-            vtable_len,
-            verifier: self,
-        })
+        Ok(TableVerifier { pos: table_pos, vtable: vtable_pos, vtable_len, verifier: self })
     }
 
     /// Runs the union variant's type's verifier assuming the variant is at the given position,
@@ -451,13 +396,7 @@
         position: usize,
     ) -> Result<()> {
         let res = T::run_verifier(self, position);
-        append_trace(
-            res,
-            ErrorTraceDetail::UnionVariant {
-                variant: variant.into(),
-                position,
-            },
-        )
+        append_trace(res, ErrorTraceDetail::UnionVariant { variant: variant.into(), position })
     }
 }
 
@@ -501,11 +440,7 @@
         required: bool,
     ) -> Result<Self> {
         if let Some(field_pos) = self.deref(field)? {
-            trace_field(
-                T::run_verifier(self.verifier, field_pos),
-                field_name.into(),
-                field_pos,
-            )?;
+            trace_field(T::run_verifier(self.verifier, field_pos), field_name.into(), field_pos)?;
             return Ok(self);
         }
         if required {
@@ -545,11 +480,7 @@
                 }
             }
             (Some(k), Some(v)) => {
-                trace_field(
-                    Key::run_verifier(self.verifier, k),
-                    key_field_name.into(),
-                    k,
-                )?;
+                trace_field(Key::run_verifier(self.verifier, k), key_field_name.into(), k)?;
                 // Safety:
                 // Run verifier on `k` above
                 let discriminant = unsafe { Key::follow(self.verifier.buffer, k) };
@@ -560,7 +491,10 @@
                 )?;
                 Ok(self)
             }
-            _ => InvalidFlatbuffer::new_inconsistent_union(key_field_name.into(), val_field_name.into()),
+            _ => InvalidFlatbuffer::new_inconsistent_union(
+                key_field_name.into(),
+                val_field_name.into(),
+            ),
         }
     }
     pub fn finish(self) -> &'ver mut Verifier<'opts, 'buf> {
@@ -642,11 +576,7 @@
         let range = verify_vector_range::<ForwardsUOffset<T>>(v, pos)?;
         let size = core::mem::size_of::<ForwardsUOffset<T>>();
         for (i, element_pos) in range.step_by(size).enumerate() {
-            trace_elem(
-                <ForwardsUOffset<T>>::run_verifier(v, element_pos),
-                i,
-                element_pos,
-            )?;
+            trace_elem(<ForwardsUOffset<T>>::run_verifier(v, element_pos), i, element_pos)?;
         }
         Ok(())
     }
diff --git a/rust/flexbuffers/src/builder/map.rs b/rust/flexbuffers/src/builder/map.rs
index 73194c7..2b7d529 100644
--- a/rust/flexbuffers/src/builder/map.rs
+++ b/rust/flexbuffers/src/builder/map.rs
@@ -48,10 +48,7 @@
         self.builder.push_key(key);
         // Nested vector.
         let start = Some(self.builder.values.len());
-        VectorBuilder {
-            builder: self.builder,
-            start,
-        }
+        VectorBuilder { builder: self.builder, start }
     }
     /// Starts a nested map which that will be pushed onto this map
     /// with key `key` when it is dropped.
@@ -63,10 +60,7 @@
         self.builder.push_key(key);
         // Nested map.
         let start = Some(self.builder.values.len());
-        MapBuilder {
-            builder: self.builder,
-            start,
-        }
+        MapBuilder { builder: self.builder, start }
     }
     /// `end_map` sorts the map by key and writes it to the buffer. This happens anyway
     /// when the map builder is dropped.
diff --git a/rust/flexbuffers/src/builder/mod.rs b/rust/flexbuffers/src/builder/mod.rs
index 97838c2..205cb94 100644
--- a/rust/flexbuffers/src/builder/mod.rs
+++ b/rust/flexbuffers/src/builder/mod.rs
@@ -35,12 +35,8 @@
             S: AsRef<[T]>,
         {
             let mut value = Value::$new_vec(xs.as_ref().len());
-            let mut width = xs
-                .as_ref()
-                .iter()
-                .map(|x| BitWidth::from((*x).into()))
-                .max()
-                .unwrap_or_default();
+            let mut width =
+                xs.as_ref().iter().map(|x| BitWidth::from((*x).into())).max().unwrap_or_default();
             if !value.is_fixed_length_vector() {
                 let length = Value::UInt(xs.as_ref().len() as u64);
                 width = std::cmp::max(width, length.width_or_child_width());
@@ -135,16 +131,8 @@
 
 impl<'a> Builder {
     pub fn new(opts: BuilderOptions) -> Self {
-        let key_pool = if opts.contains(BuilderOptions::SHARE_KEYS) {
-            Some(vec![])
-        } else {
-            None
-        };
-        Builder {
-            key_pool,
-            values: Vec::new(),
-            buffer: Vec::new(),
-        }
+        let key_pool = if opts.contains(BuilderOptions::SHARE_KEYS) { Some(vec![]) } else { None };
+        Builder { key_pool, values: Vec::new(), buffer: Vec::new() }
     }
     /// Shows the internal flexbuffer. It will either be empty or populated with the most
     /// recently built flexbuffer.
@@ -167,10 +155,7 @@
         }
     }
     fn push_key(&mut self, key: &str) {
-        debug_assert!(
-            key.bytes().all(|b| b != b'\0'),
-            "Keys must not have internal nulls."
-        );
+        debug_assert!(key.bytes().all(|b| b != b'\0'), "Keys must not have internal nulls.");
         // Search key pool if there is one.
         let found = self.key_pool.as_ref().map(|pool| {
             pool.binary_search_by(|&CachedKey(addr)| {
@@ -217,11 +202,7 @@
         store_value(&mut self.buffer, length, width);
         let address = self.buffer.len();
         self.buffer.extend_from_slice(xs);
-        Value::Reference {
-            fxb_type: FlexBufferType::Blob,
-            address,
-            child_width: width,
-        }
+        Value::Reference { fxb_type: FlexBufferType::Blob, address, child_width: width }
     }
     fn push_str(&mut self, x: &str) {
         let mut string = self.store_blob(x.as_bytes());
@@ -261,18 +242,12 @@
     /// The exact Flexbuffer vector type is dynamically inferred.
     pub fn start_vector(&'a mut self) -> VectorBuilder<'a> {
         self.reset();
-        VectorBuilder {
-            builder: self,
-            start: None,
-        }
+        VectorBuilder { builder: self, start: None }
     }
     /// Resets the builder and builds a new flexbuffer with a map at the root.
     pub fn start_map(&'a mut self) -> MapBuilder<'a> {
         self.reset();
-        MapBuilder {
-            builder: self,
-            start: None,
-        }
+        MapBuilder { builder: self, start: None }
     }
     /// Resets the builder and builds a new flexbuffer with the pushed value at the root.
     pub fn build_singleton<P: Pushable>(&mut self, p: P) {
diff --git a/rust/flexbuffers/src/builder/ser.rs b/rust/flexbuffers/src/builder/ser.rs
index 4d8fe53..2533a40 100644
--- a/rust/flexbuffers/src/builder/ser.rs
+++ b/rust/flexbuffers/src/builder/ser.rs
@@ -49,19 +49,13 @@
         Ok(())
     }
     fn start_vector(&mut self) {
-        let previous_end = if self.nesting.is_empty() {
-            None
-        } else {
-            Some(self.builder.values.len())
-        };
+        let previous_end =
+            if self.nesting.is_empty() { None } else { Some(self.builder.values.len()) };
         self.nesting.push(previous_end);
     }
     fn start_map(&mut self) {
-        let previous_end = if self.nesting.is_empty() {
-            None
-        } else {
-            Some(self.builder.values.len())
-        };
+        let previous_end =
+            if self.nesting.is_empty() { None } else { Some(self.builder.values.len()) };
         self.nesting.push(previous_end);
     }
     fn end_vector(&mut self) -> Result<(), Error> {
diff --git a/rust/flexbuffers/src/builder/value.rs b/rust/flexbuffers/src/builder/value.rs
index 88ff7b9..74dd723 100644
--- a/rust/flexbuffers/src/builder/value.rs
+++ b/rust/flexbuffers/src/builder/value.rs
@@ -47,26 +47,10 @@
             let address = 0;
             let child_width = W8;
             match n {
-                2 => Value::Reference {
-                    address,
-                    child_width,
-                    fxb_type: $v2,
-                },
-                3 => Value::Reference {
-                    address,
-                    child_width,
-                    fxb_type: $v3,
-                },
-                4 => Value::Reference {
-                    address,
-                    child_width,
-                    fxb_type: $v4,
-                },
-                _ => Value::Reference {
-                    address,
-                    child_width,
-                    fxb_type: $vn,
-                },
+                2 => Value::Reference { address, child_width, fxb_type: $v2 },
+                3 => Value::Reference { address, child_width, fxb_type: $v3 },
+                4 => Value::Reference { address, child_width, fxb_type: $v4 },
+                _ => Value::Reference { address, child_width, fxb_type: $vn },
             }
         }
     };
@@ -74,40 +58,14 @@
 
 impl Value {
     pub fn new_vector() -> Self {
-        Value::Reference {
-            address: 0,
-            child_width: W8,
-            fxb_type: Vector,
-        }
+        Value::Reference { address: 0, child_width: W8, fxb_type: Vector }
     }
     pub fn new_map() -> Self {
-        Value::Reference {
-            address: 0,
-            child_width: W8,
-            fxb_type: Map,
-        }
+        Value::Reference { address: 0, child_width: W8, fxb_type: Map }
     }
-    new_typed_vector!(
-        new_int_vector,
-        VectorInt2,
-        VectorInt3,
-        VectorInt4,
-        VectorInt
-    );
-    new_typed_vector!(
-        new_uint_vector,
-        VectorUInt2,
-        VectorUInt3,
-        VectorUInt4,
-        VectorUInt
-    );
-    new_typed_vector!(
-        new_float_vector,
-        VectorFloat2,
-        VectorFloat3,
-        VectorFloat4,
-        VectorFloat
-    );
+    new_typed_vector!(new_int_vector, VectorInt2, VectorInt3, VectorInt4, VectorInt);
+    new_typed_vector!(new_uint_vector, VectorUInt2, VectorUInt3, VectorUInt4, VectorUInt);
+    new_typed_vector!(new_float_vector, VectorFloat2, VectorFloat3, VectorFloat4, VectorFloat);
     pub fn fxb_type(&self) -> FlexBufferType {
         match *self {
             Value::Null => Null,
@@ -264,11 +222,7 @@
         // Note that VectorString is deprecated for writing
         _ => return Value::new_vector(),
     };
-    Value::Reference {
-        address: 0,
-        child_width: W8,
-        fxb_type: vector_type,
-    }
+    Value::Reference { address: 0, child_width: W8, fxb_type: vector_type }
 }
 
 #[inline]
@@ -299,9 +253,6 @@
         _ => unreachable!("Variant not considered: {:?}", value),
     };
     write_result.unwrap_or_else(|err| {
-        panic!(
-            "Error writing value {:?} with width {:?}: {:?}",
-            value, width, err
-        )
+        panic!("Error writing value {:?} with width {:?}: {:?}", value, width, err)
     });
 }
diff --git a/rust/flexbuffers/src/builder/vector.rs b/rust/flexbuffers/src/builder/vector.rs
index 375d49e..98123da 100644
--- a/rust/flexbuffers/src/builder/vector.rs
+++ b/rust/flexbuffers/src/builder/vector.rs
@@ -38,19 +38,13 @@
     #[inline]
     pub fn start_vector(&mut self) -> VectorBuilder {
         let start = Some(self.builder.values.len());
-        VectorBuilder {
-            builder: self.builder,
-            start,
-        }
+        VectorBuilder { builder: self.builder, start }
     }
     /// Starts a nested map that will be pushed onto this vector when it is dropped.
     #[inline]
     pub fn start_map(&mut self) -> MapBuilder {
         let start = Some(self.builder.values.len());
-        MapBuilder {
-            builder: self.builder,
-            start,
-        }
+        MapBuilder { builder: self.builder, start }
     }
     /// `end_vector` determines the type of the vector and writes it to the buffer.
     /// This will happen automatically if the VectorBuilder is dropped.
diff --git a/rust/flexbuffers/src/reader/de.rs b/rust/flexbuffers/src/reader/de.rs
index ed2b815..6213916 100644
--- a/rust/flexbuffers/src/reader/de.rs
+++ b/rust/flexbuffers/src/reader/de.rs
@@ -153,10 +153,7 @@
         V: Visitor<'de>,
     {
         let m = self.get_map()?;
-        visitor.visit_map(MapAccessor {
-            keys: m.keys_vector().iter(),
-            vals: m.iter_values(),
-        })
+        visitor.visit_map(MapAccessor { keys: m.keys_vector().iter(), vals: m.iter_values() })
     }
 }
 
@@ -190,10 +187,8 @@
             (Blob, _) => visitor.visit_borrowed_bytes(self.get_blob()?.0),
             (Map, _) => {
                 let m = self.get_map()?;
-                visitor.visit_map(MapAccessor {
-                    keys: m.keys_vector().iter(),
-                    vals: m.iter_values(),
-                })
+                visitor
+                    .visit_map(MapAccessor { keys: m.keys_vector().iter(), vals: m.iter_values() })
             }
             (ty, _) if ty.is_vector() => visitor.visit_seq(self.as_vector().iter()),
             (ty, bw) => unreachable!("TODO deserialize_any {:?} {:?}.", ty, bw),
diff --git a/rust/flexbuffers/src/reader/iter.rs b/rust/flexbuffers/src/reader/iter.rs
index 267a01f..e1c2574 100644
--- a/rust/flexbuffers/src/reader/iter.rs
+++ b/rust/flexbuffers/src/reader/iter.rs
@@ -27,11 +27,7 @@
 impl<B: Buffer> ReaderIterator<B> {
     pub(super) fn new(reader: VectorReader<B>) -> Self {
         let end = reader.len();
-        ReaderIterator {
-            reader,
-            front: 0,
-            end,
-        }
+        ReaderIterator { reader, front: 0, end }
     }
 }
 
diff --git a/rust/flexbuffers/src/reader/map.rs b/rust/flexbuffers/src/reader/map.rs
index 7d6ada8..967509e 100644
--- a/rust/flexbuffers/src/reader/map.rs
+++ b/rust/flexbuffers/src/reader/map.rs
@@ -34,10 +34,7 @@
 
 impl<B: Buffer> Clone for MapReader<B> {
     fn clone(&self) -> Self {
-        MapReader {
-            buffer: self.buffer.shallow_copy(),
-            ..*self
-        }
+        MapReader { buffer: self.buffer.shallow_copy(), ..*self }
     }
 }
 
@@ -125,13 +122,7 @@
             .get(type_address)
             .ok_or(Error::FlexbufferOutOfBounds)
             .and_then(|&b| unpack_type(b))?;
-        Reader::new(
-            self.buffer.shallow_copy(),
-            data_address,
-            fxb_type,
-            width,
-            self.values_width,
-        )
+        Reader::new(self.buffer.shallow_copy(), data_address, fxb_type, width, self.values_width)
     }
 
     fn key_index(&self, k: &str) -> Result<Reader<B>, Error> {
diff --git a/rust/flexbuffers/src/reader/mod.rs b/rust/flexbuffers/src/reader/mod.rs
index 8e9c247..ddf4951 100644
--- a/rust/flexbuffers/src/reader/mod.rs
+++ b/rust/flexbuffers/src/reader/mod.rs
@@ -217,12 +217,7 @@
                 fxb_type = t;
             }
         }
-        Ok(Reader {
-            address,
-            fxb_type,
-            width,
-            buffer,
-        })
+        Ok(Reader { address, fxb_type, width, buffer })
     }
 
     /// Parses the flexbuffer from the given buffer. Assumes the flexbuffer root is the last byte
@@ -263,11 +258,7 @@
         if let Some(len) = self.fxb_type.fixed_length_vector_length() {
             len
         } else if self.fxb_type.has_length_slot() && self.address >= self.width.n_bytes() {
-            read_usize(
-                &self.buffer,
-                self.address - self.width.n_bytes(),
-                self.width,
-            )
+            read_usize(&self.buffer, self.address - self.width.n_bytes(), self.width)
         } else {
             0
         }
@@ -287,20 +278,14 @@
         if self.fxb_type == ty {
             Ok(())
         } else {
-            Err(Error::UnexpectedFlexbufferType {
-                expected: ty,
-                actual: self.fxb_type,
-            })
+            Err(Error::UnexpectedFlexbufferType { expected: ty, actual: self.fxb_type })
         }
     }
     fn expect_bw(&self, bw: BitWidth) -> Result<(), Error> {
         if self.width == bw {
             Ok(())
         } else {
-            Err(Error::UnexpectedBitWidth {
-                expected: bw,
-                actual: self.width,
-            })
+            Err(Error::UnexpectedBitWidth { expected: bw, actual: self.width })
         }
     }
 
@@ -320,10 +305,8 @@
             self.expect_bw(T::WIDTH)?;
         }
         let end = self.address + self.length() * std::mem::size_of::<T>();
-        let slice: &[u8] = self
-            .buffer
-            .get(self.address..end)
-            .ok_or(Error::FlexbufferOutOfBounds)?;
+        let slice: &[u8] =
+            self.buffer.get(self.address..end).ok_or(Error::FlexbufferOutOfBounds)?;
 
         // `align_to` is required because the point of this function is to directly hand back a
         // slice of scalars. This can fail because Rust's default allocator is not 16byte aligned
@@ -340,11 +323,7 @@
     /// Otherwise Returns error.
     pub fn get_bool(&self) -> Result<bool, Error> {
         self.expect_type(FlexBufferType::Bool)?;
-        Ok(
-            self.buffer[self.address..self.address + self.width.n_bytes()]
-                .iter()
-                .any(|&b| b != 0),
-        )
+        Ok(self.buffer[self.address..self.address + self.width.n_bytes()].iter().any(|&b| b != 0))
     }
 
     /// Gets the length of the key if this type is a key.
@@ -387,9 +366,7 @@
     /// is out of bounds.
     pub fn get_str(&self) -> Result<B::BufferString, Error> {
         self.expect_type(FlexBufferType::String)?;
-        let bytes = self
-            .buffer
-            .slice(self.address..self.address + self.length());
+        let bytes = self.buffer.slice(self.address..self.address + self.length());
         Ok(bytes.ok_or(Error::ReadUsizeOverflowed)?.buffer_str()?)
     }
 
@@ -425,22 +402,16 @@
     /// address is out of bounds.
     pub fn get_u64(&self) -> Result<u64, Error> {
         self.expect_type(FlexBufferType::UInt)?;
-        let cursor = self
-            .buffer
-            .get(self.address..self.address + self.width.n_bytes());
+        let cursor = self.buffer.get(self.address..self.address + self.width.n_bytes());
         match self.width {
             BitWidth::W8 => cursor.map(|s| s[0] as u8).map(Into::into),
-            BitWidth::W16 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<u16>::from_le_bytes)
-                .map(Into::into),
-            BitWidth::W32 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<u32>::from_le_bytes)
-                .map(Into::into),
-            BitWidth::W64 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<u64>::from_le_bytes),
+            BitWidth::W16 => {
+                cursor.and_then(|s| s.try_into().ok()).map(<u16>::from_le_bytes).map(Into::into)
+            }
+            BitWidth::W32 => {
+                cursor.and_then(|s| s.try_into().ok()).map(<u32>::from_le_bytes).map(Into::into)
+            }
+            BitWidth::W64 => cursor.and_then(|s| s.try_into().ok()).map(<u64>::from_le_bytes),
         }
         .ok_or(Error::FlexbufferOutOfBounds)
     }
@@ -448,22 +419,16 @@
     /// address is out of bounds.
     pub fn get_i64(&self) -> Result<i64, Error> {
         self.expect_type(FlexBufferType::Int)?;
-        let cursor = self
-            .buffer
-            .get(self.address..self.address + self.width.n_bytes());
+        let cursor = self.buffer.get(self.address..self.address + self.width.n_bytes());
         match self.width {
             BitWidth::W8 => cursor.map(|s| s[0] as i8).map(Into::into),
-            BitWidth::W16 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<i16>::from_le_bytes)
-                .map(Into::into),
-            BitWidth::W32 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<i32>::from_le_bytes)
-                .map(Into::into),
-            BitWidth::W64 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(<i64>::from_le_bytes),
+            BitWidth::W16 => {
+                cursor.and_then(|s| s.try_into().ok()).map(<i16>::from_le_bytes).map(Into::into)
+            }
+            BitWidth::W32 => {
+                cursor.and_then(|s| s.try_into().ok()).map(<i32>::from_le_bytes).map(Into::into)
+            }
+            BitWidth::W64 => cursor.and_then(|s| s.try_into().ok()).map(<i64>::from_le_bytes),
         }
         .ok_or(Error::FlexbufferOutOfBounds)
     }
@@ -471,18 +436,13 @@
     /// address is out of bounds, or if its a f16 or f8 (not currently supported).
     pub fn get_f64(&self) -> Result<f64, Error> {
         self.expect_type(FlexBufferType::Float)?;
-        let cursor = self
-            .buffer
-            .get(self.address..self.address + self.width.n_bytes());
+        let cursor = self.buffer.get(self.address..self.address + self.width.n_bytes());
         match self.width {
             BitWidth::W8 | BitWidth::W16 => return Err(Error::InvalidPackedType),
-            BitWidth::W32 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(f32_from_le_bytes)
-                .map(Into::into),
-            BitWidth::W64 => cursor
-                .and_then(|s| s.try_into().ok())
-                .map(f64_from_le_bytes),
+            BitWidth::W32 => {
+                cursor.and_then(|s| s.try_into().ok()).map(f32_from_le_bytes).map(Into::into)
+            }
+            BitWidth::W64 => cursor.and_then(|s| s.try_into().ok()).map(f64_from_le_bytes),
         }
         .ok_or(Error::FlexbufferOutOfBounds)
     }
@@ -505,11 +465,9 @@
     pub fn as_u64(&self) -> u64 {
         match self.fxb_type {
             FlexBufferType::UInt => self.get_u64().unwrap_or_default(),
-            FlexBufferType::Int => self
-                .get_i64()
-                .unwrap_or_default()
-                .try_into()
-                .unwrap_or_default(),
+            FlexBufferType::Int => {
+                self.get_i64().unwrap_or_default().try_into().unwrap_or_default()
+            }
             FlexBufferType::Float => self.get_f64().unwrap_or_default() as u64,
             FlexBufferType::String => {
                 if let Ok(s) = self.get_str() {
@@ -532,11 +490,9 @@
     pub fn as_i64(&self) -> i64 {
         match self.fxb_type {
             FlexBufferType::Int => self.get_i64().unwrap_or_default(),
-            FlexBufferType::UInt => self
-                .get_u64()
-                .unwrap_or_default()
-                .try_into()
-                .unwrap_or_default(),
+            FlexBufferType::UInt => {
+                self.get_u64().unwrap_or_default().try_into().unwrap_or_default()
+            }
             FlexBufferType::Float => self.get_f64().unwrap_or_default() as i64,
             FlexBufferType::String => {
                 if let Ok(s) = self.get_str() {
@@ -590,10 +546,7 @@
         if !self.fxb_type.is_vector() {
             self.expect_type(FlexBufferType::Vector)?;
         };
-        Ok(VectorReader {
-            reader: self.clone(),
-            length: self.length(),
-        })
+        Ok(VectorReader { reader: self.clone(), length: self.length() })
     }
 }
 
diff --git a/rust/flexbuffers/src/reader/vector.rs b/rust/flexbuffers/src/reader/vector.rs
index 6b97e10..f96cc36 100644
--- a/rust/flexbuffers/src/reader/vector.rs
+++ b/rust/flexbuffers/src/reader/vector.rs
@@ -29,19 +29,13 @@
 
 impl<B: Buffer> Clone for VectorReader<B> {
     fn clone(&self) -> Self {
-        VectorReader {
-            reader: self.reader.clone(),
-            ..*self
-        }
+        VectorReader { reader: self.reader.clone(), ..*self }
     }
 }
 
 impl<B: Buffer> Default for VectorReader<B> {
     fn default() -> Self {
-        VectorReader {
-            reader: Reader::default(),
-            length: usize::default(),
-        }
+        VectorReader { reader: Reader::default(), length: usize::default() }
     }
 }
 
diff --git a/rust/reflection/src/lib.rs b/rust/reflection/src/lib.rs
index f2ef413..db1f399 100644
--- a/rust/reflection/src/lib.rs
+++ b/rust/reflection/src/lib.rs
@@ -84,12 +84,7 @@
     if size_of::<T>() != get_type_size(field.type_().base_type()) {
         return Err(FlatbufferError::FieldTypeMismatch(
             std::any::type_name::<T>().to_string(),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -109,12 +104,7 @@
     if size_of::<T>() != get_type_size(field.type_().base_type()) {
         return Err(FlatbufferError::FieldTypeMismatch(
             std::any::type_name::<T>().to_string(),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -134,12 +124,7 @@
     if field.type_().base_type() != BaseType::String {
         return Err(FlatbufferError::FieldTypeMismatch(
             String::from("String"),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -160,12 +145,7 @@
     if field.type_().base_type() != BaseType::Obj {
         return Err(FlatbufferError::FieldTypeMismatch(
             String::from("Obj"),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -186,12 +166,7 @@
     {
         return Err(FlatbufferError::FieldTypeMismatch(
             std::any::type_name::<T>().to_string(),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -210,12 +185,7 @@
     if field.type_().base_type() != BaseType::Obj {
         return Err(FlatbufferError::FieldTypeMismatch(
             String::from("Obj"),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -282,12 +252,7 @@
     if field.type_().base_type() != BaseType::Obj {
         return Err(FlatbufferError::FieldTypeMismatch(
             String::from("Obj"),
-            field
-                .type_()
-                .base_type()
-                .variant_name()
-                .unwrap_or_default()
-                .to_string(),
+            field.type_().base_type().variant_name().unwrap_or_default().to_string(),
         ));
     }
 
@@ -442,15 +407,13 @@
     };
 
     if buf.len() < field_loc.saturating_add(get_type_size(field_type)) {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: field_loc,
-                    end: field_loc.saturating_add(get_type_size(field_type)),
-                },
-                error_trace: Default::default(),
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: field_loc,
+                end: field_loc.saturating_add(get_type_size(field_type)),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
 
     // SAFETY: the buffer range was verified above.
@@ -488,49 +451,37 @@
     };
 
     if buf.len() < field_loc + get_type_size(field_type) {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: field_loc,
-                    end: field_loc.saturating_add(get_type_size(field_type)),
-                },
-                error_trace: Default::default(),
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: field_loc,
+                end: field_loc.saturating_add(get_type_size(field_type)),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
 
     // SAFETY: the buffer range was verified above.
     let string_loc = unsafe { deref_uoffset(buf, field_loc)? };
     if buf.len() < string_loc.saturating_add(SIZE_UOFFSET) {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: string_loc,
-                    end: string_loc.saturating_add(SIZE_UOFFSET),
-                },
-                error_trace: Default::default(),
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: string_loc,
+                end: string_loc.saturating_add(SIZE_UOFFSET),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
 
     // SAFETY: the buffer range was verified above.
     let len_old = unsafe { read_uoffset(buf, string_loc) };
-    if buf.len()
-        < string_loc
-            .saturating_add(SIZE_UOFFSET)
-            .saturating_add(len_old.try_into()?)
-    {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: string_loc,
-                    end: string_loc
-                        .saturating_add(SIZE_UOFFSET)
-                        .saturating_add(len_old.try_into()?),
-                },
-                error_trace: Default::default(),
+    if buf.len() < string_loc.saturating_add(SIZE_UOFFSET).saturating_add(len_old.try_into()?) {
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: string_loc,
+                end: string_loc.saturating_add(SIZE_UOFFSET).saturating_add(len_old.try_into()?),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
 
     let len_new = v.len();
@@ -628,9 +579,7 @@
         BaseType::ULong => i64::from_u64(u64::follow(buf, loc)),
         BaseType::Float => i64::from_f32(f32::follow(buf, loc)),
         BaseType::Double => i64::from_f64(f64::follow(buf, loc)),
-        BaseType::String => ForwardsUOffset::<&str>::follow(buf, loc)
-            .parse::<i64>()
-            .ok(),
+        BaseType::String => ForwardsUOffset::<&str>::follow(buf, loc).parse::<i64>().ok(),
         _ => None, // Tables & vectors do not make sense.
     }
     .ok_or(FlatbufferError::FieldTypeMismatch(
@@ -661,9 +610,7 @@
         BaseType::ULong => f64::from_u64(u64::follow(buf, loc)),
         BaseType::Float => f64::from_f32(f32::follow(buf, loc)),
         BaseType::Double => Some(f64::follow(buf, loc)),
-        BaseType::String => ForwardsUOffset::<&str>::follow(buf, loc)
-            .parse::<f64>()
-            .ok(),
+        BaseType::String => ForwardsUOffset::<&str>::follow(buf, loc).parse::<f64>().ok(),
         _ => None,
     }
     .ok_or(FlatbufferError::FieldTypeMismatch(
@@ -685,9 +632,9 @@
     type_index: usize,
 ) -> String {
     match base_type {
-        BaseType::Float | BaseType::Double => get_any_value_float(base_type, buf, loc)
-            .unwrap_or_default()
-            .to_string(),
+        BaseType::Float | BaseType::Double => {
+            get_any_value_float(base_type, buf, loc).unwrap_or_default().to_string()
+        }
         BaseType::String => {
             String::from_utf8_lossy(ForwardsUOffset::<&[u8]>::follow(buf, loc)).to_string()
         }
@@ -728,9 +675,7 @@
         }
         BaseType::Vector => String::from("[(elements)]"), // TODO inherited from C++: implement this as well.
         BaseType::Union => String::from("(union)"), // TODO inherited from C++: implement this as well.
-        _ => get_any_value_integer(base_type, buf, loc)
-            .unwrap_or_default()
-            .to_string(),
+        _ => get_any_value_integer(base_type, buf, loc).unwrap_or_default().to_string(),
     }
 }
 
@@ -742,15 +687,13 @@
     v: i64,
 ) -> FlatbufferResult<()> {
     if buf.len() < get_type_size(base_type) {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: field_loc,
-                    end: field_loc.saturating_add(get_type_size(base_type)),
-                },
-                error_trace: Default::default(),
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: field_loc,
+                end: field_loc.saturating_add(get_type_size(base_type)),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
     let buf = &mut buf[field_loc..];
     let type_name = base_type.variant_name().unwrap_or_default().to_string();
@@ -761,10 +704,7 @@
                 // SAFETY: buffer size is verified at the beginning of this function.
                 unsafe { Ok(emplace_scalar::<$ty>(buf, v)) }
             } else {
-                Err(FlatbufferError::FieldTypeMismatch(
-                    String::from("i64"),
-                    type_name,
-                ))
+                Err(FlatbufferError::FieldTypeMismatch(String::from("i64"), type_name))
             }
         };
     }
@@ -804,10 +744,7 @@
                 // SAFETY: buffer size is verified at the beginning of this function.
                 unsafe { Ok(emplace_scalar::<f32>(buf, value)) }
             } else {
-                Err(FlatbufferError::FieldTypeMismatch(
-                    String::from("i64"),
-                    type_name,
-                ))
+                Err(FlatbufferError::FieldTypeMismatch(String::from("i64"), type_name))
             }
         }
         BaseType::Double => {
@@ -815,10 +752,7 @@
                 // SAFETY: buffer size is verified at the beginning of this function.
                 unsafe { Ok(emplace_scalar::<f64>(buf, value)) }
             } else {
-                Err(FlatbufferError::FieldTypeMismatch(
-                    String::from("i64"),
-                    type_name,
-                ))
+                Err(FlatbufferError::FieldTypeMismatch(String::from("i64"), type_name))
             }
         }
         _ => Err(FlatbufferError::SetValueNotSupported),
@@ -833,15 +767,13 @@
     v: f64,
 ) -> FlatbufferResult<()> {
     if buf.len() < get_type_size(base_type) {
-        return Err(FlatbufferError::VerificationError(
-            InvalidFlatbuffer::RangeOutOfBounds {
-                range: core::ops::Range {
-                    start: field_loc,
-                    end: field_loc.saturating_add(get_type_size(base_type)),
-                },
-                error_trace: Default::default(),
+        return Err(FlatbufferError::VerificationError(InvalidFlatbuffer::RangeOutOfBounds {
+            range: core::ops::Range {
+                start: field_loc,
+                end: field_loc.saturating_add(get_type_size(base_type)),
             },
-        ));
+            error_trace: Default::default(),
+        }));
     }
     let buf = &mut buf[field_loc..];
     let type_name = base_type.variant_name().unwrap_or_default().to_string();
@@ -936,10 +868,7 @@
         }
         _ => return Err(FlatbufferError::SetValueNotSupported),
     }
-    return Err(FlatbufferError::FieldTypeMismatch(
-        String::from("f64"),
-        type_name,
-    ));
+    return Err(FlatbufferError::FieldTypeMismatch(String::from("f64"), type_name));
 }
 
 fn is_scalar(base_type: BaseType) -> bool {
@@ -1002,10 +931,7 @@
         }
 
         if field_type == BaseType::Obj
-            && schema
-                .objects()
-                .get(field.type_().index().try_into()?)
-                .is_struct()
+            && schema.objects().get(field.type_().index().try_into()?).is_struct()
         {
             continue;
         }
@@ -1041,10 +967,7 @@
                     continue;
                 }
                 if elem_type == BaseType::Obj
-                    && schema
-                        .objects()
-                        .get(field.type_().index().try_into()?)
-                        .is_struct()
+                    && schema.objects().get(field.type_().index().try_into()?).is_struct()
                 {
                     continue;
                 }
diff --git a/rust/reflection/src/reflection_generated.rs b/rust/reflection/src/reflection_generated.rs
index 84581e8..c89c77d 100644
--- a/rust/reflection/src/reflection_generated.rs
+++ b/rust/reflection/src/reflection_generated.rs
@@ -1,10 +1,9 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-
 // @generated
 
-use core::mem;
 use core::cmp::Ordering;
+use core::mem;
 
 extern crate flatbuffers;
 use self::flatbuffers::{EndianScalar, Follow};
@@ -12,2274 +11,2882 @@
 #[allow(unused_imports, dead_code)]
 pub mod reflection {
 
-  use core::mem;
-  use core::cmp::Ordering;
+    use core::cmp::Ordering;
+    use core::mem;
 
-  extern crate flatbuffers;
-  use self::flatbuffers::{EndianScalar, Follow};
+    extern crate flatbuffers;
+    use self::flatbuffers::{EndianScalar, Follow};
 
-#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
-pub const ENUM_MIN_BASE_TYPE: i8 = 0;
-#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
-pub const ENUM_MAX_BASE_TYPE: i8 = 19;
-#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
-#[allow(non_camel_case_types)]
-pub const ENUM_VALUES_BASE_TYPE: [BaseType; 20] = [
-  BaseType::None,
-  BaseType::UType,
-  BaseType::Bool,
-  BaseType::Byte,
-  BaseType::UByte,
-  BaseType::Short,
-  BaseType::UShort,
-  BaseType::Int,
-  BaseType::UInt,
-  BaseType::Long,
-  BaseType::ULong,
-  BaseType::Float,
-  BaseType::Double,
-  BaseType::String,
-  BaseType::Vector,
-  BaseType::Obj,
-  BaseType::Union,
-  BaseType::Array,
-  BaseType::Vector64,
-  BaseType::MaxBaseType,
-];
+    #[deprecated(
+        since = "2.0.0",
+        note = "Use associated constants instead. This will no longer be generated in 2021."
+    )]
+    pub const ENUM_MIN_BASE_TYPE: i8 = 0;
+    #[deprecated(
+        since = "2.0.0",
+        note = "Use associated constants instead. This will no longer be generated in 2021."
+    )]
+    pub const ENUM_MAX_BASE_TYPE: i8 = 19;
+    #[deprecated(
+        since = "2.0.0",
+        note = "Use associated constants instead. This will no longer be generated in 2021."
+    )]
+    #[allow(non_camel_case_types)]
+    pub const ENUM_VALUES_BASE_TYPE: [BaseType; 20] = [
+        BaseType::None,
+        BaseType::UType,
+        BaseType::Bool,
+        BaseType::Byte,
+        BaseType::UByte,
+        BaseType::Short,
+        BaseType::UShort,
+        BaseType::Int,
+        BaseType::UInt,
+        BaseType::Long,
+        BaseType::ULong,
+        BaseType::Float,
+        BaseType::Double,
+        BaseType::String,
+        BaseType::Vector,
+        BaseType::Obj,
+        BaseType::Union,
+        BaseType::Array,
+        BaseType::Vector64,
+        BaseType::MaxBaseType,
+    ];
 
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
-#[repr(transparent)]
-pub struct BaseType(pub i8);
-#[allow(non_upper_case_globals)]
-impl BaseType {
-  pub const None: Self = Self(0);
-  pub const UType: Self = Self(1);
-  pub const Bool: Self = Self(2);
-  pub const Byte: Self = Self(3);
-  pub const UByte: Self = Self(4);
-  pub const Short: Self = Self(5);
-  pub const UShort: Self = Self(6);
-  pub const Int: Self = Self(7);
-  pub const UInt: Self = Self(8);
-  pub const Long: Self = Self(9);
-  pub const ULong: Self = Self(10);
-  pub const Float: Self = Self(11);
-  pub const Double: Self = Self(12);
-  pub const String: Self = Self(13);
-  pub const Vector: Self = Self(14);
-  pub const Obj: Self = Self(15);
-  pub const Union: Self = Self(16);
-  pub const Array: Self = Self(17);
-  pub const Vector64: Self = Self(18);
-  pub const MaxBaseType: Self = Self(19);
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
+    #[repr(transparent)]
+    pub struct BaseType(pub i8);
+    #[allow(non_upper_case_globals)]
+    impl BaseType {
+        pub const None: Self = Self(0);
+        pub const UType: Self = Self(1);
+        pub const Bool: Self = Self(2);
+        pub const Byte: Self = Self(3);
+        pub const UByte: Self = Self(4);
+        pub const Short: Self = Self(5);
+        pub const UShort: Self = Self(6);
+        pub const Int: Self = Self(7);
+        pub const UInt: Self = Self(8);
+        pub const Long: Self = Self(9);
+        pub const ULong: Self = Self(10);
+        pub const Float: Self = Self(11);
+        pub const Double: Self = Self(12);
+        pub const String: Self = Self(13);
+        pub const Vector: Self = Self(14);
+        pub const Obj: Self = Self(15);
+        pub const Union: Self = Self(16);
+        pub const Array: Self = Self(17);
+        pub const Vector64: Self = Self(18);
+        pub const MaxBaseType: Self = Self(19);
 
-  pub const ENUM_MIN: i8 = 0;
-  pub const ENUM_MAX: i8 = 19;
-  pub const ENUM_VALUES: &'static [Self] = &[
-    Self::None,
-    Self::UType,
-    Self::Bool,
-    Self::Byte,
-    Self::UByte,
-    Self::Short,
-    Self::UShort,
-    Self::Int,
-    Self::UInt,
-    Self::Long,
-    Self::ULong,
-    Self::Float,
-    Self::Double,
-    Self::String,
-    Self::Vector,
-    Self::Obj,
-    Self::Union,
-    Self::Array,
-    Self::Vector64,
-    Self::MaxBaseType,
-  ];
-  /// Returns the variant's name or "" if unknown.
-  pub fn variant_name(self) -> Option<&'static str> {
-    match self {
-      Self::None => Some("None"),
-      Self::UType => Some("UType"),
-      Self::Bool => Some("Bool"),
-      Self::Byte => Some("Byte"),
-      Self::UByte => Some("UByte"),
-      Self::Short => Some("Short"),
-      Self::UShort => Some("UShort"),
-      Self::Int => Some("Int"),
-      Self::UInt => Some("UInt"),
-      Self::Long => Some("Long"),
-      Self::ULong => Some("ULong"),
-      Self::Float => Some("Float"),
-      Self::Double => Some("Double"),
-      Self::String => Some("String"),
-      Self::Vector => Some("Vector"),
-      Self::Obj => Some("Obj"),
-      Self::Union => Some("Union"),
-      Self::Array => Some("Array"),
-      Self::Vector64 => Some("Vector64"),
-      Self::MaxBaseType => Some("MaxBaseType"),
-      _ => None,
+        pub const ENUM_MIN: i8 = 0;
+        pub const ENUM_MAX: i8 = 19;
+        pub const ENUM_VALUES: &'static [Self] = &[
+            Self::None,
+            Self::UType,
+            Self::Bool,
+            Self::Byte,
+            Self::UByte,
+            Self::Short,
+            Self::UShort,
+            Self::Int,
+            Self::UInt,
+            Self::Long,
+            Self::ULong,
+            Self::Float,
+            Self::Double,
+            Self::String,
+            Self::Vector,
+            Self::Obj,
+            Self::Union,
+            Self::Array,
+            Self::Vector64,
+            Self::MaxBaseType,
+        ];
+        /// Returns the variant's name or "" if unknown.
+        pub fn variant_name(self) -> Option<&'static str> {
+            match self {
+                Self::None => Some("None"),
+                Self::UType => Some("UType"),
+                Self::Bool => Some("Bool"),
+                Self::Byte => Some("Byte"),
+                Self::UByte => Some("UByte"),
+                Self::Short => Some("Short"),
+                Self::UShort => Some("UShort"),
+                Self::Int => Some("Int"),
+                Self::UInt => Some("UInt"),
+                Self::Long => Some("Long"),
+                Self::ULong => Some("ULong"),
+                Self::Float => Some("Float"),
+                Self::Double => Some("Double"),
+                Self::String => Some("String"),
+                Self::Vector => Some("Vector"),
+                Self::Obj => Some("Obj"),
+                Self::Union => Some("Union"),
+                Self::Array => Some("Array"),
+                Self::Vector64 => Some("Vector64"),
+                Self::MaxBaseType => Some("MaxBaseType"),
+                _ => None,
+            }
+        }
     }
-  }
-}
-impl core::fmt::Debug for BaseType {
-  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
-    if let Some(name) = self.variant_name() {
-      f.write_str(name)
-    } else {
-      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
+    impl core::fmt::Debug for BaseType {
+        fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
+            if let Some(name) = self.variant_name() {
+                f.write_str(name)
+            } else {
+                f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
+            }
+        }
     }
-  }
-}
-impl<'a> flatbuffers::Follow<'a> for BaseType {
-  type Inner = Self;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
-    Self(b)
-  }
-}
+    impl<'a> flatbuffers::Follow<'a> for BaseType {
+        type Inner = Self;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
+            Self(b)
+        }
+    }
 
-impl flatbuffers::Push for BaseType {
-    type Output = BaseType;
+    impl flatbuffers::Push for BaseType {
+        type Output = BaseType;
+        #[inline]
+        unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
+            flatbuffers::emplace_scalar::<i8>(dst, self.0);
+        }
+    }
+
+    impl flatbuffers::EndianScalar for BaseType {
+        type Scalar = i8;
+        #[inline]
+        fn to_little_endian(self) -> i8 {
+            self.0.to_le()
+        }
+        #[inline]
+        #[allow(clippy::wrong_self_convention)]
+        fn from_little_endian(v: i8) -> Self {
+            let b = i8::from_le(v);
+            Self(b)
+        }
+    }
+
+    impl<'a> flatbuffers::Verifiable for BaseType {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            i8::run_verifier(v, pos)
+        }
+    }
+
+    impl flatbuffers::SimpleToVerifyInSlice for BaseType {}
+    #[allow(non_upper_case_globals)]
+    mod bitflags_advanced_features {
+        flatbuffers::bitflags::bitflags! {
+          /// New schema language features that are not supported by old code generators.
+          #[derive(Default, Debug, Clone, Copy, PartialEq)]
+          pub struct AdvancedFeatures: u64 {
+            const AdvancedArrayFeatures = 1;
+            const AdvancedUnionFeatures = 2;
+            const OptionalScalars = 4;
+            const DefaultVectorsAndStrings = 8;
+          }
+        }
+    }
+    pub use self::bitflags_advanced_features::AdvancedFeatures;
+
+    impl<'a> flatbuffers::Follow<'a> for AdvancedFeatures {
+        type Inner = Self;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            let b = flatbuffers::read_scalar_at::<u64>(buf, loc);
+            Self::from_bits_retain(b)
+        }
+    }
+
+    impl flatbuffers::Push for AdvancedFeatures {
+        type Output = AdvancedFeatures;
+        #[inline]
+        unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
+            flatbuffers::emplace_scalar::<u64>(dst, self.bits());
+        }
+    }
+
+    impl flatbuffers::EndianScalar for AdvancedFeatures {
+        type Scalar = u64;
+        #[inline]
+        fn to_little_endian(self) -> u64 {
+            self.bits().to_le()
+        }
+        #[inline]
+        #[allow(clippy::wrong_self_convention)]
+        fn from_little_endian(v: u64) -> Self {
+            let b = u64::from_le(v);
+            Self::from_bits_retain(b)
+        }
+    }
+
+    impl<'a> flatbuffers::Verifiable for AdvancedFeatures {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            u64::run_verifier(v, pos)
+        }
+    }
+
+    impl flatbuffers::SimpleToVerifyInSlice for AdvancedFeatures {}
+    pub enum TypeOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Type<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Type<'a> {
+        type Inner = Type<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Type<'a> {
+        pub const VT_BASE_TYPE: flatbuffers::VOffsetT = 4;
+        pub const VT_ELEMENT: flatbuffers::VOffsetT = 6;
+        pub const VT_INDEX: flatbuffers::VOffsetT = 8;
+        pub const VT_FIXED_LENGTH: flatbuffers::VOffsetT = 10;
+        pub const VT_BASE_SIZE: flatbuffers::VOffsetT = 12;
+        pub const VT_ELEMENT_SIZE: flatbuffers::VOffsetT = 14;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Type { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args TypeArgs,
+        ) -> flatbuffers::WIPOffset<Type<'bldr>> {
+            let mut builder = TypeBuilder::new(_fbb);
+            builder.add_element_size(args.element_size);
+            builder.add_base_size(args.base_size);
+            builder.add_index(args.index);
+            builder.add_fixed_length(args.fixed_length);
+            builder.add_element(args.element);
+            builder.add_base_type(args.base_type);
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn base_type(&self) -> BaseType {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<BaseType>(Type::VT_BASE_TYPE, Some(BaseType::None)).unwrap() }
+        }
+        #[inline]
+        pub fn element(&self) -> BaseType {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<BaseType>(Type::VT_ELEMENT, Some(BaseType::None)).unwrap() }
+        }
+        #[inline]
+        pub fn index(&self) -> i32 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<i32>(Type::VT_INDEX, Some(-1)).unwrap() }
+        }
+        #[inline]
+        pub fn fixed_length(&self) -> u16 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u16>(Type::VT_FIXED_LENGTH, Some(0)).unwrap() }
+        }
+        /// The size (octets) of the `base_type` field.
+        #[inline]
+        pub fn base_size(&self) -> u32 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u32>(Type::VT_BASE_SIZE, Some(4)).unwrap() }
+        }
+        /// The size (octets) of the `element` field, if present.
+        #[inline]
+        pub fn element_size(&self) -> u32 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u32>(Type::VT_ELEMENT_SIZE, Some(0)).unwrap() }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Type<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<BaseType>("base_type", Self::VT_BASE_TYPE, false)?
+                .visit_field::<BaseType>("element", Self::VT_ELEMENT, false)?
+                .visit_field::<i32>("index", Self::VT_INDEX, false)?
+                .visit_field::<u16>("fixed_length", Self::VT_FIXED_LENGTH, false)?
+                .visit_field::<u32>("base_size", Self::VT_BASE_SIZE, false)?
+                .visit_field::<u32>("element_size", Self::VT_ELEMENT_SIZE, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct TypeArgs {
+        pub base_type: BaseType,
+        pub element: BaseType,
+        pub index: i32,
+        pub fixed_length: u16,
+        pub base_size: u32,
+        pub element_size: u32,
+    }
+    impl<'a> Default for TypeArgs {
+        #[inline]
+        fn default() -> Self {
+            TypeArgs {
+                base_type: BaseType::None,
+                element: BaseType::None,
+                index: -1,
+                fixed_length: 0,
+                base_size: 4,
+                element_size: 0,
+            }
+        }
+    }
+
+    pub struct TypeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TypeBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_base_type(&mut self, base_type: BaseType) {
+            self.fbb_.push_slot::<BaseType>(Type::VT_BASE_TYPE, base_type, BaseType::None);
+        }
+        #[inline]
+        pub fn add_element(&mut self, element: BaseType) {
+            self.fbb_.push_slot::<BaseType>(Type::VT_ELEMENT, element, BaseType::None);
+        }
+        #[inline]
+        pub fn add_index(&mut self, index: i32) {
+            self.fbb_.push_slot::<i32>(Type::VT_INDEX, index, -1);
+        }
+        #[inline]
+        pub fn add_fixed_length(&mut self, fixed_length: u16) {
+            self.fbb_.push_slot::<u16>(Type::VT_FIXED_LENGTH, fixed_length, 0);
+        }
+        #[inline]
+        pub fn add_base_size(&mut self, base_size: u32) {
+            self.fbb_.push_slot::<u32>(Type::VT_BASE_SIZE, base_size, 4);
+        }
+        #[inline]
+        pub fn add_element_size(&mut self, element_size: u32) {
+            self.fbb_.push_slot::<u32>(Type::VT_ELEMENT_SIZE, element_size, 0);
+        }
+        #[inline]
+        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TypeBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            TypeBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Type<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Type<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Type");
+            ds.field("base_type", &self.base_type());
+            ds.field("element", &self.element());
+            ds.field("index", &self.index());
+            ds.field("fixed_length", &self.fixed_length());
+            ds.field("base_size", &self.base_size());
+            ds.field("element_size", &self.element_size());
+            ds.finish()
+        }
+    }
+    pub enum KeyValueOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct KeyValue<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
+        type Inner = KeyValue<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> KeyValue<'a> {
+        pub const VT_KEY: flatbuffers::VOffsetT = 4;
+        pub const VT_VALUE: flatbuffers::VOffsetT = 6;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            KeyValue { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args KeyValueArgs<'args>,
+        ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
+            let mut builder = KeyValueBuilder::new(_fbb);
+            if let Some(x) = args.value {
+                builder.add_value(x);
+            }
+            if let Some(x) = args.key {
+                builder.add_key(x);
+            }
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn key(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &KeyValue) -> bool {
+            self.key() < o.key()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.key();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn value(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None) }
+        }
+    }
+
+    impl flatbuffers::Verifiable for KeyValue<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct KeyValueArgs<'a> {
+        pub key: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub value: Option<flatbuffers::WIPOffset<&'a str>>,
+    }
+    impl<'a> Default for KeyValueArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            KeyValueArgs {
+                key: None, // required field
+                value: None,
+            }
+        }
+    }
+
+    pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
+        }
+        #[inline]
+        pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> KeyValueBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            KeyValueBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, KeyValue::VT_KEY, "key");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for KeyValue<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("KeyValue");
+            ds.field("key", &self.key());
+            ds.field("value", &self.value());
+            ds.finish()
+        }
+    }
+    pub enum EnumValOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct EnumVal<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for EnumVal<'a> {
+        type Inner = EnumVal<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> EnumVal<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_VALUE: flatbuffers::VOffsetT = 6;
+        pub const VT_UNION_TYPE: flatbuffers::VOffsetT = 10;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            EnumVal { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args EnumValArgs<'args>,
+        ) -> flatbuffers::WIPOffset<EnumVal<'bldr>> {
+            let mut builder = EnumValBuilder::new(_fbb);
+            builder.add_value(args.value);
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.union_type {
+                builder.add_union_type(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EnumVal::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn value(&self) -> i64 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<i64>(EnumVal::VT_VALUE, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &EnumVal) -> bool {
+            self.value() < o.value()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: i64) -> ::core::cmp::Ordering {
+            let key = self.value();
+            key.cmp(&val)
+        }
+        #[inline]
+        pub fn union_type(&self) -> Option<Type<'a>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<Type>>(EnumVal::VT_UNION_TYPE, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(EnumVal::VT_DOCUMENTATION, None)
+            }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(EnumVal::VT_ATTRIBUTES, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for EnumVal<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<i64>("value", Self::VT_VALUE, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<Type>>(
+                    "union_type",
+                    Self::VT_UNION_TYPE,
+                    false,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct EnumValArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub value: i64,
+        pub union_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+    }
+    impl<'a> Default for EnumValArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            EnumValArgs {
+                name: None, // required field
+                value: 0,
+                union_type: None,
+                documentation: None,
+                attributes: None,
+            }
+        }
+    }
+
+    pub struct EnumValBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EnumValBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_value(&mut self, value: i64) {
+            self.fbb_.push_slot::<i64>(EnumVal::VT_VALUE, value, 0);
+        }
+        #[inline]
+        pub fn add_union_type(&mut self, union_type: flatbuffers::WIPOffset<Type<'b>>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(
+                EnumVal::VT_UNION_TYPE,
+                union_type,
+            );
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                EnumVal::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> EnumValBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            EnumValBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<EnumVal<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, EnumVal::VT_NAME, "name");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for EnumVal<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("EnumVal");
+            ds.field("name", &self.name());
+            ds.field("value", &self.value());
+            ds.field("union_type", &self.union_type());
+            ds.field("documentation", &self.documentation());
+            ds.field("attributes", &self.attributes());
+            ds.finish()
+        }
+    }
+    pub enum EnumOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Enum<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Enum<'a> {
+        type Inner = Enum<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Enum<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_VALUES: flatbuffers::VOffsetT = 6;
+        pub const VT_IS_UNION: flatbuffers::VOffsetT = 8;
+        pub const VT_UNDERLYING_TYPE: flatbuffers::VOffsetT = 10;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 12;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 14;
+        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 16;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Enum { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args EnumArgs<'args>,
+        ) -> flatbuffers::WIPOffset<Enum<'bldr>> {
+            let mut builder = EnumBuilder::new(_fbb);
+            if let Some(x) = args.declaration_file {
+                builder.add_declaration_file(x);
+            }
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            if let Some(x) = args.underlying_type {
+                builder.add_underlying_type(x);
+            }
+            if let Some(x) = args.values {
+                builder.add_values(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.add_is_union(args.is_union);
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &Enum) -> bool {
+            self.name() < o.name()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.name();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn values(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<
+                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal>>,
+                    >>(Enum::VT_VALUES, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn is_union(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Enum::VT_IS_UNION, Some(false)).unwrap() }
+        }
+        #[inline]
+        pub fn underlying_type(&self) -> Type<'a> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<Type>>(Enum::VT_UNDERLYING_TYPE, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(Enum::VT_ATTRIBUTES, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(Enum::VT_DOCUMENTATION, None)
+            }
+        }
+        /// File that this Enum is declared in.
+        #[inline]
+        pub fn declaration_file(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_DECLARATION_FILE, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Enum<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<EnumVal>>,
+                >>("values", Self::VT_VALUES, true)?
+                .visit_field::<bool>("is_union", Self::VT_IS_UNION, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<Type>>(
+                    "underlying_type",
+                    Self::VT_UNDERLYING_TYPE,
+                    true,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "declaration_file",
+                    Self::VT_DECLARATION_FILE,
+                    false,
+                )?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct EnumArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub values: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>>,
+            >,
+        >,
+        pub is_union: bool,
+        pub underlying_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
+    }
+    impl<'a> Default for EnumArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            EnumArgs {
+                name: None,   // required field
+                values: None, // required field
+                is_union: false,
+                underlying_type: None, // required field
+                attributes: None,
+                documentation: None,
+                declaration_file: None,
+            }
+        }
+    }
+
+    pub struct EnumBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EnumBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_values(
+            &mut self,
+            values: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<EnumVal<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_VALUES, values);
+        }
+        #[inline]
+        pub fn add_is_union(&mut self, is_union: bool) {
+            self.fbb_.push_slot::<bool>(Enum::VT_IS_UNION, is_union, false);
+        }
+        #[inline]
+        pub fn add_underlying_type(&mut self, underlying_type: flatbuffers::WIPOffset<Type<'b>>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(
+                Enum::VT_UNDERLYING_TYPE,
+                underlying_type,
+            );
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Enum::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Enum::VT_DECLARATION_FILE,
+                declaration_file,
+            );
+        }
+        #[inline]
+        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EnumBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            EnumBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Enum<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, Enum::VT_NAME, "name");
+            self.fbb_.required(o, Enum::VT_VALUES, "values");
+            self.fbb_.required(o, Enum::VT_UNDERLYING_TYPE, "underlying_type");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Enum<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Enum");
+            ds.field("name", &self.name());
+            ds.field("values", &self.values());
+            ds.field("is_union", &self.is_union());
+            ds.field("underlying_type", &self.underlying_type());
+            ds.field("attributes", &self.attributes());
+            ds.field("documentation", &self.documentation());
+            ds.field("declaration_file", &self.declaration_file());
+            ds.finish()
+        }
+    }
+    pub enum FieldOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Field<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Field<'a> {
+        type Inner = Field<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Field<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_TYPE_: flatbuffers::VOffsetT = 6;
+        pub const VT_ID: flatbuffers::VOffsetT = 8;
+        pub const VT_OFFSET: flatbuffers::VOffsetT = 10;
+        pub const VT_DEFAULT_INTEGER: flatbuffers::VOffsetT = 12;
+        pub const VT_DEFAULT_REAL: flatbuffers::VOffsetT = 14;
+        pub const VT_DEPRECATED: flatbuffers::VOffsetT = 16;
+        pub const VT_REQUIRED: flatbuffers::VOffsetT = 18;
+        pub const VT_KEY: flatbuffers::VOffsetT = 20;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 22;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 24;
+        pub const VT_OPTIONAL: flatbuffers::VOffsetT = 26;
+        pub const VT_PADDING: flatbuffers::VOffsetT = 28;
+        pub const VT_OFFSET64: flatbuffers::VOffsetT = 30;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Field { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args FieldArgs<'args>,
+        ) -> flatbuffers::WIPOffset<Field<'bldr>> {
+            let mut builder = FieldBuilder::new(_fbb);
+            builder.add_default_real(args.default_real);
+            builder.add_default_integer(args.default_integer);
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            if let Some(x) = args.type_ {
+                builder.add_type_(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.add_padding(args.padding);
+            builder.add_offset(args.offset);
+            builder.add_id(args.id);
+            builder.add_offset64(args.offset64);
+            builder.add_optional(args.optional);
+            builder.add_key(args.key);
+            builder.add_required(args.required);
+            builder.add_deprecated(args.deprecated);
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Field::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &Field) -> bool {
+            self.name() < o.name()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.name();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn type_(&self) -> Type<'a> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<Type>>(Field::VT_TYPE_, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn id(&self) -> u16 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u16>(Field::VT_ID, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn offset(&self) -> u16 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u16>(Field::VT_OFFSET, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn default_integer(&self) -> i64 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<i64>(Field::VT_DEFAULT_INTEGER, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn default_real(&self) -> f64 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<f64>(Field::VT_DEFAULT_REAL, Some(0.0)).unwrap() }
+        }
+        #[inline]
+        pub fn deprecated(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Field::VT_DEPRECATED, Some(false)).unwrap() }
+        }
+        #[inline]
+        pub fn required(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Field::VT_REQUIRED, Some(false)).unwrap() }
+        }
+        #[inline]
+        pub fn key(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Field::VT_KEY, Some(false)).unwrap() }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(Field::VT_ATTRIBUTES, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(Field::VT_DOCUMENTATION, None)
+            }
+        }
+        #[inline]
+        pub fn optional(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Field::VT_OPTIONAL, Some(false)).unwrap() }
+        }
+        /// Number of padding octets to always add after this field. Structs only.
+        #[inline]
+        pub fn padding(&self) -> u16 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<u16>(Field::VT_PADDING, Some(0)).unwrap() }
+        }
+        /// If the field uses 64-bit offsets.
+        #[inline]
+        pub fn offset64(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Field::VT_OFFSET64, Some(false)).unwrap() }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Field<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<Type>>("type_", Self::VT_TYPE_, true)?
+                .visit_field::<u16>("id", Self::VT_ID, false)?
+                .visit_field::<u16>("offset", Self::VT_OFFSET, false)?
+                .visit_field::<i64>("default_integer", Self::VT_DEFAULT_INTEGER, false)?
+                .visit_field::<f64>("default_real", Self::VT_DEFAULT_REAL, false)?
+                .visit_field::<bool>("deprecated", Self::VT_DEPRECATED, false)?
+                .visit_field::<bool>("required", Self::VT_REQUIRED, false)?
+                .visit_field::<bool>("key", Self::VT_KEY, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .visit_field::<bool>("optional", Self::VT_OPTIONAL, false)?
+                .visit_field::<u16>("padding", Self::VT_PADDING, false)?
+                .visit_field::<bool>("offset64", Self::VT_OFFSET64, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct FieldArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub type_: Option<flatbuffers::WIPOffset<Type<'a>>>,
+        pub id: u16,
+        pub offset: u16,
+        pub default_integer: i64,
+        pub default_real: f64,
+        pub deprecated: bool,
+        pub required: bool,
+        pub key: bool,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+        pub optional: bool,
+        pub padding: u16,
+        pub offset64: bool,
+    }
+    impl<'a> Default for FieldArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            FieldArgs {
+                name: None,  // required field
+                type_: None, // required field
+                id: 0,
+                offset: 0,
+                default_integer: 0,
+                default_real: 0.0,
+                deprecated: false,
+                required: false,
+                key: false,
+                attributes: None,
+                documentation: None,
+                optional: false,
+                padding: 0,
+                offset64: false,
+            }
+        }
+    }
+
+    pub struct FieldBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FieldBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<Type<'b>>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(Field::VT_TYPE_, type_);
+        }
+        #[inline]
+        pub fn add_id(&mut self, id: u16) {
+            self.fbb_.push_slot::<u16>(Field::VT_ID, id, 0);
+        }
+        #[inline]
+        pub fn add_offset(&mut self, offset: u16) {
+            self.fbb_.push_slot::<u16>(Field::VT_OFFSET, offset, 0);
+        }
+        #[inline]
+        pub fn add_default_integer(&mut self, default_integer: i64) {
+            self.fbb_.push_slot::<i64>(Field::VT_DEFAULT_INTEGER, default_integer, 0);
+        }
+        #[inline]
+        pub fn add_default_real(&mut self, default_real: f64) {
+            self.fbb_.push_slot::<f64>(Field::VT_DEFAULT_REAL, default_real, 0.0);
+        }
+        #[inline]
+        pub fn add_deprecated(&mut self, deprecated: bool) {
+            self.fbb_.push_slot::<bool>(Field::VT_DEPRECATED, deprecated, false);
+        }
+        #[inline]
+        pub fn add_required(&mut self, required: bool) {
+            self.fbb_.push_slot::<bool>(Field::VT_REQUIRED, required, false);
+        }
+        #[inline]
+        pub fn add_key(&mut self, key: bool) {
+            self.fbb_.push_slot::<bool>(Field::VT_KEY, key, false);
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Field::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn add_optional(&mut self, optional: bool) {
+            self.fbb_.push_slot::<bool>(Field::VT_OPTIONAL, optional, false);
+        }
+        #[inline]
+        pub fn add_padding(&mut self, padding: u16) {
+            self.fbb_.push_slot::<u16>(Field::VT_PADDING, padding, 0);
+        }
+        #[inline]
+        pub fn add_offset64(&mut self, offset64: bool) {
+            self.fbb_.push_slot::<bool>(Field::VT_OFFSET64, offset64, false);
+        }
+        #[inline]
+        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FieldBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            FieldBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Field<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, Field::VT_NAME, "name");
+            self.fbb_.required(o, Field::VT_TYPE_, "type_");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Field<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Field");
+            ds.field("name", &self.name());
+            ds.field("type_", &self.type_());
+            ds.field("id", &self.id());
+            ds.field("offset", &self.offset());
+            ds.field("default_integer", &self.default_integer());
+            ds.field("default_real", &self.default_real());
+            ds.field("deprecated", &self.deprecated());
+            ds.field("required", &self.required());
+            ds.field("key", &self.key());
+            ds.field("attributes", &self.attributes());
+            ds.field("documentation", &self.documentation());
+            ds.field("optional", &self.optional());
+            ds.field("padding", &self.padding());
+            ds.field("offset64", &self.offset64());
+            ds.finish()
+        }
+    }
+    pub enum ObjectOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Object<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Object<'a> {
+        type Inner = Object<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Object<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_FIELDS: flatbuffers::VOffsetT = 6;
+        pub const VT_IS_STRUCT: flatbuffers::VOffsetT = 8;
+        pub const VT_MINALIGN: flatbuffers::VOffsetT = 10;
+        pub const VT_BYTESIZE: flatbuffers::VOffsetT = 12;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 16;
+        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 18;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Object { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args ObjectArgs<'args>,
+        ) -> flatbuffers::WIPOffset<Object<'bldr>> {
+            let mut builder = ObjectBuilder::new(_fbb);
+            if let Some(x) = args.declaration_file {
+                builder.add_declaration_file(x);
+            }
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            builder.add_bytesize(args.bytesize);
+            builder.add_minalign(args.minalign);
+            if let Some(x) = args.fields {
+                builder.add_fields(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.add_is_struct(args.is_struct);
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &Object) -> bool {
+            self.name() < o.name()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.name();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn fields(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<
+                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
+                    >>(Object::VT_FIELDS, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn is_struct(&self) -> bool {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<bool>(Object::VT_IS_STRUCT, Some(false)).unwrap() }
+        }
+        #[inline]
+        pub fn minalign(&self) -> i32 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<i32>(Object::VT_MINALIGN, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn bytesize(&self) -> i32 {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe { self._tab.get::<i32>(Object::VT_BYTESIZE, Some(0)).unwrap() }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(Object::VT_ATTRIBUTES, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(Object::VT_DOCUMENTATION, None)
+            }
+        }
+        /// File that this Object is declared in.
+        #[inline]
+        pub fn declaration_file(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_DECLARATION_FILE, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Object<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>,
+                >>("fields", Self::VT_FIELDS, true)?
+                .visit_field::<bool>("is_struct", Self::VT_IS_STRUCT, false)?
+                .visit_field::<i32>("minalign", Self::VT_MINALIGN, false)?
+                .visit_field::<i32>("bytesize", Self::VT_BYTESIZE, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "declaration_file",
+                    Self::VT_DECLARATION_FILE,
+                    false,
+                )?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct ObjectArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub fields: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>,
+            >,
+        >,
+        pub is_struct: bool,
+        pub minalign: i32,
+        pub bytesize: i32,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
+    }
+    impl<'a> Default for ObjectArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            ObjectArgs {
+                name: None,   // required field
+                fields: None, // required field
+                is_struct: false,
+                minalign: 0,
+                bytesize: 0,
+                attributes: None,
+                documentation: None,
+                declaration_file: None,
+            }
+        }
+    }
+
+    pub struct ObjectBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ObjectBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_fields(
+            &mut self,
+            fields: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_FIELDS, fields);
+        }
+        #[inline]
+        pub fn add_is_struct(&mut self, is_struct: bool) {
+            self.fbb_.push_slot::<bool>(Object::VT_IS_STRUCT, is_struct, false);
+        }
+        #[inline]
+        pub fn add_minalign(&mut self, minalign: i32) {
+            self.fbb_.push_slot::<i32>(Object::VT_MINALIGN, minalign, 0);
+        }
+        #[inline]
+        pub fn add_bytesize(&mut self, bytesize: i32) {
+            self.fbb_.push_slot::<i32>(Object::VT_BYTESIZE, bytesize, 0);
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Object::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Object::VT_DECLARATION_FILE,
+                declaration_file,
+            );
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> ObjectBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            ObjectBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Object<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, Object::VT_NAME, "name");
+            self.fbb_.required(o, Object::VT_FIELDS, "fields");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Object<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Object");
+            ds.field("name", &self.name());
+            ds.field("fields", &self.fields());
+            ds.field("is_struct", &self.is_struct());
+            ds.field("minalign", &self.minalign());
+            ds.field("bytesize", &self.bytesize());
+            ds.field("attributes", &self.attributes());
+            ds.field("documentation", &self.documentation());
+            ds.field("declaration_file", &self.declaration_file());
+            ds.finish()
+        }
+    }
+    pub enum RPCCallOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct RPCCall<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for RPCCall<'a> {
+        type Inner = RPCCall<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> RPCCall<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_REQUEST: flatbuffers::VOffsetT = 6;
+        pub const VT_RESPONSE: flatbuffers::VOffsetT = 8;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 10;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            RPCCall { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args RPCCallArgs<'args>,
+        ) -> flatbuffers::WIPOffset<RPCCall<'bldr>> {
+            let mut builder = RPCCallBuilder::new(_fbb);
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            if let Some(x) = args.response {
+                builder.add_response(x);
+            }
+            if let Some(x) = args.request {
+                builder.add_request(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RPCCall::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &RPCCall) -> bool {
+            self.name() < o.name()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.name();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn request(&self) -> Object<'a> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_REQUEST, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn response(&self) -> Object<'a> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_RESPONSE, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(RPCCall::VT_ATTRIBUTES, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(RPCCall::VT_DOCUMENTATION, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for RPCCall<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
+                    "request",
+                    Self::VT_REQUEST,
+                    true,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
+                    "response",
+                    Self::VT_RESPONSE,
+                    true,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct RPCCallArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub request: Option<flatbuffers::WIPOffset<Object<'a>>>,
+        pub response: Option<flatbuffers::WIPOffset<Object<'a>>>,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+    }
+    impl<'a> Default for RPCCallArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            RPCCallArgs {
+                name: None,     // required field
+                request: None,  // required field
+                response: None, // required field
+                attributes: None,
+                documentation: None,
+            }
+        }
+    }
+
+    pub struct RPCCallBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RPCCallBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_request(&mut self, request: flatbuffers::WIPOffset<Object<'b>>) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_REQUEST, request);
+        }
+        #[inline]
+        pub fn add_response(&mut self, response: flatbuffers::WIPOffset<Object<'b>>) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_RESPONSE, response);
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                RPCCall::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> RPCCallBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            RPCCallBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<RPCCall<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, RPCCall::VT_NAME, "name");
+            self.fbb_.required(o, RPCCall::VT_REQUEST, "request");
+            self.fbb_.required(o, RPCCall::VT_RESPONSE, "response");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for RPCCall<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("RPCCall");
+            ds.field("name", &self.name());
+            ds.field("request", &self.request());
+            ds.field("response", &self.response());
+            ds.field("attributes", &self.attributes());
+            ds.field("documentation", &self.documentation());
+            ds.finish()
+        }
+    }
+    pub enum ServiceOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Service<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Service<'a> {
+        type Inner = Service<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Service<'a> {
+        pub const VT_NAME: flatbuffers::VOffsetT = 4;
+        pub const VT_CALLS: flatbuffers::VOffsetT = 6;
+        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 8;
+        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 10;
+        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 12;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Service { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args ServiceArgs<'args>,
+        ) -> flatbuffers::WIPOffset<Service<'bldr>> {
+            let mut builder = ServiceBuilder::new(_fbb);
+            if let Some(x) = args.declaration_file {
+                builder.add_declaration_file(x);
+            }
+            if let Some(x) = args.documentation {
+                builder.add_documentation(x);
+            }
+            if let Some(x) = args.attributes {
+                builder.add_attributes(x);
+            }
+            if let Some(x) = args.calls {
+                builder.add_calls(x);
+            }
+            if let Some(x) = args.name {
+                builder.add_name(x);
+            }
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn name(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_NAME, None).unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &Service) -> bool {
+            self.name() < o.name()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.name();
+            key.cmp(val)
+        }
+        #[inline]
+        pub fn calls(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall>>,
+                >>(Service::VT_CALLS, None)
+            }
+        }
+        #[inline]
+        pub fn attributes(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>(Service::VT_ATTRIBUTES, None)
+            }
+        }
+        #[inline]
+        pub fn documentation(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(Service::VT_DOCUMENTATION, None)
+            }
+        }
+        /// File that this Service is declared in.
+        #[inline]
+        pub fn declaration_file(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_DECLARATION_FILE, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Service<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RPCCall>>,
+                >>("calls", Self::VT_CALLS, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
+                >>("attributes", Self::VT_ATTRIBUTES, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("documentation", Self::VT_DOCUMENTATION, false)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "declaration_file",
+                    Self::VT_DECLARATION_FILE,
+                    false,
+                )?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct ServiceArgs<'a> {
+        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub calls: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>,
+            >,
+        >,
+        pub attributes: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
+            >,
+        >,
+        pub documentation: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
+    }
+    impl<'a> Default for ServiceArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            ServiceArgs {
+                name: None, // required field
+                calls: None,
+                attributes: None,
+                documentation: None,
+                declaration_file: None,
+            }
+        }
+    }
+
+    pub struct ServiceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ServiceBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_NAME, name);
+        }
+        #[inline]
+        pub fn add_calls(
+            &mut self,
+            calls: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<RPCCall<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_CALLS, calls);
+        }
+        #[inline]
+        pub fn add_attributes(
+            &mut self,
+            attributes: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_ATTRIBUTES, attributes);
+        }
+        #[inline]
+        pub fn add_documentation(
+            &mut self,
+            documentation: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Service::VT_DOCUMENTATION,
+                documentation,
+            );
+        }
+        #[inline]
+        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                Service::VT_DECLARATION_FILE,
+                declaration_file,
+            );
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> ServiceBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            ServiceBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Service<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, Service::VT_NAME, "name");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Service<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Service");
+            ds.field("name", &self.name());
+            ds.field("calls", &self.calls());
+            ds.field("attributes", &self.attributes());
+            ds.field("documentation", &self.documentation());
+            ds.field("declaration_file", &self.declaration_file());
+            ds.finish()
+        }
+    }
+    pub enum SchemaFileOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    /// File specific information.
+    /// Symbols declared within a file may be recovered by iterating over all
+    /// symbols and examining the `declaration_file` field.
+    pub struct SchemaFile<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for SchemaFile<'a> {
+        type Inner = SchemaFile<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> SchemaFile<'a> {
+        pub const VT_FILENAME: flatbuffers::VOffsetT = 4;
+        pub const VT_INCLUDED_FILENAMES: flatbuffers::VOffsetT = 6;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            SchemaFile { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args SchemaFileArgs<'args>,
+        ) -> flatbuffers::WIPOffset<SchemaFile<'bldr>> {
+            let mut builder = SchemaFileBuilder::new(_fbb);
+            if let Some(x) = args.included_filenames {
+                builder.add_included_filenames(x);
+            }
+            if let Some(x) = args.filename {
+                builder.add_filename(x);
+            }
+            builder.finish()
+        }
+
+        /// Filename, relative to project root.
+        #[inline]
+        pub fn filename(&self) -> &'a str {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<&str>>(SchemaFile::VT_FILENAME, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn key_compare_less_than(&self, o: &SchemaFile) -> bool {
+            self.filename() < o.filename()
+        }
+
+        #[inline]
+        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
+            let key = self.filename();
+            key.cmp(val)
+        }
+        /// Names of included files, relative to project root.
+        #[inline]
+        pub fn included_filenames(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
+                >>(SchemaFile::VT_INCLUDED_FILENAMES, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for SchemaFile<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "filename",
+                    Self::VT_FILENAME,
+                    true,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
+                >>("included_filenames", Self::VT_INCLUDED_FILENAMES, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct SchemaFileArgs<'a> {
+        pub filename: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub included_filenames: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
+        >,
+    }
+    impl<'a> Default for SchemaFileArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            SchemaFileArgs {
+                filename: None, // required field
+                included_filenames: None,
+            }
+        }
+    }
+
+    pub struct SchemaFileBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SchemaFileBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_filename(&mut self, filename: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(SchemaFile::VT_FILENAME, filename);
+        }
+        #[inline]
+        pub fn add_included_filenames(
+            &mut self,
+            included_filenames: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
+                SchemaFile::VT_INCLUDED_FILENAMES,
+                included_filenames,
+            );
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> SchemaFileBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            SchemaFileBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<SchemaFile<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, SchemaFile::VT_FILENAME, "filename");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for SchemaFile<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("SchemaFile");
+            ds.field("filename", &self.filename());
+            ds.field("included_filenames", &self.included_filenames());
+            ds.finish()
+        }
+    }
+    pub enum SchemaOffset {}
+    #[derive(Copy, Clone, PartialEq)]
+
+    pub struct Schema<'a> {
+        pub _tab: flatbuffers::Table<'a>,
+    }
+
+    impl<'a> flatbuffers::Follow<'a> for Schema<'a> {
+        type Inner = Schema<'a>;
+        #[inline]
+        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
+            Self { _tab: flatbuffers::Table::new(buf, loc) }
+        }
+    }
+
+    impl<'a> Schema<'a> {
+        pub const VT_OBJECTS: flatbuffers::VOffsetT = 4;
+        pub const VT_ENUMS: flatbuffers::VOffsetT = 6;
+        pub const VT_FILE_IDENT: flatbuffers::VOffsetT = 8;
+        pub const VT_FILE_EXT: flatbuffers::VOffsetT = 10;
+        pub const VT_ROOT_TABLE: flatbuffers::VOffsetT = 12;
+        pub const VT_SERVICES: flatbuffers::VOffsetT = 14;
+        pub const VT_ADVANCED_FEATURES: flatbuffers::VOffsetT = 16;
+        pub const VT_FBS_FILES: flatbuffers::VOffsetT = 18;
+
+        #[inline]
+        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
+            Schema { _tab: table }
+        }
+        #[allow(unused_mut)]
+        pub fn create<
+            'bldr: 'args,
+            'args: 'mut_bldr,
+            'mut_bldr,
+            A: flatbuffers::Allocator + 'bldr,
+        >(
+            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
+            args: &'args SchemaArgs<'args>,
+        ) -> flatbuffers::WIPOffset<Schema<'bldr>> {
+            let mut builder = SchemaBuilder::new(_fbb);
+            builder.add_advanced_features(args.advanced_features);
+            if let Some(x) = args.fbs_files {
+                builder.add_fbs_files(x);
+            }
+            if let Some(x) = args.services {
+                builder.add_services(x);
+            }
+            if let Some(x) = args.root_table {
+                builder.add_root_table(x);
+            }
+            if let Some(x) = args.file_ext {
+                builder.add_file_ext(x);
+            }
+            if let Some(x) = args.file_ident {
+                builder.add_file_ident(x);
+            }
+            if let Some(x) = args.enums {
+                builder.add_enums(x);
+            }
+            if let Some(x) = args.objects {
+                builder.add_objects(x);
+            }
+            builder.finish()
+        }
+
+        #[inline]
+        pub fn objects(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<
+                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object>>,
+                    >>(Schema::VT_OBJECTS, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn enums(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<flatbuffers::ForwardsUOffset<
+                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum>>,
+                    >>(Schema::VT_ENUMS, None)
+                    .unwrap()
+            }
+        }
+        #[inline]
+        pub fn file_ident(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_IDENT, None)
+            }
+        }
+        #[inline]
+        pub fn file_ext(&self) -> Option<&'a str> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_EXT, None)
+            }
+        }
+        #[inline]
+        pub fn root_table(&self) -> Option<Object<'a>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<Object>>(Schema::VT_ROOT_TABLE, None)
+            }
+        }
+        #[inline]
+        pub fn services(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service>>,
+                >>(Schema::VT_SERVICES, None)
+            }
+        }
+        #[inline]
+        pub fn advanced_features(&self) -> AdvancedFeatures {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab
+                    .get::<AdvancedFeatures>(Schema::VT_ADVANCED_FEATURES, Some(Default::default()))
+                    .unwrap()
+            }
+        }
+        /// All the files used in this compilation. Files are relative to where
+        /// flatc was invoked.
+        #[inline]
+        pub fn fbs_files(
+            &self,
+        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>> {
+            // Safety:
+            // Created from valid Table for this object
+            // which contains a valid value in this slot
+            unsafe {
+                self._tab.get::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile>>,
+                >>(Schema::VT_FBS_FILES, None)
+            }
+        }
+    }
+
+    impl flatbuffers::Verifiable for Schema<'_> {
+        #[inline]
+        fn run_verifier(
+            v: &mut flatbuffers::Verifier,
+            pos: usize,
+        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
+            use self::flatbuffers::Verifiable;
+            v.visit_table(pos)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Object>>,
+                >>("objects", Self::VT_OBJECTS, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Enum>>,
+                >>("enums", Self::VT_ENUMS, true)?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "file_ident",
+                    Self::VT_FILE_IDENT,
+                    false,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
+                    "file_ext",
+                    Self::VT_FILE_EXT,
+                    false,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
+                    "root_table",
+                    Self::VT_ROOT_TABLE,
+                    false,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Service>>,
+                >>("services", Self::VT_SERVICES, false)?
+                .visit_field::<AdvancedFeatures>(
+                    "advanced_features",
+                    Self::VT_ADVANCED_FEATURES,
+                    false,
+                )?
+                .visit_field::<flatbuffers::ForwardsUOffset<
+                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SchemaFile>>,
+                >>("fbs_files", Self::VT_FBS_FILES, false)?
+                .finish();
+            Ok(())
+        }
+    }
+    pub struct SchemaArgs<'a> {
+        pub objects: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>>,
+            >,
+        >,
+        pub enums: Option<
+            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>>>,
+        >,
+        pub file_ident: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub file_ext: Option<flatbuffers::WIPOffset<&'a str>>,
+        pub root_table: Option<flatbuffers::WIPOffset<Object<'a>>>,
+        pub services: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>,
+            >,
+        >,
+        pub advanced_features: AdvancedFeatures,
+        pub fbs_files: Option<
+            flatbuffers::WIPOffset<
+                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>,
+            >,
+        >,
+    }
+    impl<'a> Default for SchemaArgs<'a> {
+        #[inline]
+        fn default() -> Self {
+            SchemaArgs {
+                objects: None, // required field
+                enums: None,   // required field
+                file_ident: None,
+                file_ext: None,
+                root_table: None,
+                services: None,
+                advanced_features: Default::default(),
+                fbs_files: None,
+            }
+        }
+    }
+
+    pub struct SchemaBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
+        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
+    }
+    impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SchemaBuilder<'a, 'b, A> {
+        #[inline]
+        pub fn add_objects(
+            &mut self,
+            objects: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Object<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_OBJECTS, objects);
+        }
+        #[inline]
+        pub fn add_enums(
+            &mut self,
+            enums: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Enum<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_ENUMS, enums);
+        }
+        #[inline]
+        pub fn add_file_ident(&mut self, file_ident: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_IDENT, file_ident);
+        }
+        #[inline]
+        pub fn add_file_ext(&mut self, file_ext: flatbuffers::WIPOffset<&'b str>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_EXT, file_ext);
+        }
+        #[inline]
+        pub fn add_root_table(&mut self, root_table: flatbuffers::WIPOffset<Object<'b>>) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Object>>(
+                Schema::VT_ROOT_TABLE,
+                root_table,
+            );
+        }
+        #[inline]
+        pub fn add_services(
+            &mut self,
+            services: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Service<'b>>>,
+            >,
+        ) {
+            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_SERVICES, services);
+        }
+        #[inline]
+        pub fn add_advanced_features(&mut self, advanced_features: AdvancedFeatures) {
+            self.fbb_.push_slot::<AdvancedFeatures>(
+                Schema::VT_ADVANCED_FEATURES,
+                advanced_features,
+                Default::default(),
+            );
+        }
+        #[inline]
+        pub fn add_fbs_files(
+            &mut self,
+            fbs_files: flatbuffers::WIPOffset<
+                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SchemaFile<'b>>>,
+            >,
+        ) {
+            self.fbb_
+                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FBS_FILES, fbs_files);
+        }
+        #[inline]
+        pub fn new(
+            _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        ) -> SchemaBuilder<'a, 'b, A> {
+            let start = _fbb.start_table();
+            SchemaBuilder { fbb_: _fbb, start_: start }
+        }
+        #[inline]
+        pub fn finish(self) -> flatbuffers::WIPOffset<Schema<'a>> {
+            let o = self.fbb_.end_table(self.start_);
+            self.fbb_.required(o, Schema::VT_OBJECTS, "objects");
+            self.fbb_.required(o, Schema::VT_ENUMS, "enums");
+            flatbuffers::WIPOffset::new(o.value())
+        }
+    }
+
+    impl core::fmt::Debug for Schema<'_> {
+        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+            let mut ds = f.debug_struct("Schema");
+            ds.field("objects", &self.objects());
+            ds.field("enums", &self.enums());
+            ds.field("file_ident", &self.file_ident());
+            ds.field("file_ext", &self.file_ext());
+            ds.field("root_table", &self.root_table());
+            ds.field("services", &self.services());
+            ds.field("advanced_features", &self.advanced_features());
+            ds.field("fbs_files", &self.fbs_files());
+            ds.finish()
+        }
+    }
     #[inline]
-    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
-        flatbuffers::emplace_scalar::<i8>(dst, self.0);
+    /// Verifies that a buffer of bytes contains a `Schema`
+    /// and returns it.
+    /// Note that verification is still experimental and may not
+    /// catch every error, or be maximally performant. For the
+    /// previous, unchecked, behavior use
+    /// `root_as_schema_unchecked`.
+    pub fn root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
+        flatbuffers::root::<Schema>(buf)
     }
-}
-
-impl flatbuffers::EndianScalar for BaseType {
-  type Scalar = i8;
-  #[inline]
-  fn to_little_endian(self) -> i8 {
-    self.0.to_le()
-  }
-  #[inline]
-  #[allow(clippy::wrong_self_convention)]
-  fn from_little_endian(v: i8) -> Self {
-    let b = i8::from_le(v);
-    Self(b)
-  }
-}
-
-impl<'a> flatbuffers::Verifiable for BaseType {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    i8::run_verifier(v, pos)
-  }
-}
-
-impl flatbuffers::SimpleToVerifyInSlice for BaseType {}
-#[allow(non_upper_case_globals)]
-mod bitflags_advanced_features {
-  flatbuffers::bitflags::bitflags! {
-    /// New schema language features that are not supported by old code generators.
-    #[derive(Default, Debug, Clone, Copy, PartialEq)]
-    pub struct AdvancedFeatures: u64 {
-      const AdvancedArrayFeatures = 1;
-      const AdvancedUnionFeatures = 2;
-      const OptionalScalars = 4;
-      const DefaultVectorsAndStrings = 8;
-    }
-  }
-}
-pub use self::bitflags_advanced_features::AdvancedFeatures;
-
-impl<'a> flatbuffers::Follow<'a> for AdvancedFeatures {
-  type Inner = Self;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    let b = flatbuffers::read_scalar_at::<u64>(buf, loc);
-    Self::from_bits_retain(b)
-  }
-}
-
-impl flatbuffers::Push for AdvancedFeatures {
-    type Output = AdvancedFeatures;
     #[inline]
-    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
-        flatbuffers::emplace_scalar::<u64>(dst, self.bits());
+    /// Verifies that a buffer of bytes contains a size prefixed
+    /// `Schema` and returns it.
+    /// Note that verification is still experimental and may not
+    /// catch every error, or be maximally performant. For the
+    /// previous, unchecked, behavior use
+    /// `size_prefixed_root_as_schema_unchecked`.
+    pub fn size_prefixed_root_as_schema(
+        buf: &[u8],
+    ) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
+        flatbuffers::size_prefixed_root::<Schema>(buf)
     }
-}
-
-impl flatbuffers::EndianScalar for AdvancedFeatures {
-  type Scalar = u64;
-  #[inline]
-  fn to_little_endian(self) -> u64 {
-    self.bits().to_le()
-  }
-  #[inline]
-  #[allow(clippy::wrong_self_convention)]
-  fn from_little_endian(v: u64) -> Self {
-    let b = u64::from_le(v);
-    Self::from_bits_retain(b)
-  }
-}
-
-impl<'a> flatbuffers::Verifiable for AdvancedFeatures {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    u64::run_verifier(v, pos)
-  }
-}
-
-impl flatbuffers::SimpleToVerifyInSlice for AdvancedFeatures {}
-pub enum TypeOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct Type<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Type<'a> {
-  type Inner = Type<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Type<'a> {
-  pub const VT_BASE_TYPE: flatbuffers::VOffsetT = 4;
-  pub const VT_ELEMENT: flatbuffers::VOffsetT = 6;
-  pub const VT_INDEX: flatbuffers::VOffsetT = 8;
-  pub const VT_FIXED_LENGTH: flatbuffers::VOffsetT = 10;
-  pub const VT_BASE_SIZE: flatbuffers::VOffsetT = 12;
-  pub const VT_ELEMENT_SIZE: flatbuffers::VOffsetT = 14;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Type { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args TypeArgs
-  ) -> flatbuffers::WIPOffset<Type<'bldr>> {
-    let mut builder = TypeBuilder::new(_fbb);
-    builder.add_element_size(args.element_size);
-    builder.add_base_size(args.base_size);
-    builder.add_index(args.index);
-    builder.add_fixed_length(args.fixed_length);
-    builder.add_element(args.element);
-    builder.add_base_type(args.base_type);
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn base_type(&self) -> BaseType {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<BaseType>(Type::VT_BASE_TYPE, Some(BaseType::None)).unwrap()}
-  }
-  #[inline]
-  pub fn element(&self) -> BaseType {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<BaseType>(Type::VT_ELEMENT, Some(BaseType::None)).unwrap()}
-  }
-  #[inline]
-  pub fn index(&self) -> i32 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<i32>(Type::VT_INDEX, Some(-1)).unwrap()}
-  }
-  #[inline]
-  pub fn fixed_length(&self) -> u16 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u16>(Type::VT_FIXED_LENGTH, Some(0)).unwrap()}
-  }
-  /// The size (octets) of the `base_type` field.
-  #[inline]
-  pub fn base_size(&self) -> u32 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u32>(Type::VT_BASE_SIZE, Some(4)).unwrap()}
-  }
-  /// The size (octets) of the `element` field, if present.
-  #[inline]
-  pub fn element_size(&self) -> u32 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u32>(Type::VT_ELEMENT_SIZE, Some(0)).unwrap()}
-  }
-}
-
-impl flatbuffers::Verifiable for Type<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<BaseType>("base_type", Self::VT_BASE_TYPE, false)?
-     .visit_field::<BaseType>("element", Self::VT_ELEMENT, false)?
-     .visit_field::<i32>("index", Self::VT_INDEX, false)?
-     .visit_field::<u16>("fixed_length", Self::VT_FIXED_LENGTH, false)?
-     .visit_field::<u32>("base_size", Self::VT_BASE_SIZE, false)?
-     .visit_field::<u32>("element_size", Self::VT_ELEMENT_SIZE, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct TypeArgs {
-    pub base_type: BaseType,
-    pub element: BaseType,
-    pub index: i32,
-    pub fixed_length: u16,
-    pub base_size: u32,
-    pub element_size: u32,
-}
-impl<'a> Default for TypeArgs {
-  #[inline]
-  fn default() -> Self {
-    TypeArgs {
-      base_type: BaseType::None,
-      element: BaseType::None,
-      index: -1,
-      fixed_length: 0,
-      base_size: 4,
-      element_size: 0,
+    #[inline]
+    /// Verifies, with the given options, that a buffer of bytes
+    /// contains a `Schema` and returns it.
+    /// Note that verification is still experimental and may not
+    /// catch every error, or be maximally performant. For the
+    /// previous, unchecked, behavior use
+    /// `root_as_schema_unchecked`.
+    pub fn root_as_schema_with_opts<'b, 'o>(
+        opts: &'o flatbuffers::VerifierOptions,
+        buf: &'b [u8],
+    ) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
+        flatbuffers::root_with_opts::<Schema<'b>>(opts, buf)
     }
-  }
-}
-
-pub struct TypeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TypeBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_base_type(&mut self, base_type: BaseType) {
-    self.fbb_.push_slot::<BaseType>(Type::VT_BASE_TYPE, base_type, BaseType::None);
-  }
-  #[inline]
-  pub fn add_element(&mut self, element: BaseType) {
-    self.fbb_.push_slot::<BaseType>(Type::VT_ELEMENT, element, BaseType::None);
-  }
-  #[inline]
-  pub fn add_index(&mut self, index: i32) {
-    self.fbb_.push_slot::<i32>(Type::VT_INDEX, index, -1);
-  }
-  #[inline]
-  pub fn add_fixed_length(&mut self, fixed_length: u16) {
-    self.fbb_.push_slot::<u16>(Type::VT_FIXED_LENGTH, fixed_length, 0);
-  }
-  #[inline]
-  pub fn add_base_size(&mut self, base_size: u32) {
-    self.fbb_.push_slot::<u32>(Type::VT_BASE_SIZE, base_size, 4);
-  }
-  #[inline]
-  pub fn add_element_size(&mut self, element_size: u32) {
-    self.fbb_.push_slot::<u32>(Type::VT_ELEMENT_SIZE, element_size, 0);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TypeBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    TypeBuilder {
-      fbb_: _fbb,
-      start_: start,
+    #[inline]
+    /// Verifies, with the given verifier options, that a buffer of
+    /// bytes contains a size prefixed `Schema` and returns
+    /// it. Note that verification is still experimental and may not
+    /// catch every error, or be maximally performant. For the
+    /// previous, unchecked, behavior use
+    /// `root_as_schema_unchecked`.
+    pub fn size_prefixed_root_as_schema_with_opts<'b, 'o>(
+        opts: &'o flatbuffers::VerifierOptions,
+        buf: &'b [u8],
+    ) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
+        flatbuffers::size_prefixed_root_with_opts::<Schema<'b>>(opts, buf)
     }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Type<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Type<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Type");
-      ds.field("base_type", &self.base_type());
-      ds.field("element", &self.element());
-      ds.field("index", &self.index());
-      ds.field("fixed_length", &self.fixed_length());
-      ds.field("base_size", &self.base_size());
-      ds.field("element_size", &self.element_size());
-      ds.finish()
-  }
-}
-pub enum KeyValueOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct KeyValue<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
-  type Inner = KeyValue<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> KeyValue<'a> {
-  pub const VT_KEY: flatbuffers::VOffsetT = 4;
-  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    KeyValue { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args KeyValueArgs<'args>
-  ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
-    let mut builder = KeyValueBuilder::new(_fbb);
-    if let Some(x) = args.value { builder.add_value(x); }
-    if let Some(x) = args.key { builder.add_key(x); }
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn key(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &KeyValue) -> bool {
-    self.key() < o.key()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.key();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn value(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for KeyValue<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct KeyValueArgs<'a> {
-    pub key: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
-}
-impl<'a> Default for KeyValueArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    KeyValueArgs {
-      key: None, // required field
-      value: None,
+    #[inline]
+    /// Assumes, without verification, that a buffer of bytes contains a Schema and returns it.
+    /// # Safety
+    /// Callers must trust the given bytes do indeed contain a valid `Schema`.
+    pub unsafe fn root_as_schema_unchecked(buf: &[u8]) -> Schema {
+        flatbuffers::root_unchecked::<Schema>(buf)
     }
-  }
-}
-
-pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
-  }
-  #[inline]
-  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    KeyValueBuilder {
-      fbb_: _fbb,
-      start_: start,
+    #[inline]
+    /// Assumes, without verification, that a buffer of bytes contains a size prefixed Schema and returns it.
+    /// # Safety
+    /// Callers must trust the given bytes do indeed contain a valid size prefixed `Schema`.
+    pub unsafe fn size_prefixed_root_as_schema_unchecked(buf: &[u8]) -> Schema {
+        flatbuffers::size_prefixed_root_unchecked::<Schema>(buf)
     }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, KeyValue::VT_KEY,"key");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
+    pub const SCHEMA_IDENTIFIER: &str = "BFBS";
 
-impl core::fmt::Debug for KeyValue<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("KeyValue");
-      ds.field("key", &self.key());
-      ds.field("value", &self.value());
-      ds.finish()
-  }
-}
-pub enum EnumValOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct EnumVal<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for EnumVal<'a> {
-  type Inner = EnumVal<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> EnumVal<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
-  pub const VT_UNION_TYPE: flatbuffers::VOffsetT = 10;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    EnumVal { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args EnumValArgs<'args>
-  ) -> flatbuffers::WIPOffset<EnumVal<'bldr>> {
-    let mut builder = EnumValBuilder::new(_fbb);
-    builder.add_value(args.value);
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.union_type { builder.add_union_type(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EnumVal::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn value(&self) -> i64 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<i64>(EnumVal::VT_VALUE, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &EnumVal) -> bool {
-    self.value() < o.value()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: i64) -> ::core::cmp::Ordering {
-    let key = self.value();
-    key.cmp(&val)
-  }
-  #[inline]
-  pub fn union_type(&self) -> Option<Type<'a>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Type>>(EnumVal::VT_UNION_TYPE, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(EnumVal::VT_DOCUMENTATION, None)}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(EnumVal::VT_ATTRIBUTES, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for EnumVal<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<i64>("value", Self::VT_VALUE, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Type>>("union_type", Self::VT_UNION_TYPE, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct EnumValArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub value: i64,
-    pub union_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-}
-impl<'a> Default for EnumValArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    EnumValArgs {
-      name: None, // required field
-      value: 0,
-      union_type: None,
-      documentation: None,
-      attributes: None,
+    #[inline]
+    pub fn schema_buffer_has_identifier(buf: &[u8]) -> bool {
+        flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, false)
     }
-  }
-}
 
-pub struct EnumValBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EnumValBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_value(&mut self, value: i64) {
-    self.fbb_.push_slot::<i64>(EnumVal::VT_VALUE, value, 0);
-  }
-  #[inline]
-  pub fn add_union_type(&mut self, union_type: flatbuffers::WIPOffset<Type<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(EnumVal::VT_UNION_TYPE, union_type);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EnumValBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    EnumValBuilder {
-      fbb_: _fbb,
-      start_: start,
+    #[inline]
+    pub fn schema_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
+        flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, true)
     }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<EnumVal<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, EnumVal::VT_NAME,"name");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
 
-impl core::fmt::Debug for EnumVal<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("EnumVal");
-      ds.field("name", &self.name());
-      ds.field("value", &self.value());
-      ds.field("union_type", &self.union_type());
-      ds.field("documentation", &self.documentation());
-      ds.field("attributes", &self.attributes());
-      ds.finish()
-  }
-}
-pub enum EnumOffset {}
-#[derive(Copy, Clone, PartialEq)]
+    pub const SCHEMA_EXTENSION: &str = "bfbs";
 
-pub struct Enum<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Enum<'a> {
-  type Inner = Enum<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Enum<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_VALUES: flatbuffers::VOffsetT = 6;
-  pub const VT_IS_UNION: flatbuffers::VOffsetT = 8;
-  pub const VT_UNDERLYING_TYPE: flatbuffers::VOffsetT = 10;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 12;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 14;
-  pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 16;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Enum { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args EnumArgs<'args>
-  ) -> flatbuffers::WIPOffset<Enum<'bldr>> {
-    let mut builder = EnumBuilder::new(_fbb);
-    if let Some(x) = args.declaration_file { builder.add_declaration_file(x); }
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    if let Some(x) = args.underlying_type { builder.add_underlying_type(x); }
-    if let Some(x) = args.values { builder.add_values(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.add_is_union(args.is_union);
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &Enum) -> bool {
-    self.name() < o.name()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.name();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn values(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal>>>>(Enum::VT_VALUES, None).unwrap()}
-  }
-  #[inline]
-  pub fn is_union(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Enum::VT_IS_UNION, Some(false)).unwrap()}
-  }
-  #[inline]
-  pub fn underlying_type(&self) -> Type<'a> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Type>>(Enum::VT_UNDERLYING_TYPE, None).unwrap()}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Enum::VT_ATTRIBUTES, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(Enum::VT_DOCUMENTATION, None)}
-  }
-  /// File that this Enum is declared in.
-  #[inline]
-  pub fn declaration_file(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_DECLARATION_FILE, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for Enum<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<EnumVal>>>>("values", Self::VT_VALUES, true)?
-     .visit_field::<bool>("is_union", Self::VT_IS_UNION, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Type>>("underlying_type", Self::VT_UNDERLYING_TYPE, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("declaration_file", Self::VT_DECLARATION_FILE, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct EnumArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>>>>,
-    pub is_union: bool,
-    pub underlying_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-    pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
-}
-impl<'a> Default for EnumArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    EnumArgs {
-      name: None, // required field
-      values: None, // required field
-      is_union: false,
-      underlying_type: None, // required field
-      attributes: None,
-      documentation: None,
-      declaration_file: None,
+    #[inline]
+    pub fn finish_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
+        fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        root: flatbuffers::WIPOffset<Schema<'a>>,
+    ) {
+        fbb.finish(root, Some(SCHEMA_IDENTIFIER));
     }
-  }
-}
 
-pub struct EnumBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EnumBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<EnumVal<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_VALUES, values);
-  }
-  #[inline]
-  pub fn add_is_union(&mut self, is_union: bool) {
-    self.fbb_.push_slot::<bool>(Enum::VT_IS_UNION, is_union, false);
-  }
-  #[inline]
-  pub fn add_underlying_type(&mut self, underlying_type: flatbuffers::WIPOffset<Type<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(Enum::VT_UNDERLYING_TYPE, underlying_type);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_DECLARATION_FILE, declaration_file);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EnumBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    EnumBuilder {
-      fbb_: _fbb,
-      start_: start,
+    #[inline]
+    pub fn finish_size_prefixed_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
+        fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
+        root: flatbuffers::WIPOffset<Schema<'a>>,
+    ) {
+        fbb.finish_size_prefixed(root, Some(SCHEMA_IDENTIFIER));
     }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Enum<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, Enum::VT_NAME,"name");
-    self.fbb_.required(o, Enum::VT_VALUES,"values");
-    self.fbb_.required(o, Enum::VT_UNDERLYING_TYPE,"underlying_type");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Enum<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Enum");
-      ds.field("name", &self.name());
-      ds.field("values", &self.values());
-      ds.field("is_union", &self.is_union());
-      ds.field("underlying_type", &self.underlying_type());
-      ds.field("attributes", &self.attributes());
-      ds.field("documentation", &self.documentation());
-      ds.field("declaration_file", &self.declaration_file());
-      ds.finish()
-  }
-}
-pub enum FieldOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct Field<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Field<'a> {
-  type Inner = Field<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Field<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_TYPE_: flatbuffers::VOffsetT = 6;
-  pub const VT_ID: flatbuffers::VOffsetT = 8;
-  pub const VT_OFFSET: flatbuffers::VOffsetT = 10;
-  pub const VT_DEFAULT_INTEGER: flatbuffers::VOffsetT = 12;
-  pub const VT_DEFAULT_REAL: flatbuffers::VOffsetT = 14;
-  pub const VT_DEPRECATED: flatbuffers::VOffsetT = 16;
-  pub const VT_REQUIRED: flatbuffers::VOffsetT = 18;
-  pub const VT_KEY: flatbuffers::VOffsetT = 20;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 22;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 24;
-  pub const VT_OPTIONAL: flatbuffers::VOffsetT = 26;
-  pub const VT_PADDING: flatbuffers::VOffsetT = 28;
-  pub const VT_OFFSET64: flatbuffers::VOffsetT = 30;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Field { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args FieldArgs<'args>
-  ) -> flatbuffers::WIPOffset<Field<'bldr>> {
-    let mut builder = FieldBuilder::new(_fbb);
-    builder.add_default_real(args.default_real);
-    builder.add_default_integer(args.default_integer);
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    if let Some(x) = args.type_ { builder.add_type_(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.add_padding(args.padding);
-    builder.add_offset(args.offset);
-    builder.add_id(args.id);
-    builder.add_offset64(args.offset64);
-    builder.add_optional(args.optional);
-    builder.add_key(args.key);
-    builder.add_required(args.required);
-    builder.add_deprecated(args.deprecated);
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Field::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &Field) -> bool {
-    self.name() < o.name()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.name();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn type_(&self) -> Type<'a> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Type>>(Field::VT_TYPE_, None).unwrap()}
-  }
-  #[inline]
-  pub fn id(&self) -> u16 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u16>(Field::VT_ID, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn offset(&self) -> u16 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u16>(Field::VT_OFFSET, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn default_integer(&self) -> i64 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<i64>(Field::VT_DEFAULT_INTEGER, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn default_real(&self) -> f64 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<f64>(Field::VT_DEFAULT_REAL, Some(0.0)).unwrap()}
-  }
-  #[inline]
-  pub fn deprecated(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Field::VT_DEPRECATED, Some(false)).unwrap()}
-  }
-  #[inline]
-  pub fn required(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Field::VT_REQUIRED, Some(false)).unwrap()}
-  }
-  #[inline]
-  pub fn key(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Field::VT_KEY, Some(false)).unwrap()}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Field::VT_ATTRIBUTES, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(Field::VT_DOCUMENTATION, None)}
-  }
-  #[inline]
-  pub fn optional(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Field::VT_OPTIONAL, Some(false)).unwrap()}
-  }
-  /// Number of padding octets to always add after this field. Structs only.
-  #[inline]
-  pub fn padding(&self) -> u16 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<u16>(Field::VT_PADDING, Some(0)).unwrap()}
-  }
-  /// If the field uses 64-bit offsets.
-  #[inline]
-  pub fn offset64(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Field::VT_OFFSET64, Some(false)).unwrap()}
-  }
-}
-
-impl flatbuffers::Verifiable for Field<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Type>>("type_", Self::VT_TYPE_, true)?
-     .visit_field::<u16>("id", Self::VT_ID, false)?
-     .visit_field::<u16>("offset", Self::VT_OFFSET, false)?
-     .visit_field::<i64>("default_integer", Self::VT_DEFAULT_INTEGER, false)?
-     .visit_field::<f64>("default_real", Self::VT_DEFAULT_REAL, false)?
-     .visit_field::<bool>("deprecated", Self::VT_DEPRECATED, false)?
-     .visit_field::<bool>("required", Self::VT_REQUIRED, false)?
-     .visit_field::<bool>("key", Self::VT_KEY, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .visit_field::<bool>("optional", Self::VT_OPTIONAL, false)?
-     .visit_field::<u16>("padding", Self::VT_PADDING, false)?
-     .visit_field::<bool>("offset64", Self::VT_OFFSET64, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct FieldArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub type_: Option<flatbuffers::WIPOffset<Type<'a>>>,
-    pub id: u16,
-    pub offset: u16,
-    pub default_integer: i64,
-    pub default_real: f64,
-    pub deprecated: bool,
-    pub required: bool,
-    pub key: bool,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-    pub optional: bool,
-    pub padding: u16,
-    pub offset64: bool,
-}
-impl<'a> Default for FieldArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    FieldArgs {
-      name: None, // required field
-      type_: None, // required field
-      id: 0,
-      offset: 0,
-      default_integer: 0,
-      default_real: 0.0,
-      deprecated: false,
-      required: false,
-      key: false,
-      attributes: None,
-      documentation: None,
-      optional: false,
-      padding: 0,
-      offset64: false,
-    }
-  }
-}
-
-pub struct FieldBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FieldBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<Type<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(Field::VT_TYPE_, type_);
-  }
-  #[inline]
-  pub fn add_id(&mut self, id: u16) {
-    self.fbb_.push_slot::<u16>(Field::VT_ID, id, 0);
-  }
-  #[inline]
-  pub fn add_offset(&mut self, offset: u16) {
-    self.fbb_.push_slot::<u16>(Field::VT_OFFSET, offset, 0);
-  }
-  #[inline]
-  pub fn add_default_integer(&mut self, default_integer: i64) {
-    self.fbb_.push_slot::<i64>(Field::VT_DEFAULT_INTEGER, default_integer, 0);
-  }
-  #[inline]
-  pub fn add_default_real(&mut self, default_real: f64) {
-    self.fbb_.push_slot::<f64>(Field::VT_DEFAULT_REAL, default_real, 0.0);
-  }
-  #[inline]
-  pub fn add_deprecated(&mut self, deprecated: bool) {
-    self.fbb_.push_slot::<bool>(Field::VT_DEPRECATED, deprecated, false);
-  }
-  #[inline]
-  pub fn add_required(&mut self, required: bool) {
-    self.fbb_.push_slot::<bool>(Field::VT_REQUIRED, required, false);
-  }
-  #[inline]
-  pub fn add_key(&mut self, key: bool) {
-    self.fbb_.push_slot::<bool>(Field::VT_KEY, key, false);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn add_optional(&mut self, optional: bool) {
-    self.fbb_.push_slot::<bool>(Field::VT_OPTIONAL, optional, false);
-  }
-  #[inline]
-  pub fn add_padding(&mut self, padding: u16) {
-    self.fbb_.push_slot::<u16>(Field::VT_PADDING, padding, 0);
-  }
-  #[inline]
-  pub fn add_offset64(&mut self, offset64: bool) {
-    self.fbb_.push_slot::<bool>(Field::VT_OFFSET64, offset64, false);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FieldBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    FieldBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Field<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, Field::VT_NAME,"name");
-    self.fbb_.required(o, Field::VT_TYPE_,"type_");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Field<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Field");
-      ds.field("name", &self.name());
-      ds.field("type_", &self.type_());
-      ds.field("id", &self.id());
-      ds.field("offset", &self.offset());
-      ds.field("default_integer", &self.default_integer());
-      ds.field("default_real", &self.default_real());
-      ds.field("deprecated", &self.deprecated());
-      ds.field("required", &self.required());
-      ds.field("key", &self.key());
-      ds.field("attributes", &self.attributes());
-      ds.field("documentation", &self.documentation());
-      ds.field("optional", &self.optional());
-      ds.field("padding", &self.padding());
-      ds.field("offset64", &self.offset64());
-      ds.finish()
-  }
-}
-pub enum ObjectOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct Object<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Object<'a> {
-  type Inner = Object<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Object<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_FIELDS: flatbuffers::VOffsetT = 6;
-  pub const VT_IS_STRUCT: flatbuffers::VOffsetT = 8;
-  pub const VT_MINALIGN: flatbuffers::VOffsetT = 10;
-  pub const VT_BYTESIZE: flatbuffers::VOffsetT = 12;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 16;
-  pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 18;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Object { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args ObjectArgs<'args>
-  ) -> flatbuffers::WIPOffset<Object<'bldr>> {
-    let mut builder = ObjectBuilder::new(_fbb);
-    if let Some(x) = args.declaration_file { builder.add_declaration_file(x); }
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    builder.add_bytesize(args.bytesize);
-    builder.add_minalign(args.minalign);
-    if let Some(x) = args.fields { builder.add_fields(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.add_is_struct(args.is_struct);
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &Object) -> bool {
-    self.name() < o.name()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.name();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn fields(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>>>(Object::VT_FIELDS, None).unwrap()}
-  }
-  #[inline]
-  pub fn is_struct(&self) -> bool {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<bool>(Object::VT_IS_STRUCT, Some(false)).unwrap()}
-  }
-  #[inline]
-  pub fn minalign(&self) -> i32 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<i32>(Object::VT_MINALIGN, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn bytesize(&self) -> i32 {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<i32>(Object::VT_BYTESIZE, Some(0)).unwrap()}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Object::VT_ATTRIBUTES, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(Object::VT_DOCUMENTATION, None)}
-  }
-  /// File that this Object is declared in.
-  #[inline]
-  pub fn declaration_file(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_DECLARATION_FILE, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for Object<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>>>("fields", Self::VT_FIELDS, true)?
-     .visit_field::<bool>("is_struct", Self::VT_IS_STRUCT, false)?
-     .visit_field::<i32>("minalign", Self::VT_MINALIGN, false)?
-     .visit_field::<i32>("bytesize", Self::VT_BYTESIZE, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("declaration_file", Self::VT_DECLARATION_FILE, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct ObjectArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub fields: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>>>,
-    pub is_struct: bool,
-    pub minalign: i32,
-    pub bytesize: i32,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-    pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
-}
-impl<'a> Default for ObjectArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    ObjectArgs {
-      name: None, // required field
-      fields: None, // required field
-      is_struct: false,
-      minalign: 0,
-      bytesize: 0,
-      attributes: None,
-      documentation: None,
-      declaration_file: None,
-    }
-  }
-}
-
-pub struct ObjectBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ObjectBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_fields(&mut self, fields: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Field<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_FIELDS, fields);
-  }
-  #[inline]
-  pub fn add_is_struct(&mut self, is_struct: bool) {
-    self.fbb_.push_slot::<bool>(Object::VT_IS_STRUCT, is_struct, false);
-  }
-  #[inline]
-  pub fn add_minalign(&mut self, minalign: i32) {
-    self.fbb_.push_slot::<i32>(Object::VT_MINALIGN, minalign, 0);
-  }
-  #[inline]
-  pub fn add_bytesize(&mut self, bytesize: i32) {
-    self.fbb_.push_slot::<i32>(Object::VT_BYTESIZE, bytesize, 0);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_DECLARATION_FILE, declaration_file);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ObjectBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    ObjectBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Object<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, Object::VT_NAME,"name");
-    self.fbb_.required(o, Object::VT_FIELDS,"fields");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Object<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Object");
-      ds.field("name", &self.name());
-      ds.field("fields", &self.fields());
-      ds.field("is_struct", &self.is_struct());
-      ds.field("minalign", &self.minalign());
-      ds.field("bytesize", &self.bytesize());
-      ds.field("attributes", &self.attributes());
-      ds.field("documentation", &self.documentation());
-      ds.field("declaration_file", &self.declaration_file());
-      ds.finish()
-  }
-}
-pub enum RPCCallOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct RPCCall<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for RPCCall<'a> {
-  type Inner = RPCCall<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> RPCCall<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_REQUEST: flatbuffers::VOffsetT = 6;
-  pub const VT_RESPONSE: flatbuffers::VOffsetT = 8;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 10;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    RPCCall { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args RPCCallArgs<'args>
-  ) -> flatbuffers::WIPOffset<RPCCall<'bldr>> {
-    let mut builder = RPCCallBuilder::new(_fbb);
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    if let Some(x) = args.response { builder.add_response(x); }
-    if let Some(x) = args.request { builder.add_request(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RPCCall::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &RPCCall) -> bool {
-    self.name() < o.name()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.name();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn request(&self) -> Object<'a> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_REQUEST, None).unwrap()}
-  }
-  #[inline]
-  pub fn response(&self) -> Object<'a> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_RESPONSE, None).unwrap()}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(RPCCall::VT_ATTRIBUTES, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(RPCCall::VT_DOCUMENTATION, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for RPCCall<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Object>>("request", Self::VT_REQUEST, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Object>>("response", Self::VT_RESPONSE, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct RPCCallArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub request: Option<flatbuffers::WIPOffset<Object<'a>>>,
-    pub response: Option<flatbuffers::WIPOffset<Object<'a>>>,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-}
-impl<'a> Default for RPCCallArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    RPCCallArgs {
-      name: None, // required field
-      request: None, // required field
-      response: None, // required field
-      attributes: None,
-      documentation: None,
-    }
-  }
-}
-
-pub struct RPCCallBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RPCCallBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_request(&mut self, request: flatbuffers::WIPOffset<Object<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_REQUEST, request);
-  }
-  #[inline]
-  pub fn add_response(&mut self, response: flatbuffers::WIPOffset<Object<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_RESPONSE, response);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RPCCallBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    RPCCallBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<RPCCall<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, RPCCall::VT_NAME,"name");
-    self.fbb_.required(o, RPCCall::VT_REQUEST,"request");
-    self.fbb_.required(o, RPCCall::VT_RESPONSE,"response");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for RPCCall<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("RPCCall");
-      ds.field("name", &self.name());
-      ds.field("request", &self.request());
-      ds.field("response", &self.response());
-      ds.field("attributes", &self.attributes());
-      ds.field("documentation", &self.documentation());
-      ds.finish()
-  }
-}
-pub enum ServiceOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct Service<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Service<'a> {
-  type Inner = Service<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Service<'a> {
-  pub const VT_NAME: flatbuffers::VOffsetT = 4;
-  pub const VT_CALLS: flatbuffers::VOffsetT = 6;
-  pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 8;
-  pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 10;
-  pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 12;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Service { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args ServiceArgs<'args>
-  ) -> flatbuffers::WIPOffset<Service<'bldr>> {
-    let mut builder = ServiceBuilder::new(_fbb);
-    if let Some(x) = args.declaration_file { builder.add_declaration_file(x); }
-    if let Some(x) = args.documentation { builder.add_documentation(x); }
-    if let Some(x) = args.attributes { builder.add_attributes(x); }
-    if let Some(x) = args.calls { builder.add_calls(x); }
-    if let Some(x) = args.name { builder.add_name(x); }
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn name(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_NAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &Service) -> bool {
-    self.name() < o.name()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.name();
-    key.cmp(val)
-  }
-  #[inline]
-  pub fn calls(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall>>>>(Service::VT_CALLS, None)}
-  }
-  #[inline]
-  pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Service::VT_ATTRIBUTES, None)}
-  }
-  #[inline]
-  pub fn documentation(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(Service::VT_DOCUMENTATION, None)}
-  }
-  /// File that this Service is declared in.
-  #[inline]
-  pub fn declaration_file(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_DECLARATION_FILE, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for Service<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RPCCall>>>>("calls", Self::VT_CALLS, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("attributes", Self::VT_ATTRIBUTES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("documentation", Self::VT_DOCUMENTATION, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("declaration_file", Self::VT_DECLARATION_FILE, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct ServiceArgs<'a> {
-    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub calls: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>>>,
-    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
-    pub documentation: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-    pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
-}
-impl<'a> Default for ServiceArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    ServiceArgs {
-      name: None, // required field
-      calls: None,
-      attributes: None,
-      documentation: None,
-      declaration_file: None,
-    }
-  }
-}
-
-pub struct ServiceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ServiceBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_NAME, name);
-  }
-  #[inline]
-  pub fn add_calls(&mut self, calls: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RPCCall<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_CALLS, calls);
-  }
-  #[inline]
-  pub fn add_attributes(&mut self, attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_ATTRIBUTES, attributes);
-  }
-  #[inline]
-  pub fn add_documentation(&mut self, documentation: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_DOCUMENTATION, documentation);
-  }
-  #[inline]
-  pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_DECLARATION_FILE, declaration_file);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ServiceBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    ServiceBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Service<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, Service::VT_NAME,"name");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Service<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Service");
-      ds.field("name", &self.name());
-      ds.field("calls", &self.calls());
-      ds.field("attributes", &self.attributes());
-      ds.field("documentation", &self.documentation());
-      ds.field("declaration_file", &self.declaration_file());
-      ds.finish()
-  }
-}
-pub enum SchemaFileOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-/// File specific information.
-/// Symbols declared within a file may be recovered by iterating over all
-/// symbols and examining the `declaration_file` field.
-pub struct SchemaFile<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for SchemaFile<'a> {
-  type Inner = SchemaFile<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> SchemaFile<'a> {
-  pub const VT_FILENAME: flatbuffers::VOffsetT = 4;
-  pub const VT_INCLUDED_FILENAMES: flatbuffers::VOffsetT = 6;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    SchemaFile { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args SchemaFileArgs<'args>
-  ) -> flatbuffers::WIPOffset<SchemaFile<'bldr>> {
-    let mut builder = SchemaFileBuilder::new(_fbb);
-    if let Some(x) = args.included_filenames { builder.add_included_filenames(x); }
-    if let Some(x) = args.filename { builder.add_filename(x); }
-    builder.finish()
-  }
-
-
-  /// Filename, relative to project root.
-  #[inline]
-  pub fn filename(&self) -> &'a str {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SchemaFile::VT_FILENAME, None).unwrap()}
-  }
-  #[inline]
-  pub fn key_compare_less_than(&self, o: &SchemaFile) -> bool {
-    self.filename() < o.filename()
-  }
-
-  #[inline]
-  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
-    let key = self.filename();
-    key.cmp(val)
-  }
-  /// Names of included files, relative to project root.
-  #[inline]
-  pub fn included_filenames(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(SchemaFile::VT_INCLUDED_FILENAMES, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for SchemaFile<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("filename", Self::VT_FILENAME, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("included_filenames", Self::VT_INCLUDED_FILENAMES, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct SchemaFileArgs<'a> {
-    pub filename: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub included_filenames: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
-}
-impl<'a> Default for SchemaFileArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    SchemaFileArgs {
-      filename: None, // required field
-      included_filenames: None,
-    }
-  }
-}
-
-pub struct SchemaFileBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SchemaFileBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_filename(&mut self, filename: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SchemaFile::VT_FILENAME, filename);
-  }
-  #[inline]
-  pub fn add_included_filenames(&mut self, included_filenames: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SchemaFile::VT_INCLUDED_FILENAMES, included_filenames);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SchemaFileBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    SchemaFileBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<SchemaFile<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, SchemaFile::VT_FILENAME,"filename");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for SchemaFile<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("SchemaFile");
-      ds.field("filename", &self.filename());
-      ds.field("included_filenames", &self.included_filenames());
-      ds.finish()
-  }
-}
-pub enum SchemaOffset {}
-#[derive(Copy, Clone, PartialEq)]
-
-pub struct Schema<'a> {
-  pub _tab: flatbuffers::Table<'a>,
-}
-
-impl<'a> flatbuffers::Follow<'a> for Schema<'a> {
-  type Inner = Schema<'a>;
-  #[inline]
-  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-    Self { _tab: flatbuffers::Table::new(buf, loc) }
-  }
-}
-
-impl<'a> Schema<'a> {
-  pub const VT_OBJECTS: flatbuffers::VOffsetT = 4;
-  pub const VT_ENUMS: flatbuffers::VOffsetT = 6;
-  pub const VT_FILE_IDENT: flatbuffers::VOffsetT = 8;
-  pub const VT_FILE_EXT: flatbuffers::VOffsetT = 10;
-  pub const VT_ROOT_TABLE: flatbuffers::VOffsetT = 12;
-  pub const VT_SERVICES: flatbuffers::VOffsetT = 14;
-  pub const VT_ADVANCED_FEATURES: flatbuffers::VOffsetT = 16;
-  pub const VT_FBS_FILES: flatbuffers::VOffsetT = 18;
-
-  #[inline]
-  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
-    Schema { _tab: table }
-  }
-  #[allow(unused_mut)]
-  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
-    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
-    args: &'args SchemaArgs<'args>
-  ) -> flatbuffers::WIPOffset<Schema<'bldr>> {
-    let mut builder = SchemaBuilder::new(_fbb);
-    builder.add_advanced_features(args.advanced_features);
-    if let Some(x) = args.fbs_files { builder.add_fbs_files(x); }
-    if let Some(x) = args.services { builder.add_services(x); }
-    if let Some(x) = args.root_table { builder.add_root_table(x); }
-    if let Some(x) = args.file_ext { builder.add_file_ext(x); }
-    if let Some(x) = args.file_ident { builder.add_file_ident(x); }
-    if let Some(x) = args.enums { builder.add_enums(x); }
-    if let Some(x) = args.objects { builder.add_objects(x); }
-    builder.finish()
-  }
-
-
-  #[inline]
-  pub fn objects(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object>>>>(Schema::VT_OBJECTS, None).unwrap()}
-  }
-  #[inline]
-  pub fn enums(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum>>>>(Schema::VT_ENUMS, None).unwrap()}
-  }
-  #[inline]
-  pub fn file_ident(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_IDENT, None)}
-  }
-  #[inline]
-  pub fn file_ext(&self) -> Option<&'a str> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_EXT, None)}
-  }
-  #[inline]
-  pub fn root_table(&self) -> Option<Object<'a>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Object>>(Schema::VT_ROOT_TABLE, None)}
-  }
-  #[inline]
-  pub fn services(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service>>>>(Schema::VT_SERVICES, None)}
-  }
-  #[inline]
-  pub fn advanced_features(&self) -> AdvancedFeatures {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<AdvancedFeatures>(Schema::VT_ADVANCED_FEATURES, Some(Default::default())).unwrap()}
-  }
-  /// All the files used in this compilation. Files are relative to where
-  /// flatc was invoked.
-  #[inline]
-  pub fn fbs_files(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>> {
-    // Safety:
-    // Created from valid Table for this object
-    // which contains a valid value in this slot
-    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile>>>>(Schema::VT_FBS_FILES, None)}
-  }
-}
-
-impl flatbuffers::Verifiable for Schema<'_> {
-  #[inline]
-  fn run_verifier(
-    v: &mut flatbuffers::Verifier, pos: usize
-  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
-    use self::flatbuffers::Verifiable;
-    v.visit_table(pos)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Object>>>>("objects", Self::VT_OBJECTS, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Enum>>>>("enums", Self::VT_ENUMS, true)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("file_ident", Self::VT_FILE_IDENT, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("file_ext", Self::VT_FILE_EXT, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<Object>>("root_table", Self::VT_ROOT_TABLE, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Service>>>>("services", Self::VT_SERVICES, false)?
-     .visit_field::<AdvancedFeatures>("advanced_features", Self::VT_ADVANCED_FEATURES, false)?
-     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SchemaFile>>>>("fbs_files", Self::VT_FBS_FILES, false)?
-     .finish();
-    Ok(())
-  }
-}
-pub struct SchemaArgs<'a> {
-    pub objects: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>>>>,
-    pub enums: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>>>>,
-    pub file_ident: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub file_ext: Option<flatbuffers::WIPOffset<&'a str>>,
-    pub root_table: Option<flatbuffers::WIPOffset<Object<'a>>>,
-    pub services: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>>>,
-    pub advanced_features: AdvancedFeatures,
-    pub fbs_files: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>>>,
-}
-impl<'a> Default for SchemaArgs<'a> {
-  #[inline]
-  fn default() -> Self {
-    SchemaArgs {
-      objects: None, // required field
-      enums: None, // required field
-      file_ident: None,
-      file_ext: None,
-      root_table: None,
-      services: None,
-      advanced_features: Default::default(),
-      fbs_files: None,
-    }
-  }
-}
-
-pub struct SchemaBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
-  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
-}
-impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SchemaBuilder<'a, 'b, A> {
-  #[inline]
-  pub fn add_objects(&mut self, objects: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Object<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_OBJECTS, objects);
-  }
-  #[inline]
-  pub fn add_enums(&mut self, enums: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Enum<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_ENUMS, enums);
-  }
-  #[inline]
-  pub fn add_file_ident(&mut self, file_ident: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_IDENT, file_ident);
-  }
-  #[inline]
-  pub fn add_file_ext(&mut self, file_ext: flatbuffers::WIPOffset<&'b  str>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_EXT, file_ext);
-  }
-  #[inline]
-  pub fn add_root_table(&mut self, root_table: flatbuffers::WIPOffset<Object<'b >>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Object>>(Schema::VT_ROOT_TABLE, root_table);
-  }
-  #[inline]
-  pub fn add_services(&mut self, services: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Service<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_SERVICES, services);
-  }
-  #[inline]
-  pub fn add_advanced_features(&mut self, advanced_features: AdvancedFeatures) {
-    self.fbb_.push_slot::<AdvancedFeatures>(Schema::VT_ADVANCED_FEATURES, advanced_features, Default::default());
-  }
-  #[inline]
-  pub fn add_fbs_files(&mut self, fbs_files: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SchemaFile<'b >>>>) {
-    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FBS_FILES, fbs_files);
-  }
-  #[inline]
-  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SchemaBuilder<'a, 'b, A> {
-    let start = _fbb.start_table();
-    SchemaBuilder {
-      fbb_: _fbb,
-      start_: start,
-    }
-  }
-  #[inline]
-  pub fn finish(self) -> flatbuffers::WIPOffset<Schema<'a>> {
-    let o = self.fbb_.end_table(self.start_);
-    self.fbb_.required(o, Schema::VT_OBJECTS,"objects");
-    self.fbb_.required(o, Schema::VT_ENUMS,"enums");
-    flatbuffers::WIPOffset::new(o.value())
-  }
-}
-
-impl core::fmt::Debug for Schema<'_> {
-  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-    let mut ds = f.debug_struct("Schema");
-      ds.field("objects", &self.objects());
-      ds.field("enums", &self.enums());
-      ds.field("file_ident", &self.file_ident());
-      ds.field("file_ext", &self.file_ext());
-      ds.field("root_table", &self.root_table());
-      ds.field("services", &self.services());
-      ds.field("advanced_features", &self.advanced_features());
-      ds.field("fbs_files", &self.fbs_files());
-      ds.finish()
-  }
-}
-#[inline]
-/// Verifies that a buffer of bytes contains a `Schema`
-/// and returns it.
-/// Note that verification is still experimental and may not
-/// catch every error, or be maximally performant. For the
-/// previous, unchecked, behavior use
-/// `root_as_schema_unchecked`.
-pub fn root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
-  flatbuffers::root::<Schema>(buf)
-}
-#[inline]
-/// Verifies that a buffer of bytes contains a size prefixed
-/// `Schema` and returns it.
-/// Note that verification is still experimental and may not
-/// catch every error, or be maximally performant. For the
-/// previous, unchecked, behavior use
-/// `size_prefixed_root_as_schema_unchecked`.
-pub fn size_prefixed_root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
-  flatbuffers::size_prefixed_root::<Schema>(buf)
-}
-#[inline]
-/// Verifies, with the given options, that a buffer of bytes
-/// contains a `Schema` and returns it.
-/// Note that verification is still experimental and may not
-/// catch every error, or be maximally performant. For the
-/// previous, unchecked, behavior use
-/// `root_as_schema_unchecked`.
-pub fn root_as_schema_with_opts<'b, 'o>(
-  opts: &'o flatbuffers::VerifierOptions,
-  buf: &'b [u8],
-) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
-  flatbuffers::root_with_opts::<Schema<'b>>(opts, buf)
-}
-#[inline]
-/// Verifies, with the given verifier options, that a buffer of
-/// bytes contains a size prefixed `Schema` and returns
-/// it. Note that verification is still experimental and may not
-/// catch every error, or be maximally performant. For the
-/// previous, unchecked, behavior use
-/// `root_as_schema_unchecked`.
-pub fn size_prefixed_root_as_schema_with_opts<'b, 'o>(
-  opts: &'o flatbuffers::VerifierOptions,
-  buf: &'b [u8],
-) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
-  flatbuffers::size_prefixed_root_with_opts::<Schema<'b>>(opts, buf)
-}
-#[inline]
-/// Assumes, without verification, that a buffer of bytes contains a Schema and returns it.
-/// # Safety
-/// Callers must trust the given bytes do indeed contain a valid `Schema`.
-pub unsafe fn root_as_schema_unchecked(buf: &[u8]) -> Schema {
-  flatbuffers::root_unchecked::<Schema>(buf)
-}
-#[inline]
-/// Assumes, without verification, that a buffer of bytes contains a size prefixed Schema and returns it.
-/// # Safety
-/// Callers must trust the given bytes do indeed contain a valid size prefixed `Schema`.
-pub unsafe fn size_prefixed_root_as_schema_unchecked(buf: &[u8]) -> Schema {
-  flatbuffers::size_prefixed_root_unchecked::<Schema>(buf)
-}
-pub const SCHEMA_IDENTIFIER: &str = "BFBS";
-
-#[inline]
-pub fn schema_buffer_has_identifier(buf: &[u8]) -> bool {
-  flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, false)
-}
-
-#[inline]
-pub fn schema_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
-  flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, true)
-}
-
-pub const SCHEMA_EXTENSION: &str = "bfbs";
-
-#[inline]
-pub fn finish_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
-    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
-    root: flatbuffers::WIPOffset<Schema<'a>>) {
-  fbb.finish(root, Some(SCHEMA_IDENTIFIER));
-}
-
-#[inline]
-pub fn finish_size_prefixed_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<Schema<'a>>) {
-  fbb.finish_size_prefixed(root, Some(SCHEMA_IDENTIFIER));
-}
-}  // pub mod reflection
-
+} // pub mod reflection
diff --git a/rust/reflection/src/reflection_verifier.rs b/rust/reflection/src/reflection_verifier.rs
index 4373914..524efbd 100644
--- a/rust/reflection/src/reflection_verifier.rs
+++ b/rust/reflection/src/reflection_verifier.rs
@@ -156,12 +156,7 @@
             }
             _ => {
                 return Err(FlatbufferError::TypeNotSupported(
-                    field
-                        .type_()
-                        .base_type()
-                        .variant_name()
-                        .unwrap_or_default()
-                        .to_string(),
+                    field.type_().base_type().variant_name().unwrap_or_default().to_string(),
                 ));
             }
         };
@@ -342,12 +337,7 @@
         }
         _ => {
             return Err(FlatbufferError::TypeNotSupported(
-                field
-                    .type_()
-                    .base_type()
-                    .variant_name()
-                    .unwrap_or_default()
-                    .to_string(),
+                field.type_().base_type().variant_name().unwrap_or_default().to_string(),
             ))
         }
     }
@@ -401,11 +391,7 @@
             }
             _ => {
                 return Err(FlatbufferError::TypeNotSupported(
-                    enum_type
-                        .base_type()
-                        .variant_name()
-                        .unwrap_or_default()
-                        .to_string(),
+                    enum_type.base_type().variant_name().unwrap_or_default().to_string(),
                 ))
             }
         }
diff --git a/rust/reflection/src/safe_buffer.rs b/rust/reflection/src/safe_buffer.rs
index ba61e87..dc0f8f9 100644
--- a/rust/reflection/src/safe_buffer.rs
+++ b/rust/reflection/src/safe_buffer.rs
@@ -49,11 +49,7 @@
     ) -> FlatbufferResult<Self> {
         let mut buf_loc_to_obj_idx = HashMap::new();
         verify_with_options(&buf, schema, opts, &mut buf_loc_to_obj_idx)?;
-        Ok(SafeBuffer {
-            buf,
-            schema,
-            buf_loc_to_obj_idx,
-        })
+        Ok(SafeBuffer { buf, schema, buf_loc_to_obj_idx })
     }
 
     /// Gets the root table in the buffer.
@@ -61,10 +57,7 @@
         // SAFETY: the buffer was verified during construction.
         let table = unsafe { get_any_root(self.buf) };
 
-        SafeTable {
-            safe_buf: self,
-            loc: table.loc(),
-        }
+        SafeTable { safe_buf: self, loc: table.loc() }
     }
 
     fn find_field_by_name(
@@ -74,9 +67,7 @@
     ) -> FlatbufferResult<Option<Field>> {
         Ok(self
             .get_all_fields(buf_loc)?
-            .lookup_by_key(field_name, |field: &Field<'_>, key| {
-                field.key_compare_with_value(key)
-            }))
+            .lookup_by_key(field_name, |field: &Field<'_>, key| field.key_compare_with_value(key)))
     }
 
     fn get_all_fields(&self, buf_loc: usize) -> FlatbufferResult<Vector<ForwardsUOffset<Field>>> {
@@ -154,10 +145,7 @@
             // SAFETY: the buffer was verified during construction.
             let optional_st =
                 unsafe { get_field_struct(&Table::new(&self.safe_buf.buf, self.loc), &field)? };
-            Ok(optional_st.map(|st| SafeStruct {
-                safe_buf: self.safe_buf,
-                loc: st.loc(),
-            }))
+            Ok(optional_st.map(|st| SafeStruct { safe_buf: self.safe_buf, loc: st.loc() }))
         } else {
             Err(FlatbufferError::FieldNotFound)
         }
@@ -188,10 +176,7 @@
             // SAFETY: the buffer was verified during construction.
             let optional_table =
                 unsafe { get_field_table(&Table::new(&self.safe_buf.buf, self.loc), &field)? };
-            Ok(optional_table.map(|t| SafeTable {
-                safe_buf: self.safe_buf,
-                loc: t.loc(),
-            }))
+            Ok(optional_table.map(|t| SafeTable { safe_buf: self.safe_buf, loc: t.loc() }))
         } else {
             Err(FlatbufferError::FieldNotFound)
         }
@@ -260,10 +245,7 @@
             let st = unsafe {
                 get_field_struct_in_struct(&Struct::new(&self.safe_buf.buf, self.loc), &field)?
             };
-            Ok(SafeStruct {
-                safe_buf: self.safe_buf,
-                loc: st.loc(),
-            })
+            Ok(SafeStruct { safe_buf: self.safe_buf, loc: st.loc() })
         } else {
             Err(FlatbufferError::FieldNotFound)
         }
diff --git a/samples/SampleBinary.java b/samples/SampleBinary.java
index f7052ae..b1d41d8 100644
--- a/samples/SampleBinary.java
+++ b/samples/SampleBinary.java
@@ -21,9 +21,7 @@
 import MyGame.Sample.Monster;
 import MyGame.Sample.Vec3;
 import MyGame.Sample.Weapon;
-
 import com.google.flatbuffers.FlatBufferBuilder;
-
 import java.nio.ByteBuffer;
 
 class SampleBinary {
@@ -53,7 +51,7 @@
     Monster.addPos(builder, pos);
     Monster.addName(builder, name);
     Monster.addColor(builder, Color.Red);
-    Monster.addHp(builder, (short)300);
+    Monster.addHp(builder, (short) 300);
     Monster.addInventory(builder, inv);
     Monster.addWeapons(builder, weapons);
     Monster.addEquippedType(builder, Equipment.Weapon);
@@ -74,8 +72,8 @@
     Monster monster = Monster.getRootAsMonster(buf);
 
     // Note: We did not set the `mana` field explicitly, so we get back the default value.
-    assert monster.mana() == (short)150;
-    assert monster.hp() == (short)300;
+    assert monster.mana() == (short) 150;
+    assert monster.hp() == (short) 300;
     assert monster.name().equals("Orc");
     assert monster.color() == Color.Red;
     assert monster.pos().x() == 1.0f;
@@ -84,7 +82,7 @@
 
     // Get and test the `inventory` FlatBuffer `vector`.
     for (int i = 0; i < monster.inventoryLength(); i++) {
-      assert monster.inventory(i) == (byte)i;
+      assert monster.inventory(i) == (byte) i;
     }
 
     // Get and test the `weapons` FlatBuffer `vector` of `table`s.
@@ -103,7 +101,7 @@
 
     // Get and test the `equipped` FlatBuffer `union`.
     assert monster.equippedType() == Equipment.Weapon;
-    Weapon equipped = (Weapon)monster.equipped(new Weapon());
+    Weapon equipped = (Weapon) monster.equipped(new Weapon());
     assert equipped.name().equals("Axe");
     assert equipped.damage() == 5;
 
diff --git a/samples/SampleBinary.kt b/samples/SampleBinary.kt
index 04a749c..d1f3c4e 100644
--- a/samples/SampleBinary.kt
+++ b/samples/SampleBinary.kt
@@ -21,7 +21,6 @@
 import MyGame.Sample.Monster
 import MyGame.Sample.Vec3
 import MyGame.Sample.Weapon
-
 import com.google.flatbuffers.FlatBufferBuilder
 
 @kotlin.ExperimentalUnsignedTypes
@@ -31,79 +30,79 @@
     // Example how to use FlatBuffers to create and read binary buffers.
     @JvmStatic
     fun main(args: Array<String>) {
-        val builder = FlatBufferBuilder(0)
+      val builder = FlatBufferBuilder(0)
 
-        // Create some weapons for our Monster ('Sword' and 'Axe').
-        val weaponOneName = builder.createString("Sword")
-        val weaponOneDamage: Short = 3
-        val weaponTwoName = builder.createString("Axe")
-        val weaponTwoDamage: Short = 5
+      // Create some weapons for our Monster ('Sword' and 'Axe').
+      val weaponOneName = builder.createString("Sword")
+      val weaponOneDamage: Short = 3
+      val weaponTwoName = builder.createString("Axe")
+      val weaponTwoDamage: Short = 5
 
-        // Use the `createWeapon()` helper function to create the weapons, since we set every field.
-        val weaps = IntArray(2)
-        weaps[0] = Weapon.createWeapon(builder, weaponOneName, weaponOneDamage)
-        weaps[1] = Weapon.createWeapon(builder, weaponTwoName, weaponTwoDamage)
+      // Use the `createWeapon()` helper function to create the weapons, since we set every field.
+      val weaps = IntArray(2)
+      weaps[0] = Weapon.createWeapon(builder, weaponOneName, weaponOneDamage)
+      weaps[1] = Weapon.createWeapon(builder, weaponTwoName, weaponTwoDamage)
 
-        // Serialize the FlatBuffer data.
-        val name = builder.createString("Orc")
-        val treasure = byteArrayOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).asUByteArray()
-        val inv = Monster.createInventoryVector(builder, treasure)
-        val weapons = Monster.createWeaponsVector(builder, weaps)
-        val pos = Vec3.createVec3(builder, 1.0f, 2.0f, 3.0f)
+      // Serialize the FlatBuffer data.
+      val name = builder.createString("Orc")
+      val treasure = byteArrayOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).asUByteArray()
+      val inv = Monster.createInventoryVector(builder, treasure)
+      val weapons = Monster.createWeaponsVector(builder, weaps)
+      val pos = Vec3.createVec3(builder, 1.0f, 2.0f, 3.0f)
 
-        Monster.startMonster(builder)
-        Monster.addPos(builder, pos)
-        Monster.addName(builder, name)
-        Monster.addColor(builder, Color.Red)
-        Monster.addHp(builder, 300.toShort())
-        Monster.addInventory(builder, inv)
-        Monster.addWeapons(builder, weapons)
-        Monster.addEquippedType(builder, Equipment.Weapon)
-        Monster.addEquipped(builder, weaps[1])
-        val orc = Monster.endMonster(builder)
+      Monster.startMonster(builder)
+      Monster.addPos(builder, pos)
+      Monster.addName(builder, name)
+      Monster.addColor(builder, Color.Red)
+      Monster.addHp(builder, 300.toShort())
+      Monster.addInventory(builder, inv)
+      Monster.addWeapons(builder, weapons)
+      Monster.addEquippedType(builder, Equipment.Weapon)
+      Monster.addEquipped(builder, weaps[1])
+      val orc = Monster.endMonster(builder)
 
-        builder.finish(orc) // You could also call `Monster.finishMonsterBuffer(builder, orc);`.
+      builder.finish(orc) // You could also call `Monster.finishMonsterBuffer(builder, orc);`.
 
-        // We now have a FlatBuffer that can be stored on disk or sent over a network.
+      // We now have a FlatBuffer that can be stored on disk or sent over a network.
 
-        // ...Code to store to disk or send over a network goes here...
+      // ...Code to store to disk or send over a network goes here...
 
-        // Instead, we are going to access it right away, as if we just received it.
+      // Instead, we are going to access it right away, as if we just received it.
 
-        val buf = builder.dataBuffer()
+      val buf = builder.dataBuffer()
 
-        // Get access to the root:
-        val monster = Monster.getRootAsMonster(buf)
+      // Get access to the root:
+      val monster = Monster.getRootAsMonster(buf)
 
-        // Note: We did not set the `mana` field explicitly, so we get back the default value.
-        assert(monster.mana == 150.toShort())
-        assert(monster.hp == 300.toShort())
-        assert(monster.name.equals("Orc"))
-        assert(monster.color == Color.Red)
-        assert(monster.pos!!.x == 1.0f)
-        assert(monster.pos!!.y == 2.0f)
-        assert(monster.pos!!.z == 3.0f)
+      // Note: We did not set the `mana` field explicitly, so we get back the default value.
+      assert(monster.mana == 150.toShort())
+      assert(monster.hp == 300.toShort())
+      assert(monster.name.equals("Orc"))
+      assert(monster.color == Color.Red)
+      assert(monster.pos!!.x == 1.0f)
+      assert(monster.pos!!.y == 2.0f)
+      assert(monster.pos!!.z == 3.0f)
 
-        // Get and test the `inventory` FlatBuffer `vector`.
-        for (i in 0 until monster.inventoryLength) {
-            assert(monster.inventory(i) == i.toUByte())
-        }
+      // Get and test the `inventory` FlatBuffer `vector`.
+      for (i in 0 until monster.inventoryLength) {
+        assert(monster.inventory(i) == i.toUByte())
+      }
 
-        // Get and test the `weapons` FlatBuffer `vector` of `table`s.
-        val expectedWeaponNames = arrayOf("Sword", "Axe")
-        val expectedWeaponDamages = intArrayOf(3, 5)
-        for (i in 0 until monster.weaponsLength) {
-            assert(monster.weapons(i)!!.name.equals(expectedWeaponNames[i]))
-            assert(monster.weapons(i)!!.damage.toInt() == expectedWeaponDamages[i])
-        }
+      // Get and test the `weapons` FlatBuffer `vector` of `table`s.
+      val expectedWeaponNames = arrayOf("Sword", "Axe")
+      val expectedWeaponDamages = intArrayOf(3, 5)
+      for (i in 0 until monster.weaponsLength) {
+        assert(monster.weapons(i)!!.name.equals(expectedWeaponNames[i]))
+        assert(monster.weapons(i)!!.damage.toInt() == expectedWeaponDamages[i])
+      }
 
-        // Get and test the `equipped` FlatBuffer `union`.
-        assert(monster.equippedType == Equipment.Weapon)
-        val equipped = monster.equipped(Weapon()) as Weapon?
-        assert(equipped!!.name.equals("Axe"))
-        assert(equipped.damage == 5.toShort())
+      // Get and test the `equipped` FlatBuffer `union`.
+      assert(monster.equippedType == Equipment.Weapon)
+      val equipped = monster.equipped(Weapon()) as Weapon?
+      assert(equipped!!.name.equals("Axe"))
+      assert(equipped.damage == 5.toShort())
 
-        println("The FlatBuffer was successfully created and verified!")
+      println("The FlatBuffer was successfully created and verified!")
     }
   }
 }
diff --git a/samples/sample_binary.go b/samples/sample_binary.go
index 7b7efac..820c24b 100644
--- a/samples/sample_binary.go
+++ b/samples/sample_binary.go
@@ -19,9 +19,9 @@
 package main
 
 import (
-	sample "github.com/google/flatbuffers/samples/MyGame/Sample"
 	"fmt"
 	flatbuffers "github.com/google/flatbuffers/go"
+	sample "github.com/google/flatbuffers/samples/MyGame/Sample"
 	"strconv"
 )
 
diff --git a/samples/sample_binary.py b/samples/sample_binary.py
index 09a239c..e1273b5 100644
--- a/samples/sample_binary.py
+++ b/samples/sample_binary.py
@@ -20,6 +20,7 @@
 # folder (where it gets placed when using `cmake`).
 import os
 import sys
+
 sys.path.append(os.path.join(os.path.dirname(__file__), '../python'))
 
 import flatbuffers
@@ -31,6 +32,7 @@
 
 # Example of how to use FlatBuffers to create and read binary buffers.
 
+
 def main():
   builder = flatbuffers.Builder(0)
 
@@ -70,11 +72,13 @@
   MyGame.Sample.Monster.MonsterAddHp(builder, 300)
   MyGame.Sample.Monster.MonsterAddName(builder, name)
   MyGame.Sample.Monster.MonsterAddInventory(builder, inv)
-  MyGame.Sample.Monster.MonsterAddColor(builder,
-                                        MyGame.Sample.Color.Color().Red)
+  MyGame.Sample.Monster.MonsterAddColor(
+      builder, MyGame.Sample.Color.Color().Red
+  )
   MyGame.Sample.Monster.MonsterAddWeapons(builder, weapons)
   MyGame.Sample.Monster.MonsterAddEquippedType(
-      builder, MyGame.Sample.Equipment.Equipment().Weapon)
+      builder, MyGame.Sample.Equipment.Equipment().Weapon
+  )
   MyGame.Sample.Monster.MonsterAddEquipped(builder, axe)
   orc = MyGame.Sample.Monster.MonsterEnd(builder)
 
@@ -128,10 +132,11 @@
     union_weapon = MyGame.Sample.Weapon.Weapon()
     union_weapon.Init(monster.Equipped().Bytes, monster.Equipped().Pos)
 
-    assert union_weapon.Name() == b"Axe"
+    assert union_weapon.Name() == b'Axe'
     assert union_weapon.Damage() == 5
 
   print('The FlatBuffer was successfully created and verified!')
 
+
 if __name__ == '__main__':
   main()
diff --git a/samples/sample_binary.rs b/samples/sample_binary.rs
index 2fed9e5..038f7f0 100644
--- a/samples/sample_binary.rs
+++ b/samples/sample_binary.rs
@@ -21,135 +21,131 @@
 #[allow(dead_code, unused_imports)]
 #[allow(clippy::all)]
 mod rust_generated;
-pub use rust_generated::my_game::sample::{Color, Equipment,
-                                             Monster, MonsterArgs,
-                                             Vec3,
-                                             Weapon, WeaponArgs};
-
+pub use rust_generated::my_game::sample::{
+    Color, Equipment, Monster, MonsterArgs, Vec3, Weapon, WeaponArgs,
+};
 
 // Example how to use FlatBuffers to create and read binary buffers.
 #[allow(clippy::float_cmp)]
 fn main() {
-  // Build up a serialized buffer algorithmically.
-  // Initialize it with a capacity of 1024 bytes.
-  let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024);
+    // Build up a serialized buffer algorithmically.
+    // Initialize it with a capacity of 1024 bytes.
+    let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024);
 
-  // Serialize some weapons for the Monster: A 'sword' and an 'axe'.
-  let weapon_one_name = builder.create_string("Sword");
-  let weapon_two_name = builder.create_string("Axe");
+    // Serialize some weapons for the Monster: A 'sword' and an 'axe'.
+    let weapon_one_name = builder.create_string("Sword");
+    let weapon_two_name = builder.create_string("Axe");
 
-  // Use the `Weapon::create` shortcut to create Weapons with named field
-  // arguments.
-  let sword = Weapon::create(&mut builder, &WeaponArgs{
-      name: Some(weapon_one_name),
-      damage: 3,
-  });
-  let axe = Weapon::create(&mut builder, &WeaponArgs{
-      name: Some(weapon_two_name),
-      damage: 5,
-  });
+    // Use the `Weapon::create` shortcut to create Weapons with named field
+    // arguments.
+    let sword =
+        Weapon::create(&mut builder, &WeaponArgs { name: Some(weapon_one_name), damage: 3 });
+    let axe = Weapon::create(&mut builder, &WeaponArgs { name: Some(weapon_two_name), damage: 5 });
 
-  // Name of the Monster.
-  let name = builder.create_string("Orc");
+    // Name of the Monster.
+    let name = builder.create_string("Orc");
 
-  // Inventory.
-  let inventory = builder.create_vector(&[0u8, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+    // Inventory.
+    let inventory = builder.create_vector(&[0u8, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
 
-  // Create a FlatBuffer `vector` that contains offsets to the sword and axe
-  // we created above.
-  let weapons = builder.create_vector(&[sword, axe]);
+    // Create a FlatBuffer `vector` that contains offsets to the sword and axe
+    // we created above.
+    let weapons = builder.create_vector(&[sword, axe]);
 
-  // Create the path vector of Vec3 objects:
-  //let x = Vec3::new(1.0, 2.0, 3.0);
-  //let y = Vec3::new(4.0, 5.0, 6.0);
-  //let path = builder.create_vector(&[x, y]);
+    // Create the path vector of Vec3 objects:
+    //let x = Vec3::new(1.0, 2.0, 3.0);
+    //let y = Vec3::new(4.0, 5.0, 6.0);
+    //let path = builder.create_vector(&[x, y]);
 
-  // Note that, for convenience, it is also valid to create a vector of
-  // references to structs, like this:
-  // let path = builder.create_vector(&[&x, &y]);
+    // Note that, for convenience, it is also valid to create a vector of
+    // references to structs, like this:
+    // let path = builder.create_vector(&[&x, &y]);
 
-  // Create the monster using the `Monster::create` helper function. This
-  // function accepts a `MonsterArgs` struct, which supplies all of the data
-  // needed to build a `Monster`. To supply empty/default fields, just use the
-  // Rust built-in `Default::default()` function, as demonstrated below.
-  let orc = Monster::create(&mut builder, &MonsterArgs{
-      pos: Some(&Vec3::new(1.0f32, 2.0f32, 3.0f32)),
-      mana: 150,
-      hp: 80,
-      name: Some(name),
-      inventory: Some(inventory),
-      color: Color::Red,
-      weapons: Some(weapons),
-      equipped_type: Equipment::Weapon,
-      equipped: Some(axe.as_union_value()),
-      //path: Some(path),
-      ..Default::default()
-  });
+    // Create the monster using the `Monster::create` helper function. This
+    // function accepts a `MonsterArgs` struct, which supplies all of the data
+    // needed to build a `Monster`. To supply empty/default fields, just use the
+    // Rust built-in `Default::default()` function, as demonstrated below.
+    let orc = Monster::create(
+        &mut builder,
+        &MonsterArgs {
+            pos: Some(&Vec3::new(1.0f32, 2.0f32, 3.0f32)),
+            mana: 150,
+            hp: 80,
+            name: Some(name),
+            inventory: Some(inventory),
+            color: Color::Red,
+            weapons: Some(weapons),
+            equipped_type: Equipment::Weapon,
+            equipped: Some(axe.as_union_value()),
+            //path: Some(path),
+            ..Default::default()
+        },
+    );
 
-  // Serialize the root of the object, without providing a file identifier.
-  builder.finish(orc, None);
+    // Serialize the root of the object, without providing a file identifier.
+    builder.finish(orc, None);
 
-  // We now have a FlatBuffer we can store on disk or send over a network.
+    // We now have a FlatBuffer we can store on disk or send over a network.
 
-  // ** file/network code goes here :) **
+    // ** file/network code goes here :) **
 
-  // Instead, we're going to access it right away (as if we just received it).
-  // This must be called after `finish()`.
-  let buf = builder.finished_data(); // Of type `&[u8]`
+    // Instead, we're going to access it right away (as if we just received it).
+    // This must be called after `finish()`.
+    let buf = builder.finished_data(); // Of type `&[u8]`
 
-  // Get access to the root:
-  let monster = flatbuffers::root::<Monster>(buf).unwrap();
+    // Get access to the root:
+    let monster = flatbuffers::root::<Monster>(buf).unwrap();
 
-  // Get and test some scalar types from the FlatBuffer.
-  let hp = monster.hp();
-  let mana = monster.mana();
-  let name = monster.name();
+    // Get and test some scalar types from the FlatBuffer.
+    let hp = monster.hp();
+    let mana = monster.mana();
+    let name = monster.name();
 
-  assert_eq!(hp, 80);
-  assert_eq!(mana, 150);  // default
-  assert_eq!(name, Some("Orc"));
+    assert_eq!(hp, 80);
+    assert_eq!(mana, 150); // default
+    assert_eq!(name, Some("Orc"));
 
-  // Get and test a field of the FlatBuffer's `struct`.
-  assert!(monster.pos().is_some());
-  let pos = monster.pos().unwrap();
-  let x = pos.x();
-  let y = pos.y();
-  let z = pos.z();
-  assert_eq!(x, 1.0f32);
-  assert_eq!(y, 2.0f32);
-  assert_eq!(z, 3.0f32);
+    // Get and test a field of the FlatBuffer's `struct`.
+    assert!(monster.pos().is_some());
+    let pos = monster.pos().unwrap();
+    let x = pos.x();
+    let y = pos.y();
+    let z = pos.z();
+    assert_eq!(x, 1.0f32);
+    assert_eq!(y, 2.0f32);
+    assert_eq!(z, 3.0f32);
 
-  // Get an element from the `inventory` FlatBuffer's `vector`.
-  assert!(monster.inventory().is_some());
-  let inv = monster.inventory().unwrap();
-  let third_item = inv.get(2);
-  assert_eq!(third_item, 2);
+    // Get an element from the `inventory` FlatBuffer's `vector`.
+    assert!(monster.inventory().is_some());
+    let inv = monster.inventory().unwrap();
+    let third_item = inv.get(2);
+    assert_eq!(third_item, 2);
 
-  // Get and test the `weapons` FlatBuffers's `vector`.
-  assert!(monster.weapons().is_some());
-  let weps = monster.weapons().unwrap();
-  //let weps_len = weps.len();
-  let wep2 = weps.get(1);
-  let second_weapon_name = wep2.name();
-  let second_weapon_damage = wep2.damage();
-  assert_eq!(second_weapon_name, Some("Axe"));
-  assert_eq!(second_weapon_damage, 5);
+    // Get and test the `weapons` FlatBuffers's `vector`.
+    assert!(monster.weapons().is_some());
+    let weps = monster.weapons().unwrap();
+    //let weps_len = weps.len();
+    let wep2 = weps.get(1);
+    let second_weapon_name = wep2.name();
+    let second_weapon_damage = wep2.damage();
+    assert_eq!(second_weapon_name, Some("Axe"));
+    assert_eq!(second_weapon_damage, 5);
 
-  // Get and test the `Equipment` union (`equipped` field).
-  assert_eq!(monster.equipped_type(), Equipment::Weapon);
-  let equipped = monster.equipped_as_weapon().unwrap();
-  let weapon_name = equipped.name();
-  let weapon_damage = equipped.damage();
-  assert_eq!(weapon_name, Some("Axe"));
-  assert_eq!(weapon_damage, 5);
+    // Get and test the `Equipment` union (`equipped` field).
+    assert_eq!(monster.equipped_type(), Equipment::Weapon);
+    let equipped = monster.equipped_as_weapon().unwrap();
+    let weapon_name = equipped.name();
+    let weapon_damage = equipped.damage();
+    assert_eq!(weapon_name, Some("Axe"));
+    assert_eq!(weapon_damage, 5);
 
-  // Get and test the `path` FlatBuffers's `vector`.
-  //assert_eq!(monster.path().unwrap().len(), 2);
-  //assert_eq!(monster.path().unwrap()[0].x(), 1.0);
-  //assert_eq!(monster.path().unwrap()[1].x(), 4.0);
+    // Get and test the `path` FlatBuffers's `vector`.
+    //assert_eq!(monster.path().unwrap().len(), 2);
+    //assert_eq!(monster.path().unwrap()[0].x(), 1.0);
+    //assert_eq!(monster.path().unwrap()[1].x(), 4.0);
 
-  println!("The FlatBuffer was successfully created and accessed!");
-  dbg!(monster);
+    println!("The FlatBuffer was successfully created and accessed!");
+    dbg!(monster);
 }
 
 #[cfg(test)]
diff --git a/samples/sample_flexbuffers.rs b/samples/sample_flexbuffers.rs
index 074a200..558095e 100644
--- a/samples/sample_flexbuffers.rs
+++ b/samples/sample_flexbuffers.rs
@@ -135,10 +135,7 @@
 
     // Analogously, the `index` method is the safe version of `idx`.
     assert!(read_monster.index("hp").is_ok());
-    assert_eq!(
-        read_monster.index("foo").unwrap_err(),
-        ReaderError::KeyNotFound
-    );
+    assert_eq!(read_monster.index("foo").unwrap_err(), ReaderError::KeyNotFound);
 
     // Maps can also be indexed by usize. They're stored by key so `coins` are the first element.
     let monster_coins = read_monster.idx(0);
diff --git a/samples/sample_flexbuffers_serde.rs b/samples/sample_flexbuffers_serde.rs
index 359ba45..da21ff3 100644
--- a/samples/sample_flexbuffers_serde.rs
+++ b/samples/sample_flexbuffers_serde.rs
@@ -49,14 +49,8 @@
         velocity: [1.0, 0.0, 0.0],
         weapons: vec![
             Weapon::Fist,
-            Weapon::Equipment {
-                name: "great axe".to_string(),
-                damage: 15,
-            },
-            Weapon::Equipment {
-                name: "hammer".to_string(),
-                damage: 5,
-            },
+            Weapon::Equipment { name: "great axe".to_string(), damage: 15 },
+            Weapon::Equipment { name: "hammer".to_string(), damage: 5 },
         ],
         coins: vec![5, 10, 25, 25, 25, 100],
     };
diff --git a/scripts/check-grpc-generated-code.py b/scripts/check-grpc-generated-code.py
index 25b4331..75abd53 100755
--- a/scripts/check-grpc-generated-code.py
+++ b/scripts/check-grpc-generated-code.py
@@ -14,10 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from pathlib import Path
 import subprocess
 import sys
 import generate_grpc_examples
-from pathlib import Path
 
 # Get the path where this script is located so we can invoke the script from
 # any directory and have the paths work correctly.
@@ -29,17 +29,19 @@
 print("Generating GRPC code...")
 generate_grpc_examples.GenerateGRPCExamples()
 
-result = subprocess.run(["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path)
+result = subprocess.run(
+    ["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path
+)
 
 if result.returncode != 0:
-    print(
-        "\n"
-        "ERROR: ********************************************************\n"
-        "ERROR: * The following differences were found after running   *\n"
-        "ERROR: * the script/generate_grpc_examples.py script. Maybe   *\n"
-        "ERROR: * you forgot to run it after making changes in a       *\n"
-        "ERROR: * generator or schema?                                 *\n"
-        "ERROR: ********************************************************\n"
-    )
-    subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
-    sys.exit(result.returncode)
+  print(
+      "\n"
+      "ERROR: ********************************************************\n"
+      "ERROR: * The following differences were found after running   *\n"
+      "ERROR: * the script/generate_grpc_examples.py script. Maybe   *\n"
+      "ERROR: * you forgot to run it after making changes in a       *\n"
+      "ERROR: * generator or schema?                                 *\n"
+      "ERROR: ********************************************************\n"
+  )
+  subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
+  sys.exit(result.returncode)
diff --git a/scripts/check_generate_code.py b/scripts/check_generate_code.py
index aa66734..593845a 100755
--- a/scripts/check_generate_code.py
+++ b/scripts/check_generate_code.py
@@ -14,10 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from pathlib import Path
 import platform
 import subprocess
 import sys
-from pathlib import Path
 
 # Get the path where this script is located so we can invoke the script from
 # any directory and have the paths work correctly.
@@ -26,38 +26,42 @@
 # Get the root path as an absolute path, so all derived paths are absolute.
 root_path = script_path.parent.absolute()
 
-result = subprocess.run(["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path)
+result = subprocess.run(
+    ["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path
+)
 
 if result.returncode != 0:
-    print(
-        "\n"
-        "ERROR: *********************************************************\n"
-        "ERROR: * The following differences were found after building.  *\n"
-        "ERROR: * Perhaps there is a difference in the flags for the.   *\n"
-        "ERROR: * CMakeLists.txt vs the script/generate_code.py script? *\n"
-        "ERROR: *********************************************************\n"
-    )
-    subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
-    sys.exit(result.returncode)
+  print(
+      "\n"
+      "ERROR: *********************************************************\n"
+      "ERROR: * The following differences were found after building.  *\n"
+      "ERROR: * Perhaps there is a difference in the flags for the.   *\n"
+      "ERROR: * CMakeLists.txt vs the script/generate_code.py script? *\n"
+      "ERROR: *********************************************************\n"
+  )
+  subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
+  sys.exit(result.returncode)
 
 # Rung the generate_code.py script, forwarding arguments
 gen_cmd = ["scripts/generate_code.py"] + sys.argv[1:]
 if platform.system() == "Windows":
-    gen_cmd = ["py"] + gen_cmd
+  gen_cmd = ["py"] + gen_cmd
 subprocess.run(gen_cmd, cwd=root_path)
 
-result = subprocess.run(["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path)
+result = subprocess.run(
+    ["git", "diff", "--quiet", "--ignore-cr-at-eol"], cwd=root_path
+)
 
 if result.returncode != 0:
-    print(
-        "\n"
-        "ERROR: ********************************************************\n"
-        "ERROR: * The following differences were found after running   *\n"
-        "ERROR: * the script/generate_code.py script. Maybe you forgot *\n"
-        "ERROR: * to run it after making changes in a generator?       *\n"
-        "ERROR: ********************************************************\n"
-    )
-    subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
-    sys.exit(result.returncode)
+  print(
+      "\n"
+      "ERROR: ********************************************************\n"
+      "ERROR: * The following differences were found after running   *\n"
+      "ERROR: * the script/generate_code.py script. Maybe you forgot *\n"
+      "ERROR: * to run it after making changes in a generator?       *\n"
+      "ERROR: ********************************************************\n"
+  )
+  subprocess.run(["git", "diff", "--binary", "--exit-code"], cwd=root_path)
+  sys.exit(result.returncode)
 
 sys.exit(0)
diff --git a/scripts/generate_code.py b/scripts/generate_code.py
index 44dd186..94a49ec 100755
--- a/scripts/generate_code.py
+++ b/scripts/generate_code.py
@@ -16,11 +16,11 @@
 
 import filecmp
 import glob
+from pathlib import Path
 import shutil
 import subprocess
 import generate_grpc_examples
-from pathlib import Path
-from util import flatc, root_path, tests_path, args, flatc_path
+from util import args, flatc, flatc_path, root_path, tests_path
 
 # Specify the other paths that will be referenced
 swift_code_gen = Path(root_path, "tests/swift/fuzzer/CodeGenerationTests")
@@ -31,33 +31,33 @@
 
 # Generate the code for flatbuffers reflection schema
 def flatc_reflection(options, location, target):
-    full_options = ["--no-prefix"] + options
-    temp_dir = ".tmp"
-    flatc(
-        full_options,
-        prefix=temp_dir,
-        schema="reflection.fbs",
-        cwd=reflection_path,
-    )
-    new_reflection_path = Path(reflection_path, temp_dir, target)
-    original_reflection_path = Path(root_path, location, target)
-    if not filecmp.cmp(str(new_reflection_path), str(original_reflection_path)):
-        shutil.rmtree(str(original_reflection_path), ignore_errors=True)
-        shutil.move(str(new_reflection_path), str(original_reflection_path))
-    shutil.rmtree(str(Path(reflection_path, temp_dir)))
+  full_options = ["--no-prefix"] + options
+  temp_dir = ".tmp"
+  flatc(
+      full_options,
+      prefix=temp_dir,
+      schema="reflection.fbs",
+      cwd=reflection_path,
+  )
+  new_reflection_path = Path(reflection_path, temp_dir, target)
+  original_reflection_path = Path(root_path, location, target)
+  if not filecmp.cmp(str(new_reflection_path), str(original_reflection_path)):
+    shutil.rmtree(str(original_reflection_path), ignore_errors=True)
+    shutil.move(str(new_reflection_path), str(original_reflection_path))
+  shutil.rmtree(str(Path(reflection_path, temp_dir)))
 
 
 def flatc_annotate(schema, file, include=None, cwd=tests_path):
-    cmd = [str(flatc_path)]
-    if include:
-        cmd += ["-I"] + [include]
-    cmd += ["--annotate", schema, file]
-    result = subprocess.run(cmd, cwd=str(cwd), check=True)
+  cmd = [str(flatc_path)]
+  if include:
+    cmd += ["-I"] + [include]
+  cmd += ["--annotate", schema, file]
+  result = subprocess.run(cmd, cwd=str(cwd), check=True)
 
 
 # Glob a pattern relative to file path
 def glob(path, pattern):
-    return [str(p) for p in path.glob(pattern)]
+  return [str(p) for p in path.glob(pattern)]
 
 
 # flatc options that are shared
@@ -169,7 +169,9 @@
 # Also generate a suffix variant exercising the callback API to keep prior
 # *_generated naming convention in sync with new callback additions.
 flatc(
-    NO_INCL_OPTS + CPP_OPTS + ["--grpc", "--grpc-callback-api", "--filename-suffix", "_generated"],
+    NO_INCL_OPTS
+    + CPP_OPTS
+    + ["--grpc", "--grpc-callback-api", "--filename-suffix", "_generated"],
     schema="monster_test.fbs",
     include="include_test",
 )
@@ -300,7 +302,9 @@
 )
 
 flatc_annotate(
-    schema="monster_test.fbs", file="monsterdata_test.mon", include="include_test"
+    schema="monster_test.fbs",
+    file="monsterdata_test.mon",
+    include="include_test",
 )
 
 flatc(
@@ -330,19 +334,23 @@
 )
 
 if not args.skip_monster_extra:
-    flatc(
-        CPP_OPTS + CS_OPTS + NO_INCL_OPTS + JAVA_OPTS + KOTLIN_OPTS + PYTHON_OPTS,
-        schema="monster_extra.fbs",
-        data="monsterdata_extra.json",
-    )
+  flatc(
+      CPP_OPTS + CS_OPTS + NO_INCL_OPTS + JAVA_OPTS + KOTLIN_OPTS + PYTHON_OPTS,
+      schema="monster_extra.fbs",
+      data="monsterdata_extra.json",
+  )
 
-    flatc(
-        DART_OPTS + ["--gen-object-api"],
-        schema="monster_extra.fbs",
-    )
+  flatc(
+      DART_OPTS + ["--gen-object-api"],
+      schema="monster_extra.fbs",
+  )
 
 flatc(
-    CPP_OPTS + CS_OPTS + NO_INCL_OPTS + JAVA_OPTS + ["--jsonschema", "--scoped-enums"],
+    CPP_OPTS
+    + CS_OPTS
+    + NO_INCL_OPTS
+    + JAVA_OPTS
+    + ["--jsonschema", "--scoped-enums"],
     schema="arrays_test.fbs",
 )
 
@@ -352,7 +360,13 @@
 )
 
 flatc(
-    ["--cpp", "--gen-mutable", "--gen-compare", "--gen-object-api", "--reflect-names"],
+    [
+        "--cpp",
+        "--gen-mutable",
+        "--gen-compare",
+        "--gen-object-api",
+        "--reflect-names",
+    ],
     schema="native_inline_table_test.fbs",
 )
 
@@ -385,7 +399,9 @@
 flatc(["--java", "--kotlin", "--lobster"], schema=optional_scalars_schema)
 flatc(TS_OPTS, cwd=ts_code_gen, schema="../optional_scalars.fbs")
 
-flatc(["--csharp", "--python", "--gen-object-api"], schema=optional_scalars_schema)
+flatc(
+    ["--csharp", "--python", "--gen-object-api"], schema=optional_scalars_schema
+)
 
 flatc(RUST_OPTS, prefix="optional_scalars", schema=optional_scalars_schema)
 
@@ -534,8 +550,14 @@
 
 # Sample files
 samples_schema = "monster.fbs"
-flatc(BASE_OPTS + CPP_OPTS + LOBSTER_OPTS + SWIFT_OPTS, schema=samples_schema, cwd=samples_path)
-flatc(RUST_OPTS, prefix="rust_generated", schema=samples_schema, cwd=samples_path)
+flatc(
+    BASE_OPTS + CPP_OPTS + LOBSTER_OPTS + SWIFT_OPTS,
+    schema=samples_schema,
+    cwd=samples_path,
+)
+flatc(
+    RUST_OPTS, prefix="rust_generated", schema=samples_schema, cwd=samples_path
+)
 flatc(
     BINARY_OPTS + ["--bfbs-filenames", str(samples_path)],
     schema=samples_schema,
@@ -547,10 +569,12 @@
 # Skip generating the reflection if told too, as we run this script after
 # building flatc which uses the reflection_generated.h itself.
 if not args.skip_gen_reflection:
-    # C++ Reflection
-    flatc_reflection(
-        ["-c", "--cpp-std", "c++0x"], "include/flatbuffers", "reflection_generated.h"
-    )
+  # C++ Reflection
+  flatc_reflection(
+      ["-c", "--cpp-std", "c++0x"],
+      "include/flatbuffers",
+      "reflection_generated.h",
+  )
 
 # Python Reflection
 flatc_reflection(["-p"], "python/flatbuffers", "reflection")
@@ -566,17 +590,19 @@
 
 
 def flatc_annotate(schema, include=None, data=None, cwd=tests_path):
-    cmd = [str(flatc_path)]
-    if include:
-        cmd += ["-I"] + [include]
-    cmd += ["--annotate", schema]
-    if data:
-        cmd += [data] if isinstance(data, str) else data
-    subprocess.run(cmd, cwd=str(cwd), check=True)
+  cmd = [str(flatc_path)]
+  if include:
+    cmd += ["-I"] + [include]
+  cmd += ["--annotate", schema]
+  if data:
+    cmd += [data] if isinstance(data, str) else data
+  subprocess.run(cmd, cwd=str(cwd), check=True)
 
 
 flatc_annotate(
-    schema="monster_test.fbs", include="include_test", data="monsterdata_test.mon"
+    schema="monster_test.fbs",
+    include="include_test",
+    data="monsterdata_test.mon",
 )
 
 # Run the generate_grpc_examples script
diff --git a/scripts/generate_grpc_examples.py b/scripts/generate_grpc_examples.py
index 2192619..93058e7 100755
--- a/scripts/generate_grpc_examples.py
+++ b/scripts/generate_grpc_examples.py
@@ -14,8 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from util import flatc, root_path
 from pathlib import Path
+from util import flatc, root_path
 
 grpc_examples_path = Path(root_path, "grpc/examples")
 
@@ -27,44 +27,46 @@
     str(grpc_examples_path),
 ]
 
+
 def GenerateGRPCExamples():
 
-    flatc(
-        COMMON_ARGS
-        + [
-            "--go",
-        ],
-        schema=greeter_schema,
-        cwd=Path(grpc_examples_path, "go/greeter"),
-    )
+  flatc(
+      COMMON_ARGS
+      + [
+          "--go",
+      ],
+      schema=greeter_schema,
+      cwd=Path(grpc_examples_path, "go/greeter"),
+  )
 
-    flatc(
-        COMMON_ARGS
-        + [
-            "--python",
-        ],
-        schema=greeter_schema,
-        cwd=Path(grpc_examples_path, "python/greeter"),
-    )
+  flatc(
+      COMMON_ARGS
+      + [
+          "--python",
+      ],
+      schema=greeter_schema,
+      cwd=Path(grpc_examples_path, "python/greeter"),
+  )
 
-    flatc(
-        COMMON_ARGS
-        + [
-            "--swift",
-            "--gen-json-emit",
-        ],
-        schema=greeter_schema,
-        cwd=Path(grpc_examples_path, "swift/Greeter/Sources/Model"),
-    )
+  flatc(
+      COMMON_ARGS
+      + [
+          "--swift",
+          "--gen-json-emit",
+      ],
+      schema=greeter_schema,
+      cwd=Path(grpc_examples_path, "swift/Greeter/Sources/Model"),
+  )
 
-    flatc(
-        COMMON_ARGS
-        + [
-            "--ts",
-        ],
-        schema=greeter_schema,
-        cwd=Path(grpc_examples_path, "ts/greeter/src"),
-    )
+  flatc(
+      COMMON_ARGS
+      + [
+          "--ts",
+      ],
+      schema=greeter_schema,
+      cwd=Path(grpc_examples_path, "ts/greeter/src"),
+  )
+
 
 if __name__ == "__main__":
-    GenerateGRPCExamples()
+  GenerateGRPCExamples()
diff --git a/scripts/util.py b/scripts/util.py
index 5df9531..742f69c 100644
--- a/scripts/util.py
+++ b/scripts/util.py
@@ -13,9 +13,9 @@
 # limitations under the License.
 
 import argparse
+from pathlib import Path
 import platform
 import subprocess
-from pathlib import Path
 
 parser = argparse.ArgumentParser()
 parser.add_argument(
@@ -53,18 +53,21 @@
 
 # Find and assert flatc compiler is present.
 if root_path in flatc_exe.parents:
-    flatc_exe = flatc_exe.relative_to(root_path)
+  flatc_exe = flatc_exe.relative_to(root_path)
 flatc_path = Path(root_path, flatc_exe)
 assert flatc_path.exists(), "Cannot find the flatc compiler " + str(flatc_path)
 
+
 # Execute the flatc compiler with the specified parameters
-def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path):
-    cmd = [str(flatc_path)] + options
-    if prefix:
-        cmd += ["-o"] + [prefix]
-    if include:
-        cmd += ["-I"] + [include]
-    cmd += [schema] if isinstance(schema, str) else schema
-    if data:
-        cmd += [data] if isinstance(data, str) else data
-    result = subprocess.run(cmd, cwd=str(cwd), check=True)
+def flatc(
+    options, schema, prefix=None, include=None, data=None, cwd=tests_path
+):
+  cmd = [str(flatc_path)] + options
+  if prefix:
+    cmd += ["-o"] + [prefix]
+  if include:
+    cmd += ["-I"] + [include]
+  cmd += [schema] if isinstance(schema, str) else schema
+  if data:
+    cmd += [data] if isinstance(data, str) else data
+  result = subprocess.run(cmd, cwd=str(cwd), check=True)
diff --git a/src/annotated_binary_text_gen.h b/src/annotated_binary_text_gen.h
index 97acd29..bf62fba 100644
--- a/src/annotated_binary_text_gen.h
+++ b/src/annotated_binary_text_gen.h
@@ -47,8 +47,8 @@
   };
 
   explicit AnnotatedBinaryTextGenerator(
-      const Options &options, std::map<uint64_t, BinarySection> annotations,
-      const uint8_t *const binary, const int64_t binary_length)
+      const Options& options, std::map<uint64_t, BinarySection> annotations,
+      const uint8_t* const binary, const int64_t binary_length)
       : annotations_(std::move(annotations)),
         binary_(binary),
         binary_length_(binary_length),
@@ -56,14 +56,14 @@
 
   // Generate the annotated binary for the given `filename`. Returns true if the
   // annotated binary was successfully saved.
-  bool Generate(const std::string &filename, const std::string &schema_filename,
-                const std::string &output_filename = "");
+  bool Generate(const std::string& filename, const std::string& schema_filename,
+                const std::string& output_filename = "");
 
  private:
   const std::map<uint64_t, BinarySection> annotations_;
 
   // The binary data itself.
-  const uint8_t *binary_;
+  const uint8_t* binary_;
   const int64_t binary_length_;
 
   // Output configuration
diff --git a/src/bfbs_gen.h b/src/bfbs_gen.h
index c1beb02..afae9c4 100644
--- a/src/bfbs_gen.h
+++ b/src/bfbs_gen.h
@@ -27,20 +27,24 @@
 namespace {
 
 static void ForAllEnums(
-    const flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>> *enums,
-    std::function<void(const reflection::Enum *)> func) {
-  for (auto it = enums->cbegin(); it != enums->cend(); ++it) { func(*it); }
+    const flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>>* enums,
+    std::function<void(const reflection::Enum*)> func) {
+  for (auto it = enums->cbegin(); it != enums->cend(); ++it) {
+    func(*it);
+  }
 }
 
 static void ForAllObjects(
-    const flatbuffers::Vector<flatbuffers::Offset<reflection::Object>> *objects,
-    std::function<void(const reflection::Object *)> func) {
-  for (auto it = objects->cbegin(); it != objects->cend(); ++it) { func(*it); }
+    const flatbuffers::Vector<flatbuffers::Offset<reflection::Object>>* objects,
+    std::function<void(const reflection::Object*)> func) {
+  for (auto it = objects->cbegin(); it != objects->cend(); ++it) {
+    func(*it);
+  }
 }
 
 static void ForAllEnumValues(
-    const reflection::Enum *enum_def,
-    std::function<void(const reflection::EnumVal *)> func) {
+    const reflection::Enum* enum_def,
+    std::function<void(const reflection::EnumVal*)> func) {
   for (auto it = enum_def->values()->cbegin(); it != enum_def->values()->cend();
        ++it) {
     func(*it);
@@ -48,10 +52,12 @@
 }
 
 static void ForAllDocumentation(
-    const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>
-        *documentation,
-    std::function<void(const flatbuffers::String *)> func) {
-  if (!documentation) { return; }
+    const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>*
+        documentation,
+    std::function<void(const flatbuffers::String*)> func) {
+  if (!documentation) {
+    return;
+  }
   for (auto it = documentation->cbegin(); it != documentation->cend(); ++it) {
     func(*it);
   }
@@ -59,7 +65,7 @@
 
 // Maps the field index into object->fields() to the field's ID (the ith element
 // in the return vector).
-static std::vector<uint32_t> FieldIdToIndex(const reflection::Object *object) {
+static std::vector<uint32_t> FieldIdToIndex(const reflection::Object* object) {
   std::vector<uint32_t> field_index_by_id;
   field_index_by_id.resize(object->fields()->size());
 
@@ -101,15 +107,15 @@
   virtual ~BaseBfbsGenerator() {}
   BaseBfbsGenerator() : schema_(nullptr) {}
 
-  virtual Status GenerateFromSchema(const reflection::Schema *schema,
-                                    const CodeGenOptions &options) = 0;
+  virtual Status GenerateFromSchema(const reflection::Schema* schema,
+                                    const CodeGenOptions& options) = 0;
 
   virtual uint64_t SupportedAdvancedFeatures() const = 0;
 
   // Override of the Generator::GenerateCode method that does the initial
   // deserialization and verification steps.
-  Status GenerateCode(const uint8_t *buffer, int64_t length,
-                      const CodeGenOptions &options) FLATBUFFERS_OVERRIDE {
+  Status GenerateCode(const uint8_t* buffer, int64_t length,
+                      const CodeGenOptions& options) FLATBUFFERS_OVERRIDE {
     flatbuffers::Verifier verifier(buffer, static_cast<size_t>(length));
     if (!reflection::VerifySchemaBuffer(verifier)) {
       return FAILED_VERIFICATION;
@@ -133,7 +139,7 @@
   // GetObject returns the underlying object struct of the given type
   // if element_type is true and GetObject is a list of objects then
   // GetObject will correctly return the object struct of the vector's elements
-  const reflection::Object *GetObject(const reflection::Type *type,
+  const reflection::Object* GetObject(const reflection::Type* type,
                                       bool element_type = false) const {
     const reflection::BaseType base_type =
         element_type ? type->element() : type->base_type();
@@ -146,7 +152,7 @@
   // GetEnum returns the underlying enum struct of the given type
   // if element_type is true and GetEnum is a list of enums then
   // GetEnum will correctly return the enum struct of the vector's elements
-  const reflection::Enum *GetEnum(const reflection::Type *type,
+  const reflection::Enum* GetEnum(const reflection::Type* type,
                                   bool element_type = false) const {
     const reflection::BaseType base_type =
         element_type ? type->element() : type->base_type();
@@ -160,7 +166,7 @@
 
   // Used to get a object that is reference by index. (e.g.
   // reflection::Type::index). Returns nullptr if no object is available.
-  const reflection::Object *GetObjectByIndex(int32_t index) const {
+  const reflection::Object* GetObjectByIndex(int32_t index) const {
     if (!schema_ || index < 0 ||
         index >= static_cast<int32_t>(schema_->objects()->size())) {
       return nullptr;
@@ -170,7 +176,7 @@
 
   // Used to get a enum that is reference by index. (e.g.
   // reflection::Type::index). Returns nullptr if no enum is available.
-  const reflection::Enum *GetEnumByIndex(int32_t index) const {
+  const reflection::Enum* GetEnumByIndex(int32_t index) const {
     if (!schema_ || index < 0 ||
         index >= static_cast<int32_t>(schema_->enums()->size())) {
       return nullptr;
@@ -178,8 +184,8 @@
     return schema_->enums()->Get(index);
   }
 
-  void ForAllFields(const reflection::Object *object, bool reverse,
-                    std::function<void(const reflection::Field *)> func) const {
+  void ForAllFields(const reflection::Object* object, bool reverse,
+                    std::function<void(const reflection::Field*)> func) const {
     const std::vector<uint32_t> field_to_id_map = FieldIdToIndex(object);
     for (size_t i = 0; i < field_to_id_map.size(); ++i) {
       func(object->fields()->Get(
@@ -187,18 +193,18 @@
     }
   }
 
-  bool IsTable(const reflection::Type *type, bool use_element = false) const {
+  bool IsTable(const reflection::Type* type, bool use_element = false) const {
     return !IsStruct(type, use_element);
   }
 
-  bool IsStruct(const reflection::Type *type, bool use_element = false) const {
+  bool IsStruct(const reflection::Type* type, bool use_element = false) const {
     const reflection::BaseType base_type =
         use_element ? type->element() : type->base_type();
     return IsStructOrTable(base_type) &&
            GetObjectByIndex(type->index())->is_struct();
   }
 
-  const reflection::Schema *schema_;
+  const reflection::Schema* schema_;
 };
 
 }  // namespace flatbuffers
diff --git a/src/bfbs_gen_lua.h b/src/bfbs_gen_lua.h
index 86d9762..432ec6b 100644
--- a/src/bfbs_gen_lua.h
+++ b/src/bfbs_gen_lua.h
@@ -26,7 +26,7 @@
 
 // Constructs a new Lua Code generator.
 std::unique_ptr<CodeGenerator> NewLuaBfbsGenerator(
-    const std::string &flatc_version);
+    const std::string& flatc_version);
 
 }  // namespace flatbuffers
 
diff --git a/src/bfbs_gen_nim.h b/src/bfbs_gen_nim.h
index 39e8b21..5c83e45 100644
--- a/src/bfbs_gen_nim.h
+++ b/src/bfbs_gen_nim.h
@@ -26,7 +26,7 @@
 
 // Constructs a new Nim Code generator.
 std::unique_ptr<CodeGenerator> NewNimBfbsGenerator(
-    const std::string &flatc_version);
+    const std::string& flatc_version);
 
 }  // namespace flatbuffers
 
diff --git a/src/bfbs_namer.h b/src/bfbs_namer.h
index d197574..497220f 100644
--- a/src/bfbs_namer.h
+++ b/src/bfbs_namer.h
@@ -26,22 +26,22 @@
   using Namer::Variable;
   using Namer::Variant;
 
-  template<typename T>
-  std::string Denamespace(T t, std::string &namespace_prefix,
+  template <typename T>
+  std::string Denamespace(T t, std::string& namespace_prefix,
                           const char delimiter = '.') const {
     return Namer::Denamespace(t->name()->c_str(), namespace_prefix, delimiter);
   }
 
-  template<typename T>
+  template <typename T>
   std::string Denamespace(T t, const char delimiter = '.') const {
     return Namer::Denamespace(t->name()->c_str(), delimiter);
   }
 
-  virtual std::string Field(const ::reflection::Field &f) const {
+  virtual std::string Field(const ::reflection::Field& f) const {
     return Field(f.name()->str());
   }
 
-  virtual std::string Variable(const ::reflection::Field &f) const {
+  virtual std::string Variable(const ::reflection::Field& f) const {
     return Variable(f.name()->str());
   }
 };
diff --git a/src/binary_annotator.h b/src/binary_annotator.h
index 4c84141..d1f1af2 100644
--- a/src/binary_annotator.h
+++ b/src/binary_annotator.h
@@ -57,7 +57,7 @@
   UOffset64 = 18,
 };
 
-template<typename T>
+template <typename T>
 static inline std::string ToHex(T i, size_t width = sizeof(T)) {
   std::stringstream stream;
   stream << std::hex << std::uppercase << std::setfill('0')
@@ -205,52 +205,85 @@
 
 inline static BinaryRegionType GetRegionType(reflection::BaseType base_type) {
   switch (base_type) {
-    case reflection::UType: return BinaryRegionType::UType;
-    case reflection::Bool: return BinaryRegionType::Uint8;
-    case reflection::Byte: return BinaryRegionType::Uint8;
-    case reflection::UByte: return BinaryRegionType::Uint8;
-    case reflection::Short: return BinaryRegionType::Int16;
-    case reflection::UShort: return BinaryRegionType::Uint16;
-    case reflection::Int: return BinaryRegionType::Uint32;
-    case reflection::UInt: return BinaryRegionType::Uint32;
-    case reflection::Long: return BinaryRegionType::Int64;
-    case reflection::ULong: return BinaryRegionType::Uint64;
-    case reflection::Float: return BinaryRegionType::Float;
-    case reflection::Double: return BinaryRegionType::Double;
-    default: return BinaryRegionType::Unknown;
+    case reflection::UType:
+      return BinaryRegionType::UType;
+    case reflection::Bool:
+      return BinaryRegionType::Uint8;
+    case reflection::Byte:
+      return BinaryRegionType::Uint8;
+    case reflection::UByte:
+      return BinaryRegionType::Uint8;
+    case reflection::Short:
+      return BinaryRegionType::Int16;
+    case reflection::UShort:
+      return BinaryRegionType::Uint16;
+    case reflection::Int:
+      return BinaryRegionType::Uint32;
+    case reflection::UInt:
+      return BinaryRegionType::Uint32;
+    case reflection::Long:
+      return BinaryRegionType::Int64;
+    case reflection::ULong:
+      return BinaryRegionType::Uint64;
+    case reflection::Float:
+      return BinaryRegionType::Float;
+    case reflection::Double:
+      return BinaryRegionType::Double;
+    default:
+      return BinaryRegionType::Unknown;
   }
 }
 
 inline static std::string ToString(const BinaryRegionType type) {
   switch (type) {
-    case BinaryRegionType::UOffset: return "UOffset32";
-    case BinaryRegionType::UOffset64: return "UOffset64";
-    case BinaryRegionType::SOffset: return "SOffset32";
-    case BinaryRegionType::VOffset: return "VOffset16";
-    case BinaryRegionType::Bool: return "bool";
-    case BinaryRegionType::Char: return "char";
-    case BinaryRegionType::Byte: return "int8_t";
-    case BinaryRegionType::Uint8: return "uint8_t";
-    case BinaryRegionType::Uint16: return "uint16_t";
-    case BinaryRegionType::Uint32: return "uint32_t";
-    case BinaryRegionType::Uint64: return "uint64_t";
-    case BinaryRegionType::Int8: return "int8_t";
-    case BinaryRegionType::Int16: return "int16_t";
-    case BinaryRegionType::Int32: return "int32_t";
-    case BinaryRegionType::Int64: return "int64_t";
-    case BinaryRegionType::Double: return "double";
-    case BinaryRegionType::Float: return "float";
-    case BinaryRegionType::UType: return "UType8";
-    case BinaryRegionType::Unknown: return "?uint8_t";
-    default: return "todo";
+    case BinaryRegionType::UOffset:
+      return "UOffset32";
+    case BinaryRegionType::UOffset64:
+      return "UOffset64";
+    case BinaryRegionType::SOffset:
+      return "SOffset32";
+    case BinaryRegionType::VOffset:
+      return "VOffset16";
+    case BinaryRegionType::Bool:
+      return "bool";
+    case BinaryRegionType::Char:
+      return "char";
+    case BinaryRegionType::Byte:
+      return "int8_t";
+    case BinaryRegionType::Uint8:
+      return "uint8_t";
+    case BinaryRegionType::Uint16:
+      return "uint16_t";
+    case BinaryRegionType::Uint32:
+      return "uint32_t";
+    case BinaryRegionType::Uint64:
+      return "uint64_t";
+    case BinaryRegionType::Int8:
+      return "int8_t";
+    case BinaryRegionType::Int16:
+      return "int16_t";
+    case BinaryRegionType::Int32:
+      return "int32_t";
+    case BinaryRegionType::Int64:
+      return "int64_t";
+    case BinaryRegionType::Double:
+      return "double";
+    case BinaryRegionType::Float:
+      return "float";
+    case BinaryRegionType::UType:
+      return "UType8";
+    case BinaryRegionType::Unknown:
+      return "?uint8_t";
+    default:
+      return "todo";
   }
 }
 
 class BinaryAnnotator {
  public:
-  explicit BinaryAnnotator(const uint8_t *const bfbs,
+  explicit BinaryAnnotator(const uint8_t* const bfbs,
                            const uint64_t bfbs_length,
-                           const uint8_t *const binary,
+                           const uint8_t* const binary,
                            const uint64_t binary_length,
                            const bool is_size_prefixed)
       : bfbs_(bfbs),
@@ -261,8 +294,8 @@
         binary_length_(binary_length),
         is_size_prefixed_(is_size_prefixed) {}
 
-  BinaryAnnotator(const reflection::Schema *schema,
-                  const std::string &root_table, const uint8_t *binary,
+  BinaryAnnotator(const reflection::Schema* schema,
+                  const std::string& root_table, const uint8_t* binary,
                   uint64_t binary_length, bool is_size_prefixed)
       : bfbs_(nullptr),
         bfbs_length_(0),
@@ -277,11 +310,11 @@
  private:
   struct VTable {
     struct Entry {
-      const reflection::Field *field = nullptr;
+      const reflection::Field* field = nullptr;
       uint16_t offset_from_table = 0;
     };
 
-    const reflection::Object *referring_table = nullptr;
+    const reflection::Object* referring_table = nullptr;
 
     // Field ID -> {field def, offset from table}
     std::map<uint16_t, Entry> fields;
@@ -296,25 +329,25 @@
   // attempts to get an existing vtable given the offset and table type,
   // otherwise it will built the vtable, memorize it, and return the built
   // VTable. Returns nullptr if building the VTable fails.
-  VTable *GetOrBuildVTable(uint64_t offset, const reflection::Object *table,
+  VTable* GetOrBuildVTable(uint64_t offset, const reflection::Object* table,
                            uint64_t offset_of_referring_table);
 
   void BuildTable(uint64_t offset, const BinarySectionType type,
-                  const reflection::Object *table);
+                  const reflection::Object* table);
 
-  uint64_t BuildStruct(uint64_t offset, std::vector<BinaryRegion> &regions,
+  uint64_t BuildStruct(uint64_t offset, std::vector<BinaryRegion>& regions,
                        const std::string referring_field_name,
-                       const reflection::Object *structure);
+                       const reflection::Object* structure);
 
-  void BuildString(uint64_t offset, const reflection::Object *table,
-                   const reflection::Field *field);
+  void BuildString(uint64_t offset, const reflection::Object* table,
+                   const reflection::Field* field);
 
-  void BuildVector(uint64_t offset, const reflection::Object *table,
-                   const reflection::Field *field, uint64_t parent_table_offset,
+  void BuildVector(uint64_t offset, const reflection::Object* table,
+                   const reflection::Field* field, uint64_t parent_table_offset,
                    const std::map<uint16_t, VTable::Entry> vtable_fields);
 
   std::string BuildUnion(uint64_t offset, uint8_t realized_type,
-                         const reflection::Field *field);
+                         const reflection::Field* field);
 
   void FixMissingRegions();
   void FixMissingSections();
@@ -325,7 +358,8 @@
 
   // Determines if performing a GetScalar request for `T` at `offset` would read
   // passed the end of the binary.
-  template<typename T> inline bool IsValidRead(const uint64_t offset) const {
+  template <typename T>
+  inline bool IsValidRead(const uint64_t offset) const {
     return IsValidRead(offset, sizeof(T));
   }
 
@@ -339,9 +373,11 @@
     return IsValidOffset(offset) ? binary_length_ - offset : 0;
   }
 
-  template<typename T>
+  template <typename T>
   flatbuffers::Optional<T> ReadScalar(const uint64_t offset) const {
-    if (!IsValidRead<T>(offset)) { return flatbuffers::nullopt; }
+    if (!IsValidRead<T>(offset)) {
+      return flatbuffers::nullopt;
+    }
 
     return flatbuffers::ReadScalar<T>(binary_ + offset);
   }
@@ -349,11 +385,11 @@
   // Adds the provided `section` keyed by the `offset` it occurs at. If a
   // section is already added at that offset, it doesn't replace the existing
   // one.
-  void AddSection(const uint64_t offset, const BinarySection &section) {
+  void AddSection(const uint64_t offset, const BinarySection& section) {
     sections_.insert(std::make_pair(offset, section));
   }
 
-  bool IsInlineField(const reflection::Field *const field) {
+  bool IsInlineField(const reflection::Field* const field) {
     if (field->type()->base_type() == reflection::BaseType::Obj) {
       return schema_->objects()->Get(field->type()->index())->is_struct();
     }
@@ -365,28 +401,32 @@
             type == reflection::BaseType::Union);
   }
 
-  bool IsUnionType(const reflection::Field *const field) {
+  bool IsUnionType(const reflection::Field* const field) {
     return IsUnionType(field->type()->base_type()) &&
            field->type()->index() >= 0;
   }
 
-  bool IsValidUnionValue(const reflection::Field *const field,
+  bool IsValidUnionValue(const reflection::Field* const field,
                          const uint8_t value) {
     return IsUnionType(field) &&
            IsValidUnionValue(field->type()->index(), value);
   }
 
   bool IsValidUnionValue(const uint32_t enum_id, const uint8_t value) {
-    if (enum_id >= schema_->enums()->size()) { return false; }
+    if (enum_id >= schema_->enums()->size()) {
+      return false;
+    }
 
-    const reflection::Enum *enum_def = schema_->enums()->Get(enum_id);
+    const reflection::Enum* enum_def = schema_->enums()->Get(enum_id);
 
-    if (enum_def == nullptr) { return false; }
+    if (enum_def == nullptr) {
+      return false;
+    }
 
     return value < enum_def->values()->size();
   }
 
-  uint64_t GetElementSize(const reflection::Field *const field) {
+  uint64_t GetElementSize(const reflection::Field* const field) {
     if (IsScalar(field->type()->element())) {
       return GetTypeSize(field->type()->element());
     }
@@ -396,22 +436,23 @@
         auto obj = schema_->objects()->Get(field->type()->index());
         return obj->is_struct() ? obj->bytesize() : sizeof(uint32_t);
       }
-      default: return sizeof(uint32_t);
+      default:
+        return sizeof(uint32_t);
     }
   }
 
   bool ContainsSection(const uint64_t offset);
 
-  const reflection::Object *RootTable() const;
+  const reflection::Object* RootTable() const;
 
   // The schema for the binary file
-  const uint8_t *bfbs_;
+  const uint8_t* bfbs_;
   const uint64_t bfbs_length_;
-  const reflection::Schema *schema_;
+  const reflection::Schema* schema_;
   const std::string root_table_;
 
   // The binary data itself.
-  const uint8_t *binary_;
+  const uint8_t* binary_;
   const uint64_t binary_length_;
   const bool is_size_prefixed_;
 
diff --git a/swift/Sources/Common/Int+extension.swift b/swift/Sources/Common/Int+extension.swift
index bf19d84..0b2e4c7 100644
--- a/swift/Sources/Common/Int+extension.swift
+++ b/swift/Sources/Common/Int+extension.swift
@@ -28,9 +28,9 @@
     var n = UInt32(self)
 
     #if arch(arm) || arch(i386)
-    let max = UInt32(Int.max)
+      let max = UInt32(Int.max)
     #else
-    let max = UInt32.max
+      let max = UInt32.max
     #endif
 
     n -= 1
diff --git a/swift/Sources/Common/Scalar.swift b/swift/Sources/Common/Scalar.swift
index a877328..518580a 100644
--- a/swift/Sources/Common/Scalar.swift
+++ b/swift/Sources/Common/Scalar.swift
@@ -18,7 +18,7 @@
 
 /// A boolean to see if the system is littleEndian
 public let isLitteEndian: Bool = {
-  let number: UInt32 = 0x12345678
+  let number: UInt32 = 0x1234_5678
   return number == number.littleEndian
 }()
 
diff --git a/swift/Sources/Common/padding.swift b/swift/Sources/Common/padding.swift
index e6ba11d..5dc2f32 100644
--- a/swift/Sources/Common/padding.swift
+++ b/swift/Sources/Common/padding.swift
@@ -23,7 +23,7 @@
 @inline(__always)
 public func padding(
   bufSize: UInt,
-  elementSize: UInt) -> UInt
-{
+  elementSize: UInt
+) -> UInt {
   ((~bufSize) &+ 1) & (elementSize &- 1)
 }
diff --git a/swift/Sources/FlatBuffers/ByteBuffer.swift b/swift/Sources/FlatBuffers/ByteBuffer.swift
index bf1f47e..d69f824 100644
--- a/swift/Sources/FlatBuffers/ByteBuffer.swift
+++ b/swift/Sources/FlatBuffers/ByteBuffer.swift
@@ -29,8 +29,8 @@
     @usableFromInline
     enum Blob {
       #if !os(WASI)
-      case data(Data)
-      case bytes(ContiguousBytes)
+        case data(Data)
+        case bytes(ContiguousBytes)
       #endif
 
       case byteBuffer(_InternalByteBuffer)
@@ -96,16 +96,16 @@
     @inline(__always)
     func withUnsafeBytes<T>(
       _ body: (UnsafeRawBufferPointer) throws
-        -> T) rethrows -> T
-    {
+        -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.withUnsafeBytes(body)
       #if !os(WASI)
-      case .data(let data):
-        return try data.withUnsafeBytes(body)
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes.withUnsafeBytes(body)
+        case .data(let data):
+          return try data.withUnsafeBytes(body)
+        case .bytes(let contiguousBytes):
+          return try contiguousBytes.withUnsafeBytes(body)
       #endif
       case .array(let array):
         return try array.withUnsafeBytes(body)
@@ -118,25 +118,28 @@
     @inline(__always)
     func withUnsafeRawPointer<T>(
       _ body: (UnsafeMutableRawPointer) throws
-        -> T) rethrows -> T
-    {
+        -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.withUnsafeRawPointer(body)
       #if !os(WASI)
-      case .data(let data):
-        return try data
-          .withUnsafeBytes {
-            try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
-          }
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes
-          .withUnsafeBytes {
-            try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
-          }
+        case .data(let data):
+          return
+            try data
+            .withUnsafeBytes {
+              try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
+            }
+        case .bytes(let contiguousBytes):
+          return
+            try contiguousBytes
+            .withUnsafeBytes {
+              try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
+            }
       #endif
       case .array(let array):
-        return try array
+        return
+          try array
           .withUnsafeBytes {
             try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
           }
@@ -149,20 +152,20 @@
     @inline(__always)
     func readWithUnsafeRawPointer<T>(
       position: Int,
-      _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-    {
+      _ body: (UnsafeRawPointer) throws -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.readWithUnsafeRawPointer(position: position, body)
       #if !os(WASI)
-      case .data(let data):
-        return try data.withUnsafeBytes {
-          try body($0.baseAddress!.advanced(by: position))
-        }
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes.withUnsafeBytes {
-          try body($0.baseAddress!.advanced(by: position))
-        }
+        case .data(let data):
+          return try data.withUnsafeBytes {
+            try body($0.baseAddress!.advanced(by: position))
+          }
+        case .bytes(let contiguousBytes):
+          return try contiguousBytes.withUnsafeBytes {
+            try body($0.baseAddress!.advanced(by: position))
+          }
       #endif
       case .array(let array):
         return try array.withUnsafeBytes {
@@ -206,8 +209,8 @@
   @inline(__always)
   public init(
     copyingMemoryBound memory: UnsafeRawPointer,
-    capacity: Int)
-  {
+    capacity: Int
+  ) {
     _storage = Storage(count: capacity)
     _storage.copy(from: memory, count: capacity)
     _readerIndex = capacity
@@ -225,29 +228,29 @@
   }
 
   #if !os(WASI)
-  /// Constructor that creates a Flatbuffer from the Swift Data type object
-  /// - Parameter
-  ///   - data: Swift data Object
-  @inline(__always)
-  public init(data: Data) {
-    _storage = Storage(blob: .data(data), capacity: data.count)
-    _readerIndex = data.count
-    capacity = data.count
-  }
+    /// Constructor that creates a Flatbuffer from the Swift Data type object
+    /// - Parameter
+    ///   - data: Swift data Object
+    @inline(__always)
+    public init(data: Data) {
+      _storage = Storage(blob: .data(data), capacity: data.count)
+      _readerIndex = data.count
+      capacity = data.count
+    }
 
-  /// Constructor that creates a Flatbuffer object from a ContiguousBytes
-  /// - Parameters:
-  ///   - contiguousBytes: Binary stripe to use as the buffer
-  ///   - count: amount of readable bytes
-  @inline(__always)
-  public init<Bytes: ContiguousBytes>(
-    contiguousBytes: Bytes,
-    count: Int)
-  {
-    _storage = Storage(blob: .bytes(contiguousBytes), capacity: count)
-    _readerIndex = count
-    self.capacity = count
-  }
+    /// Constructor that creates a Flatbuffer object from a ContiguousBytes
+    /// - Parameters:
+    ///   - contiguousBytes: Binary stripe to use as the buffer
+    ///   - count: amount of readable bytes
+    @inline(__always)
+    public init<Bytes: ContiguousBytes>(
+      contiguousBytes: Bytes,
+      count: Int
+    ) {
+      _storage = Storage(blob: .bytes(contiguousBytes), capacity: count)
+      _readerIndex = count
+      self.capacity = count
+    }
   #endif
 
   /// Constructor that creates a Flatbuffer from unsafe memory region without copying
@@ -259,8 +262,8 @@
   @inline(__always)
   public init(
     assumingMemoryBound memory: UnsafeMutableRawPointer,
-    capacity: Int)
-  {
+    capacity: Int
+  ) {
     _storage = Storage(
       blob: .pointer(memory),
       capacity: capacity)
@@ -277,8 +280,8 @@
   init(
     blob: Storage.Blob,
     count: Int,
-    removing removeBytes: Int)
-  {
+    removing removeBytes: Int
+  ) {
     _storage = Storage(blob: blob, capacity: count)
     _readerIndex = removeBytes
     capacity = count
@@ -329,8 +332,8 @@
   @inline(__always)
   public func readSlice<T>(
     index: Int,
-    count: Int) -> [T]
-  {
+    count: Int
+  ) -> [T] {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -352,8 +355,8 @@
   public func withUnsafePointerToSlice<T>(
     index: Int,
     count: Int,
-    body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T
-  {
+    body: (UnsafeRawBufferPointer) throws -> T
+  ) rethrows -> T {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -363,46 +366,46 @@
   }
 
   #if !os(WASI)
-  /// Reads a string from the buffer and encodes it to a swift string
-  /// - Parameters:
-  ///   - index: index of the string in the buffer
-  ///   - count: length of the string
-  ///   - type: Encoding of the string
-  @inline(__always)
-  public func readString(
-    at index: Int,
-    count: Int,
-    type: String.Encoding = .utf8) -> String?
-  {
-    assert(
-      index + count <= capacity,
-      "Reading out of bounds is illegal")
-    return _storage.readWithUnsafeRawPointer(position: index) {
-      let buf = UnsafeBufferPointer(
-        start: $0.bindMemory(to: UInt8.self, capacity: count),
-        count: count)
-      return String(
-        bytes: buf,
-        encoding: type)
+    /// Reads a string from the buffer and encodes it to a swift string
+    /// - Parameters:
+    ///   - index: index of the string in the buffer
+    ///   - count: length of the string
+    ///   - type: Encoding of the string
+    @inline(__always)
+    public func readString(
+      at index: Int,
+      count: Int,
+      type: String.Encoding = .utf8
+    ) -> String? {
+      assert(
+        index + count <= capacity,
+        "Reading out of bounds is illegal")
+      return _storage.readWithUnsafeRawPointer(position: index) {
+        let buf = UnsafeBufferPointer(
+          start: $0.bindMemory(to: UInt8.self, capacity: count),
+          count: count)
+        return String(
+          bytes: buf,
+          encoding: type)
+      }
     }
-  }
   #else
-  /// Reads a string from the buffer and encodes it to a swift string
-  /// - Parameters:
-  ///   - index: index of the string in the buffer
-  ///   - count: length of the string
-  @inline(__always)
-  public func readString(
-    at index: Int,
-    count: Int) -> String?
-  {
-    assert(
-      index + count <= capacity,
-      "Reading out of bounds is illegal")
-    return _storage.readWithUnsafeRawPointer(position: index) {
-      String(cString: $0.bindMemory(to: UInt8.self, capacity: count))
+    /// Reads a string from the buffer and encodes it to a swift string
+    /// - Parameters:
+    ///   - index: index of the string in the buffer
+    ///   - count: length of the string
+    @inline(__always)
+    public func readString(
+      at index: Int,
+      count: Int
+    ) -> String? {
+      assert(
+        index + count <= capacity,
+        "Reading out of bounds is illegal")
+      return _storage.readWithUnsafeRawPointer(position: index) {
+        String(cString: $0.bindMemory(to: UInt8.self, capacity: count))
+      }
     }
-  }
   #endif
 
   /// Creates a new Flatbuffer object that's duplicated from the current one
@@ -434,8 +437,8 @@
   @inline(__always)
   public func withUnsafeBytes<T>(
     body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try _storage.withUnsafeBytes(body)
   }
 
@@ -443,8 +446,8 @@
   @inline(__always)
   func withUnsafeMutableRawPointer<T>(
     body: (UnsafeMutableRawPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try _storage.withUnsafeRawPointer(body)
   }
 
@@ -452,8 +455,8 @@
   @inline(__always)
   func readWithUnsafeRawPointer<T>(
     position: Int,
-    _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-  {
+    _ body: (UnsafeRawPointer) throws -> T
+  ) rethrows -> T {
     try _storage.readWithUnsafeRawPointer(position: position, body)
   }
 }
diff --git a/swift/Sources/FlatBuffers/Constants.swift b/swift/Sources/FlatBuffers/Constants.swift
index 44b4809..7fd7998 100644
--- a/swift/Sources/FlatBuffers/Constants.swift
+++ b/swift/Sources/FlatBuffers/Constants.swift
@@ -14,18 +14,20 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// Type aliases
 public typealias Byte = UInt8
 public typealias UOffset = UInt32
 public typealias SOffset = Int32
 public typealias VOffset = UInt16
 /// Maximum size for a buffer
-public let FlatBufferMaxSize = UInt32
+public let FlatBufferMaxSize =
+  UInt32
   .max << ((MemoryLayout<SOffset>.size * 8 - 1) - 1)
 
 /// Protocol that All Scalars should conform to
diff --git a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_11.swift b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_11.swift
index 07d2d8d..70b920b 100644
--- a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_11.swift
+++ b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_11.swift
@@ -3,7 +3,7 @@
 
 func run() {
   // create a ByteBuffer(:) from an [UInt8] or Data()
-  let buf = [] // Get your data
+  let buf = []  // Get your data
   var byteBuffer = ByteBuffer(bytes: buf)
   // Get an accessor to the root object inside the buffer.
   let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
diff --git a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_12.swift b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_12.swift
index 0d9ff69..5baafd6 100644
--- a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_12.swift
+++ b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_12.swift
@@ -3,7 +3,7 @@
 
 func run() {
   // create a ByteBuffer(:) from an [UInt8] or Data()
-  let buf = [] // Get your data
+  let buf = []  // Get your data
   var byteBuffer = ByteBuffer(bytes: buf)
   // Get an accessor to the root object inside the buffer.
   let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
@@ -11,7 +11,7 @@
 
   let hp = monster.hp
   let mana = monster.mana
-  let name = monster.name // returns an optional string
+  let name = monster.name  // returns an optional string
 
   let pos = monster.pos
   let x = pos.x
diff --git a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_13.swift b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_13.swift
index 1372d6f..ebea422 100644
--- a/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_13.swift
+++ b/swift/Sources/FlatBuffers/Documentation.docc/Resources/code/swift/swift_code_13.swift
@@ -3,7 +3,7 @@
 
 func run() {
   // create a ByteBuffer(:) from an [UInt8] or Data()
-  let buf = [] // Get your data
+  let buf = []  // Get your data
   var byteBuffer = ByteBuffer(bytes: buf)
   // Get an accessor to the root object inside the buffer.
   let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
@@ -11,7 +11,7 @@
 
   let hp = monster.hp
   let mana = monster.mana
-  let name = monster.name // returns an optional string
+  let name = monster.name  // returns an optional string
 
   let pos = monster.pos
   let x = pos.x
@@ -20,7 +20,7 @@
   // Get and check if the monster has an equipped item
   if monster.equippedType == .weapon {
     let _weapon = monster.equipped(type: Weapon.self)
-    let name = _weapon.name // should return "Axe"
-    let dmg = _weapon.damage // should return 5
+    let name = _weapon.name  // should return "Axe"
+    let dmg = _weapon.damage  // should return 5
   }
 }
diff --git a/swift/Sources/FlatBuffers/Enum.swift b/swift/Sources/FlatBuffers/Enum.swift
index 3ff1611..3c99c01 100644
--- a/swift/Sources/FlatBuffers/Enum.swift
+++ b/swift/Sources/FlatBuffers/Enum.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// Enum is a protocol that all flatbuffers enums should conform to
 /// Since it allows us to get the actual `ByteSize` and `Value` from
 /// a swift enum.
@@ -44,8 +44,8 @@
   public static func verify<T>(
     _ verifier: inout Verifier,
     at position: Int,
-    of type: T.Type) throws where T: Verifiable
-  {
+    of type: T.Type
+  ) throws where T: Verifiable {
     try verifier.inBuffer(position: position, of: type.self)
   }
 
diff --git a/swift/Sources/FlatBuffers/FlatBufferBuilder.swift b/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
index c3d2a74..e834043 100644
--- a/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
+++ b/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// ``FlatBufferBuilder`` builds a `FlatBuffer` through manipulating its internal state.
 ///
 /// This is done by creating a ``ByteBuffer`` that hosts the incoming data and
@@ -63,21 +63,21 @@
   public var capacity: Int { _bb.capacity }
 
   #if !os(WASI)
-  /// Data representation of the buffer
-  ///
-  /// Should only be used after ``finish(offset:addPrefix:)`` is called
-  public var data: Data {
-    assert(finished, "Data shouldn't be called before finish()")
-    return _bb.withUnsafeSlicedBytes { ptr in
-      var data = Data()
-      data.append(
-        ptr.baseAddress!.bindMemory(
-          to: UInt8.self,
-          capacity: ptr.count),
-        count: ptr.count)
-      return data
+    /// Data representation of the buffer
+    ///
+    /// Should only be used after ``finish(offset:addPrefix:)`` is called
+    public var data: Data {
+      assert(finished, "Data shouldn't be called before finish()")
+      return _bb.withUnsafeSlicedBytes { ptr in
+        var data = Data()
+        data.append(
+          ptr.baseAddress!.bindMemory(
+            to: UInt8.self,
+            capacity: ptr.count),
+          count: ptr.count)
+        return data
+      }
     }
-  }
   #endif
 
   /// Returns the underlying bytes in the ``ByteBuffer``
@@ -132,8 +132,8 @@
   /// however the builder can be force by passing true for `serializeDefaults`
   public init(
     initialSize: Int32 = 1024,
-    serializeDefaults force: Bool = false)
-  {
+    serializeDefaults force: Bool = false
+  ) {
     assert(initialSize > 0, "Size should be greater than zero!")
     guard isLitteEndian else {
       fatalError(
@@ -200,8 +200,8 @@
   mutating public func finish(
     offset: Offset,
     fileId: String,
-    addPrefix prefix: Bool = false)
-  {
+    addPrefix prefix: Bool = false
+  ) {
     let size = MemoryLayout<UOffset>.size
     preAlign(
       len: size &+ (prefix ? size : 0) &+ FileIdLength,
@@ -230,8 +230,8 @@
   /// include the size of the current buffer.
   mutating public func finish(
     offset: Offset,
-    addPrefix prefix: Bool = false)
-  {
+    addPrefix prefix: Bool = false
+  ) {
     notNested()
     let size = MemoryLayout<UOffset>.size
     preAlign(len: size &+ (prefix ? size : 0), alignment: _minAlignment)
@@ -355,9 +355,11 @@
   @usableFromInline
   mutating internal func preAlign(len: Int, alignment: Int) {
     minAlignment(size: alignment)
-    _bb.fill(padding: numericCast(padding(
-      bufSize: numericCast(_bb.size) &+ numericCast(len),
-      elementSize: numericCast(alignment))))
+    _bb.fill(
+      padding: numericCast(
+        padding(
+          bufSize: numericCast(_bb.size) &+ numericCast(len),
+          elementSize: numericCast(alignment))))
   }
 
   /// Prealigns the buffer before writting a new object into the buffer
@@ -468,8 +470,8 @@
   @inline(__always)
   mutating public func createVector<T: Scalar>(
     _ elements: [T],
-    size: Int) -> Offset
-  {
+    size: Int
+  ) -> Offset {
     let size = size
     startVector(size, elementSize: MemoryLayout<T>.size)
     _bb.push(elements: elements)
@@ -477,20 +479,20 @@
   }
 
   #if swift(>=5.0) && !os(WASI)
-  @inline(__always)
-  /// Creates a vector of bytes in the buffer.
-  ///
-  /// Allows creating a vector from `Data` without copying to a `[UInt8]`
-  ///
-  /// - Parameter bytes: bytes to be written into the buffer
-  /// - Returns: ``Offset`` of the vector
-  mutating public func createVector(bytes: ContiguousBytes) -> Offset {
-    bytes.withUnsafeBytes {
-      startVector($0.count, elementSize: MemoryLayout<UInt8>.size)
-      _bb.push(bytes: $0)
-      return endVector(len: $0.count)
+    @inline(__always)
+    /// Creates a vector of bytes in the buffer.
+    ///
+    /// Allows creating a vector from `Data` without copying to a `[UInt8]`
+    ///
+    /// - Parameter bytes: bytes to be written into the buffer
+    /// - Returns: ``Offset`` of the vector
+    mutating public func createVector(bytes: ContiguousBytes) -> Offset {
+      bytes.withUnsafeBytes {
+        startVector($0.count, elementSize: MemoryLayout<UInt8>.size)
+        _bb.push(bytes: $0)
+        return endVector(len: $0.count)
+      }
     }
-  }
   #endif
 
   /// Creates a vector of type ``Enum`` into the ``ByteBuffer``
@@ -528,8 +530,8 @@
   @inline(__always)
   mutating public func createVector<T: Enum>(
     _ elements: [T],
-    size: Int) -> Offset
-  {
+    size: Int
+  ) -> Offset {
     let size = size
     startVector(size, elementSize: T.byteSize)
     for index in stride(from: elements.count, to: 0, by: -1) {
@@ -574,8 +576,8 @@
   @inline(__always)
   mutating public func createVector(
     ofOffsets offsets: [Offset],
-    len: Int) -> Offset
-  {
+    len: Int
+  ) -> Offset {
     startVector(len, elementSize: MemoryLayout<Offset>.size)
     for index in stride(from: offsets.count, to: 0, by: -1) {
       push(element: offsets[index &- 1])
@@ -651,8 +653,8 @@
   @inline(__always)
   @discardableResult
   mutating public func create<T: NativeStruct>(
-    struct s: T, position: VOffset) -> Offset
-  {
+    struct s: T, position: VOffset
+  ) -> Offset {
     let offset = create(struct: s)
     _vtableStorage.add(
       loc: (offset: _bb.size, position: VOffset(position)))
@@ -676,8 +678,8 @@
   @inline(__always)
   @discardableResult
   mutating public func create<T: NativeStruct>(
-    struct s: T) -> Offset
-  {
+    struct s: T
+  ) -> Offset {
     let size = MemoryLayout<T>.size
     preAlign(len: size, alignment: MemoryLayout<T>.alignment)
     _bb.push(struct: s, size: size)
@@ -792,8 +794,8 @@
   mutating public func add<T: Scalar>(
     element: T,
     def: T,
-    at position: VOffset)
-  {
+    at position: VOffset
+  ) {
     if element == def && !serializeDefaults { return }
     track(offset: push(element: element), at: position)
   }
diff --git a/swift/Sources/FlatBuffers/FlatbuffersErrors.swift b/swift/Sources/FlatBuffers/FlatbuffersErrors.swift
index 13207b5..d2630f5 100644
--- a/swift/Sources/FlatBuffers/FlatbuffersErrors.swift
+++ b/swift/Sources/FlatBuffers/FlatbuffersErrors.swift
@@ -63,13 +63,13 @@
 
 #if !os(WASI)
 
-extension FlatbuffersErrors {
-  public static func == (
-    lhs: FlatbuffersErrors,
-    rhs: FlatbuffersErrors) -> Bool
-  {
-    lhs.localizedDescription == rhs.localizedDescription
+  extension FlatbuffersErrors {
+    public static func == (
+      lhs: FlatbuffersErrors,
+      rhs: FlatbuffersErrors
+    ) -> Bool {
+      lhs.localizedDescription == rhs.localizedDescription
+    }
   }
-}
 
 #endif
diff --git a/swift/Sources/FlatBuffers/Message.swift b/swift/Sources/FlatBuffers/Message.swift
index 28436a2..c488f97 100644
--- a/swift/Sources/FlatBuffers/Message.swift
+++ b/swift/Sources/FlatBuffers/Message.swift
@@ -28,7 +28,8 @@
   @inline(__always)
   func withUnsafeReadableBytes<T>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
+      -> T
+  ) rethrows -> T
 }
 
 /// Message is a wrapper around Buffers to to able to send Flatbuffers `Buffers` through the
@@ -40,8 +41,7 @@
   public var object: T {
     T.init(
       buffer,
-      o: Int32(buffer.read(def: UOffset.self, position: buffer.reader)) &+
-        Int32(buffer.reader))
+      o: Int32(buffer.read(def: UOffset.self, position: buffer.reader)) &+ Int32(buffer.reader))
   }
 
   public var size: Int { Int(buffer.size) }
@@ -66,8 +66,8 @@
   @inline(__always)
   public func withUnsafeReadableBytes<Data>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> Data) rethrows -> Data
-  {
+      -> Data
+  ) rethrows -> Data {
     return try buffer.readWithUnsafeRawPointer(position: buffer.reader) {
       try body(UnsafeRawBufferPointer(start: $0, count: size))
     }
diff --git a/swift/Sources/FlatBuffers/Mutable.swift b/swift/Sources/FlatBuffers/Mutable.swift
index c8e6077..4683098 100644
--- a/swift/Sources/FlatBuffers/Mutable.swift
+++ b/swift/Sources/FlatBuffers/Mutable.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// Mutable is a protocol that allows us to mutate Scalar values within a ``ByteBuffer``
 public protocol Mutable {
   /// makes Flatbuffer accessed within the Protocol
diff --git a/swift/Sources/FlatBuffers/NativeObject.swift b/swift/Sources/FlatBuffers/NativeObject.swift
index 2ed8397..d89f603 100644
--- a/swift/Sources/FlatBuffers/NativeObject.swift
+++ b/swift/Sources/FlatBuffers/NativeObject.swift
@@ -27,8 +27,7 @@
   /// - Parameter type: Type of the Flatbuffer object
   /// - Returns: returns the encoded sized ByteBuffer
   public func serialize<T: ObjectAPIPacker>(type: T.Type) -> ByteBuffer
-    where T.T == Self
-  {
+  where T.T == Self {
     var builder = FlatBufferBuilder(initialSize: 1024)
     return serialize(builder: &builder, type: type.self)
   }
@@ -43,8 +42,8 @@
   ///  It can be considered less expensive in terms of memory allocation
   public func serialize<T: ObjectAPIPacker>(
     builder: inout FlatBufferBuilder,
-    type: T.Type) -> ByteBuffer where T.T == Self
-  {
+    type: T.Type
+  ) -> ByteBuffer where T.T == Self {
     var s = self
     let root = type.pack(&builder, obj: &s)
     builder.finish(offset: root)
diff --git a/swift/Sources/FlatBuffers/Root.swift b/swift/Sources/FlatBuffers/Root.swift
index a725f1e..0e64bd5 100644
--- a/swift/Sources/FlatBuffers/Root.swift
+++ b/swift/Sources/FlatBuffers/Root.swift
@@ -29,8 +29,8 @@
 public func getPrefixedSizeCheckedRoot<T: FlatBufferObject & Verifiable>(
   byteBuffer: inout ByteBuffer,
   fileId: String? = nil,
-  options: VerifierOptions = .init()) throws -> T
-{
+  options: VerifierOptions = .init()
+) throws -> T {
   byteBuffer.skipPrefix()
   return try getCheckedRoot(
     byteBuffer: &byteBuffer,
@@ -51,8 +51,8 @@
 public func getCheckedPrefixedSizeRoot<T: FlatBufferObject & Verifiable>(
   byteBuffer: inout ByteBuffer,
   fileId: String? = nil,
-  options: VerifierOptions = .init()) throws -> T
-{
+  options: VerifierOptions = .init()
+) throws -> T {
   let prefix = byteBuffer.skipPrefix()
   if prefix != byteBuffer.size {
     throw FlatbuffersErrors.prefixedSizeNotEqualToBufferSize
@@ -71,7 +71,8 @@
 /// ``getPrefixedSizeCheckedRoot(byteBuffer:options:)`` would skip the first Bytes in
 /// the ``ByteBuffer`` and then calls ``getRoot(byteBuffer:)``
 public func getPrefixedSizeRoot<T: FlatBufferObject>(
-  byteBuffer: inout ByteBuffer)
+  byteBuffer: inout ByteBuffer
+)
   -> T
 {
   byteBuffer.skipPrefix()
@@ -92,8 +93,8 @@
 public func getCheckedRoot<T: FlatBufferObject & Verifiable>(
   byteBuffer: inout ByteBuffer,
   fileId: String? = nil,
-  options: VerifierOptions = .init()) throws -> T
-{
+  options: VerifierOptions = .init()
+) throws -> T {
   var verifier = try Verifier(buffer: &byteBuffer, options: options)
   if let fileId = fileId {
     try verifier.verify(id: fileId)
@@ -101,8 +102,8 @@
   try ForwardOffset<T>.verify(&verifier, at: 0, of: T.self)
   return T.init(
     byteBuffer,
-    o: Int32(byteBuffer.read(def: UOffset.self, position: byteBuffer.reader)) &+
-      Int32(byteBuffer.reader))
+    o: Int32(byteBuffer.read(def: UOffset.self, position: byteBuffer.reader))
+      &+ Int32(byteBuffer.reader))
 }
 
 /// Returns a `NON-Checked` flatbuffers object
@@ -111,6 +112,6 @@
 public func getRoot<T: FlatBufferObject>(byteBuffer: inout ByteBuffer) -> T {
   T.init(
     byteBuffer,
-    o: Int32(byteBuffer.read(def: UOffset.self, position: byteBuffer.reader)) &+
-      Int32(byteBuffer.reader))
+    o: Int32(byteBuffer.read(def: UOffset.self, position: byteBuffer.reader))
+      &+ Int32(byteBuffer.reader))
 }
diff --git a/swift/Sources/FlatBuffers/String+extension.swift b/swift/Sources/FlatBuffers/String+extension.swift
index 1a2df14..2484994 100644
--- a/swift/Sources/FlatBuffers/String+extension.swift
+++ b/swift/Sources/FlatBuffers/String+extension.swift
@@ -28,8 +28,8 @@
   public static func verify<T>(
     _ verifier: inout Verifier,
     at position: Int,
-    of type: T.Type) throws where T: Verifiable
-  {
+    of type: T.Type
+  ) throws where T: Verifiable {
 
     let range = try String.verifyRange(&verifier, at: position, of: UInt8.self)
     /// Safe &+ since we already check for overflow in verify range
@@ -41,9 +41,10 @@
         end: verifier.capacity)
     }
 
-    let isNullTerminated = verifier._buffer.read(
-      def: UInt8.self,
-      position: stringLen) == 0
+    let isNullTerminated =
+      verifier._buffer.read(
+        def: UInt8.self,
+        position: stringLen) == 0
 
     if !verifier._options._ignoreMissingNullTerminators && !isNullTerminated {
       let str = verifier._buffer.readString(at: range.start, count: range.count)
@@ -63,9 +64,10 @@
   public init(_ bb: ByteBuffer, o: Int32) {
     let v = Int(o)
     let count = bb.read(def: Int32.self, position: v)
-    self = bb.readString(
-      at: MemoryLayout<Int32>.size &+ v,
-      count: Int(count)) ?? ""
+    self =
+      bb.readString(
+        at: MemoryLayout<Int32>.size &+ v,
+        count: Int(count)) ?? ""
   }
 }
 
@@ -73,16 +75,16 @@
 
   public static func pack(
     _ builder: inout FlatBufferBuilder,
-    obj: inout String?) -> Offset
-  {
+    obj: inout String?
+  ) -> Offset {
     guard var obj = obj else { return Offset() }
     return pack(&builder, obj: &obj)
   }
 
   public static func pack(
     _ builder: inout FlatBufferBuilder,
-    obj: inout String) -> Offset
-  {
+    obj: inout String
+  ) -> Offset {
     builder.create(string: obj)
   }
 
@@ -95,15 +97,14 @@
 extension String: NativeObject {
 
   public func serialize<T: ObjectAPIPacker>(type: T.Type) -> ByteBuffer
-    where T.T == Self
-  {
+  where T.T == Self {
     fatalError("serialize should never be called from string directly")
   }
 
   public func serialize<T: ObjectAPIPacker>(
     builder: inout FlatBufferBuilder,
-    type: T.Type) -> ByteBuffer where T.T == Self
-  {
+    type: T.Type
+  ) -> ByteBuffer where T.T == Self {
     fatalError("serialize should never be called from string directly")
   }
 }
diff --git a/swift/Sources/FlatBuffers/Struct.swift b/swift/Sources/FlatBuffers/Struct.swift
index df109a0..f9a2ee0 100644
--- a/swift/Sources/FlatBuffers/Struct.swift
+++ b/swift/Sources/FlatBuffers/Struct.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// Struct is a representation of a mutable `Flatbuffers` struct
 /// since native structs are value types and cant be mutated
 @frozen
diff --git a/swift/Sources/FlatBuffers/Table.swift b/swift/Sources/FlatBuffers/Table.swift
index 63b5bf9..0611489 100644
--- a/swift/Sources/FlatBuffers/Table.swift
+++ b/swift/Sources/FlatBuffers/Table.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// `Table` is a Flatbuffers object that can read,
 /// mutate scalar fields within a valid flatbuffers buffer
 @frozen
@@ -51,10 +51,13 @@
   /// - Returns: offset of field within buffer
   public func offset(_ o: Int32) -> Int32 {
     let vtable = position &- bb.read(def: Int32.self, position: Int(position))
-    return o < bb
-      .read(def: VOffset.self, position: Int(vtable)) ? Int32(bb.read(
-        def: Int16.self,
-        position: Int(vtable &+ o))) : 0
+    return o
+      < bb
+      .read(def: VOffset.self, position: Int(vtable))
+      ? Int32(
+        bb.read(
+          def: Int16.self,
+          position: Int(vtable &+ o))) : 0
   }
 
   /// Gets the indirect offset of the current stored object
@@ -141,8 +144,8 @@
   @inline(__always)
   public func withUnsafePointerToSlice<T>(
     at off: Int32,
-    body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T?
-  {
+    body: (UnsafeRawBufferPointer) throws -> T
+  ) rethrows -> T? {
     let o = offset(off)
     guard o != 0 else { return nil }
     return try bb.withUnsafePointerToSlice(
@@ -189,14 +192,18 @@
   static public func offset(
     _ o: Int32,
     vOffset: Int32,
-    fbb: inout FlatBufferBuilder) -> Int32
-  {
+    fbb: inout FlatBufferBuilder
+  ) -> Int32 {
     let vTable = Int32(fbb.capacity) &- o
-    return vTable &+ Int32(fbb.read(
-      def: Int16.self,
-      position: Int(vTable &+ vOffset &- fbb.read(
-        def: Int32.self,
-        position: Int(vTable)))))
+    return vTable
+      &+ Int32(
+        fbb.read(
+          def: Int16.self,
+          position: Int(
+            vTable &+ vOffset
+              &- fbb.read(
+                def: Int32.self,
+                position: Int(vTable)))))
   }
 
   /// Compares two objects at offset A and offset B within a ByteBuffer
@@ -209,8 +216,8 @@
   static public func compare(
     _ off1: Int32,
     _ off2: Int32,
-    fbb: inout FlatBufferBuilder) -> Int32
-  {
+    fbb: inout FlatBufferBuilder
+  ) -> Int32 {
     let memorySize = Int32(MemoryLayout<Int32>.size)
     let _off1 = off1 &+ fbb.read(def: Int32.self, position: Int(off1))
     let _off2 = off2 &+ fbb.read(def: Int32.self, position: Int(off2))
@@ -239,8 +246,8 @@
   static public func compare(
     _ off1: Int32,
     _ key: [Byte],
-    fbb: inout FlatBufferBuilder) -> Int32
-  {
+    fbb: inout FlatBufferBuilder
+  ) -> Int32 {
     let memorySize = Int32(MemoryLayout<Int32>.size)
     let _off1 = off1 &+ fbb.read(def: Int32.self, position: Int(off1))
     let len1 = fbb.read(def: Int32.self, position: Int(_off1))
@@ -267,14 +274,18 @@
   static public func offset(
     _ o: Int32,
     vOffset: Int32,
-    fbb: ByteBuffer) -> Int32
-  {
+    fbb: ByteBuffer
+  ) -> Int32 {
     let vTable = Int32(fbb.capacity) &- o
-    return vTable &+ Int32(fbb.read(
-      def: Int16.self,
-      position: Int(vTable &+ vOffset &- fbb.read(
-        def: Int32.self,
-        position: Int(vTable)))))
+    return vTable
+      &+ Int32(
+        fbb.read(
+          def: Int16.self,
+          position: Int(
+            vTable &+ vOffset
+              &- fbb.read(
+                def: Int32.self,
+                position: Int(vTable)))))
   }
 
   /// Compares two objects at offset A and offset B within a ByteBuffer
@@ -287,8 +298,8 @@
   static public func compare(
     _ off1: Int32,
     _ off2: Int32,
-    fbb: ByteBuffer) -> Int32
-  {
+    fbb: ByteBuffer
+  ) -> Int32 {
     let memorySize = Int32(MemoryLayout<Int32>.size)
     let _off1 = off1 &+ fbb.read(def: Int32.self, position: Int(off1))
     let _off2 = off2 &+ fbb.read(def: Int32.self, position: Int(off2))
@@ -317,8 +328,8 @@
   static public func compare(
     _ off1: Int32,
     _ key: [Byte],
-    fbb: ByteBuffer) -> Int32
-  {
+    fbb: ByteBuffer
+  ) -> Int32 {
     let memorySize = Int32(MemoryLayout<Int32>.size)
     let _off1 = off1 &+ fbb.read(def: Int32.self, position: Int(off1))
     let len1 = fbb.read(def: Int32.self, position: Int(_off1))
diff --git a/swift/Sources/FlatBuffers/TableVerifier.swift b/swift/Sources/FlatBuffers/TableVerifier.swift
index 6c763c5..2849dec 100644
--- a/swift/Sources/FlatBuffers/TableVerifier.swift
+++ b/swift/Sources/FlatBuffers/TableVerifier.swift
@@ -45,8 +45,8 @@
     position: Int,
     vtable: Int,
     vtableLength: Int,
-    verifier: inout Verifier)
-  {
+    verifier: inout Verifier
+  ) {
     _position = position
     _vtable = vtable
     _vtableLength = vtableLength
@@ -84,8 +84,8 @@
     field: VOffset,
     fieldName: String,
     required: Bool,
-    type: T.Type) throws where T: Verifiable
-  {
+    type: T.Type
+  ) throws where T: Verifiable {
     let derefValue = try dereference(field)
 
     if let value = derefValue {
@@ -115,9 +115,9 @@
     unionKeyName: String,
     fieldName: String,
     required: Bool,
-    completion: @escaping (inout Verifier, T, Int) throws -> Void) throws
-    where T: UnionEnum
-  {
+    completion: @escaping (inout Verifier, T, Int) throws -> Void
+  ) throws
+  where T: UnionEnum {
     let keyPos = try dereference(key)
     let valPos = try dereference(field)
 
@@ -131,14 +131,16 @@
     }
 
     if let _key = keyPos,
-       let _val = valPos
+      let _val = valPos
     {
       /// verifiying that the key is within the buffer
       try T.T.verify(&_verifier, at: _key, of: T.T.self)
-      guard let _enum = try T.init(value: _verifier._buffer.read(
-        def: T.T.self,
-        position: _key)) else
-      {
+      guard
+        let _enum = try T.init(
+          value: _verifier._buffer.read(
+            def: T.T.self,
+            position: _key))
+      else {
         throw FlatbuffersErrors.unknownUnionCase
       }
       /// we are assuming that Unions will always be of type Uint8
@@ -170,14 +172,14 @@
     unionKeyName: String,
     fieldName: String,
     required: Bool,
-    completion: @escaping (inout Verifier, T, Int) throws -> Void) throws
-    where T: UnionEnum
-  {
+    completion: @escaping (inout Verifier, T, Int) throws -> Void
+  ) throws
+  where T: UnionEnum {
     let keyVectorPosition = try dereference(key)
     let offsetVectorPosition = try dereference(field)
 
     if let keyPos = keyVectorPosition,
-       let valPos = offsetVectorPosition
+      let valPos = offsetVectorPosition
     {
       try UnionVector<T>.verify(
         &_verifier,
diff --git a/swift/Sources/FlatBuffers/VeriferOptions.swift b/swift/Sources/FlatBuffers/VeriferOptions.swift
index a7f11e2..c1ab2ef 100644
--- a/swift/Sources/FlatBuffers/VeriferOptions.swift
+++ b/swift/Sources/FlatBuffers/VeriferOptions.swift
@@ -39,10 +39,10 @@
   ///   - ignoreMissingNullTerminators: Ignoring missing null terminals in strings *Currently not supported in swift*
   public init(
     maxDepth: UOffset = 64,
-    maxTableCount: UOffset = 1000000,
+    maxTableCount: UOffset = 1_000_000,
     maxApparentSize: UOffset = 1 << 31,
-    ignoreMissingNullTerminators: Bool = false)
-  {
+    ignoreMissingNullTerminators: Bool = false
+  ) {
     _maxDepth = maxDepth
     _maxTableCount = maxTableCount
     _maxApparentSize = maxApparentSize
diff --git a/swift/Sources/FlatBuffers/Verifiable.swift b/swift/Sources/FlatBuffers/Verifiable.swift
index 4343594..60c8b4f 100644
--- a/swift/Sources/FlatBuffers/Verifiable.swift
+++ b/swift/Sources/FlatBuffers/Verifiable.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// Verifiable is a protocol all swift flatbuffers object should conform to,
 /// since swift is similar to `cpp` and `rust` where the data is read directly
 /// from `unsafeMemory` thus the need to verify if the buffer received is a valid one
@@ -51,8 +51,8 @@
   @discardableResult
   public static func verifyRange<T>(
     _ verifier: inout Verifier,
-    at position: Int, of type: T.Type) throws -> (start: Int, count: Int)
-  {
+    at position: Int, of type: T.Type
+  ) throws -> (start: Int, count: Int) {
     let len: UOffset = try verifier.getValue(at: position)
     let intLen = Int(len)
     let start = Int(clamping: (position &+ MemoryLayout<Int32>.size).magnitude)
@@ -74,8 +74,8 @@
   public static func verify<T>(
     _ verifier: inout Verifier,
     at position: Int,
-    of type: T.Type) throws where T: Verifiable
-  {
+    of type: T.Type
+  ) throws where T: Verifiable {
     try verifier.inBuffer(position: position, of: type.self)
   }
 }
@@ -96,8 +96,8 @@
   public static func verify<T>(
     _ verifier: inout Verifier,
     at position: Int,
-    of type: T.Type) throws where T: Verifiable
-  {
+    of type: T.Type
+  ) throws where T: Verifiable {
     let offset: UOffset = try verifier.getValue(at: position)
     let nextOffset = Int(clamping: (Int(offset) &+ position).magnitude)
     try U.verify(&verifier, at: nextOffset, of: U.self)
@@ -120,8 +120,8 @@
   public static func verify<T>(
     _ verifier: inout Verifier,
     at position: Int,
-    of type: T.Type) throws where T: Verifiable
-  {
+    of type: T.Type
+  ) throws where T: Verifiable {
     /// checks if the next verification type S is equal to U of type forwardOffset
     /// This had to be done since I couldnt find a solution for duplicate call functions
     /// A fix will be appreciated
@@ -170,8 +170,8 @@
     fieldPosition: Int,
     unionKeyName: String,
     fieldName: String,
-    completion: @escaping Completion) throws
-  {
+    completion: @escaping Completion
+  ) throws {
     /// Get offset for union key vectors and offset vectors
     let keyOffset: UOffset = try verifier.getValue(at: keyPosition)
     let fieldOffset: UOffset = try verifier.getValue(at: fieldPosition)
@@ -202,10 +202,12 @@
 
       /// index of readable enum value in array
       let keysIndex = MemoryLayout<S.T>.size &* count
-      guard let _enum = try S.init(value: verifier._buffer.read(
-        def: S.T.self,
-        position: keysRange.start &+ keysIndex)) else
-      {
+      guard
+        let _enum = try S.init(
+          value: verifier._buffer.read(
+            def: S.T.self,
+            position: keysRange.start &+ keysIndex))
+      else {
         throw FlatbuffersErrors.unknownUnionCase
       }
       /// index of readable offset value in array
diff --git a/swift/Sources/FlatBuffers/Verifier.swift b/swift/Sources/FlatBuffers/Verifier.swift
index 6f94f94..098dcbb 100644
--- a/swift/Sources/FlatBuffers/Verifier.swift
+++ b/swift/Sources/FlatBuffers/Verifier.swift
@@ -44,7 +44,6 @@
     storage.tableCount
   }
 
-
   /// Initializer for the verifier
   /// - Parameters:
   ///   - buffer: Bytebuffer that is required to be verified
@@ -54,8 +53,8 @@
   public init(
     buffer: inout ByteBuffer,
     options: VerifierOptions = .init(),
-    checkAlignment: Bool = true) throws
-  {
+    checkAlignment: Bool = true
+  ) throws {
     guard buffer.capacity < FlatBufferMaxSize else {
       throw FlatbuffersErrors.exceedsMaxSizeAllowed
     }
@@ -186,17 +185,21 @@
 
     let reportedOverflow: (partialValue: UInt32, overflow: Bool)
     if offset > 0 {
-      reportedOverflow = _int32Position
+      reportedOverflow =
+        _int32Position
         .subtractingReportingOverflow(offset.magnitude)
     } else {
-      reportedOverflow = _int32Position
+      reportedOverflow =
+        _int32Position
         .addingReportingOverflow(offset.magnitude)
     }
 
     /// since `subtractingReportingOverflow` & `addingReportingOverflow` returns true,
     /// if there is overflow we return failure
-    if reportedOverflow.overflow || reportedOverflow.partialValue > _buffer
-      .capacity
+    if reportedOverflow.overflow
+      || reportedOverflow.partialValue
+        > _buffer
+        .capacity
     {
       throw FlatbuffersErrors.signedOffsetOutOfBounds(
         offset: Int(offset),
diff --git a/swift/Sources/FlatBuffers/_InternalByteBuffer.swift b/swift/Sources/FlatBuffers/_InternalByteBuffer.swift
index 13f2b6e..ea7ea54 100644
--- a/swift/Sources/FlatBuffers/_InternalByteBuffer.swift
+++ b/swift/Sources/FlatBuffers/_InternalByteBuffer.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// `ByteBuffer` is the interface that stores the data for a `Flatbuffers` object
 /// it allows users to Construct their buffers internally without much cost to performance
 @usableFromInline
@@ -144,18 +144,18 @@
   /// Adds a `ContiguousBytes` to buffer memory
   /// - Parameter value: bytes to copy
   #if swift(>=5.0) && !os(WASI)
-  @inline(__always)
-  @usableFromInline
-  mutating func push(bytes: ContiguousBytes) {
-    bytes.withUnsafeBytes { ptr in
-      ensureSpace(size: ptr.count)
-      memcpy(
-        _storage.memory.advanced(by: writerIndex &- ptr.count),
-        ptr.baseAddress!,
-        ptr.count)
-      _writerSize = _writerSize &+ ptr.count
+    @inline(__always)
+    @usableFromInline
+    mutating func push(bytes: ContiguousBytes) {
+      bytes.withUnsafeBytes { ptr in
+        ensureSpace(size: ptr.count)
+        memcpy(
+          _storage.memory.advanced(by: writerIndex &- ptr.count),
+          ptr.baseAddress!,
+          ptr.count)
+        _writerSize = _writerSize &+ ptr.count
+      }
     }
-  }
   #endif
 
   /// Adds an object of type NativeStruct into the buffer
@@ -200,8 +200,7 @@
   mutating func push(string str: String, len: Int) {
     ensureSpace(size: len)
     if str.utf8
-      .withContiguousStorageIfAvailable({ self.push(bytes: $0, len: len) }) !=
-      nil
+      .withContiguousStorageIfAvailable({ self.push(bytes: $0, len: len) }) != nil
     {
     } else {
       let utf8View = str.utf8
@@ -219,8 +218,8 @@
   @inline(__always)
   mutating func push(
     bytes: UnsafeBufferPointer<String.UTF8View.Element>,
-    len: Int) -> Bool
-  {
+    len: Int
+  ) -> Bool {
     memcpy(
       _storage.memory.advanced(by: writerIndex &- len),
       bytes.baseAddress!,
@@ -260,7 +259,7 @@
   mutating func ensureSpace(size: Int) -> Int {
     let expectedWriterIndex = size &+ _writerSize
     if expectedWriterIndex > capacity {
-      
+
       let currentWritingIndex = capacity &- _writerSize
       while capacity <= expectedWriterIndex {
         capacity = capacity << 1
@@ -269,7 +268,6 @@
       /// solution take from Apple-NIO
       capacity = capacity.convertToPowerofTwo
 
-      
       _storage.reallocate(
         capacity: capacity,
         writerSize: _writerSize,
@@ -327,30 +325,32 @@
   @inline(__always)
   func withUnsafeBytes<T>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
-    try body(UnsafeRawBufferPointer(
-      start: _storage.memory,
-      count: capacity))
+      -> T
+  ) rethrows -> T {
+    try body(
+      UnsafeRawBufferPointer(
+        start: _storage.memory,
+        count: capacity))
   }
 
   @discardableResult
   @inline(__always)
   func withUnsafeSlicedBytes<T>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
-    try body(UnsafeRawBufferPointer(
-      start: _storage.memory.advanced(by: writerIndex),
-      count: capacity &- writerIndex))
+      -> T
+  ) rethrows -> T {
+    try body(
+      UnsafeRawBufferPointer(
+        start: _storage.memory.advanced(by: writerIndex),
+        count: capacity &- writerIndex))
   }
 
   @discardableResult
   @inline(__always)
   func withUnsafeRawPointer<T>(
     _ body: (UnsafeMutableRawPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try body(_storage.memory)
   }
 
@@ -358,8 +358,8 @@
   @inline(__always)
   func readWithUnsafeRawPointer<T>(
     position: Int,
-    _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-  {
+    _ body: (UnsafeRawPointer) throws -> T
+  ) rethrows -> T {
     try body(_storage.memory.advanced(by: position))
   }
 }
diff --git a/swift/Sources/FlexBuffers/ByteBuffer.swift b/swift/Sources/FlexBuffers/ByteBuffer.swift
index f490f0d..99ceea0 100644
--- a/swift/Sources/FlexBuffers/ByteBuffer.swift
+++ b/swift/Sources/FlexBuffers/ByteBuffer.swift
@@ -29,8 +29,8 @@
     @usableFromInline
     enum Blob {
       #if !os(WASI)
-      case data(Data)
-      case bytes(ContiguousBytes)
+        case data(Data)
+        case bytes(ContiguousBytes)
       #endif
 
       case byteBuffer(_InternalByteBuffer)
@@ -96,16 +96,16 @@
     @inline(__always)
     func withUnsafeBytes<T>(
       _ body: (UnsafeRawBufferPointer) throws
-        -> T) rethrows -> T
-    {
+        -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.withUnsafeBytes(body)
       #if !os(WASI)
-      case .data(let data):
-        return try data.withUnsafeBytes(body)
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes.withUnsafeBytes(body)
+        case .data(let data):
+          return try data.withUnsafeBytes(body)
+        case .bytes(let contiguousBytes):
+          return try contiguousBytes.withUnsafeBytes(body)
       #endif
       case .array(let array):
         return try array.withUnsafeBytes(body)
@@ -118,25 +118,28 @@
     @inline(__always)
     func withUnsafeRawPointer<T>(
       _ body: (UnsafeMutableRawPointer) throws
-        -> T) rethrows -> T
-    {
+        -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.withUnsafeRawPointer(body)
       #if !os(WASI)
-      case .data(let data):
-        return try data
-          .withUnsafeBytes {
-            try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
-          }
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes
-          .withUnsafeBytes {
-            try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
-          }
+        case .data(let data):
+          return
+            try data
+            .withUnsafeBytes {
+              try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
+            }
+        case .bytes(let contiguousBytes):
+          return
+            try contiguousBytes
+            .withUnsafeBytes {
+              try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
+            }
       #endif
       case .array(let array):
-        return try array
+        return
+          try array
           .withUnsafeBytes {
             try body(UnsafeMutableRawPointer(mutating: $0.baseAddress!))
           }
@@ -149,20 +152,20 @@
     @inline(__always)
     func readWithUnsafeRawPointer<T>(
       position: Int,
-      _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-    {
+      _ body: (UnsafeRawPointer) throws -> T
+    ) rethrows -> T {
       switch retainedBlob {
       case .byteBuffer(let byteBuffer):
         return try byteBuffer.readWithUnsafeRawPointer(position: position, body)
       #if !os(WASI)
-      case .data(let data):
-        return try data.withUnsafeBytes {
-          try body($0.baseAddress!.advanced(by: position))
-        }
-      case .bytes(let contiguousBytes):
-        return try contiguousBytes.withUnsafeBytes {
-          try body($0.baseAddress!.advanced(by: position))
-        }
+        case .data(let data):
+          return try data.withUnsafeBytes {
+            try body($0.baseAddress!.advanced(by: position))
+          }
+        case .bytes(let contiguousBytes):
+          return try contiguousBytes.withUnsafeBytes {
+            try body($0.baseAddress!.advanced(by: position))
+          }
       #endif
       case .array(let array):
         return try array.withUnsafeBytes {
@@ -204,8 +207,8 @@
   @inline(__always)
   public init(
     copyingMemoryBound memory: UnsafeRawPointer,
-    capacity: Int)
-  {
+    capacity: Int
+  ) {
     _storage = Storage(count: capacity)
     _storage.copy(from: memory, count: capacity)
     _readerIndex = capacity
@@ -223,29 +226,29 @@
   }
 
   #if !os(WASI)
-  /// Constructor that creates a Flatbuffer from the Swift Data type object
-  /// - Parameter
-  ///   - data: Swift data Object
-  @inline(__always)
-  public init(data: Data) {
-    _storage = Storage(blob: .data(data), capacity: data.count)
-    _readerIndex = data.count
-    capacity = data.count
-  }
+    /// Constructor that creates a Flatbuffer from the Swift Data type object
+    /// - Parameter
+    ///   - data: Swift data Object
+    @inline(__always)
+    public init(data: Data) {
+      _storage = Storage(blob: .data(data), capacity: data.count)
+      _readerIndex = data.count
+      capacity = data.count
+    }
 
-  /// Constructor that creates a Flatbuffer object from a ContiguousBytes
-  /// - Parameters:
-  ///   - contiguousBytes: Binary stripe to use as the buffer
-  ///   - count: amount of readable bytes
-  @inline(__always)
-  public init<Bytes: ContiguousBytes>(
-    contiguousBytes: Bytes,
-    count: Int)
-  {
-    _storage = Storage(blob: .bytes(contiguousBytes), capacity: count)
-    _readerIndex = count
-    capacity = count
-  }
+    /// Constructor that creates a Flatbuffer object from a ContiguousBytes
+    /// - Parameters:
+    ///   - contiguousBytes: Binary stripe to use as the buffer
+    ///   - count: amount of readable bytes
+    @inline(__always)
+    public init<Bytes: ContiguousBytes>(
+      contiguousBytes: Bytes,
+      count: Int
+    ) {
+      _storage = Storage(blob: .bytes(contiguousBytes), capacity: count)
+      _readerIndex = count
+      capacity = count
+    }
   #endif
 
   /// Constructor that creates a Flatbuffer from unsafe memory region without copying
@@ -257,8 +260,8 @@
   @inline(__always)
   public init(
     assumingMemoryBound memory: UnsafeMutableRawPointer,
-    capacity: Int)
-  {
+    capacity: Int
+  ) {
     _storage = Storage(
       blob: .pointer(memory),
       capacity: capacity)
@@ -275,8 +278,8 @@
   init(
     blob: Storage.Blob,
     count: Int,
-    removing removeBytes: Int)
-  {
+    removing removeBytes: Int
+  ) {
     _storage = Storage(blob: blob, capacity: count)
     _readerIndex = removeBytes
     capacity = count
@@ -368,8 +371,8 @@
     t3: T3.Type,
     t4: T4.Type,
     position: Int,
-    byteWidth: UInt8) -> T
-  {
+    byteWidth: UInt8
+  ) -> T {
     switch byteWidth {
     case 1:
       numericCast(read(def: T1.self, position: position))
@@ -389,8 +392,8 @@
   @inline(__always)
   public func readSlice<T>(
     index: Int,
-    count: Int) -> [T]
-  {
+    count: Int
+  ) -> [T] {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -407,8 +410,8 @@
   public func readString(
     at index: Int,
     count: Int,
-    type: String.Encoding) -> String?
-  {
+    type: String.Encoding
+  ) -> String? {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -429,8 +432,8 @@
   @inline(__always)
   public func readString(
     at index: Int,
-    count: Int) -> String?
-  {
+    count: Int
+  ) -> String? {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -448,8 +451,8 @@
   public func withUnsafePointerToSlice<T>(
     index: Int,
     count: Int,
-    body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T
-  {
+    body: (UnsafeRawBufferPointer) throws -> T
+  ) rethrows -> T {
     assert(
       index + count <= capacity,
       "Reading out of bounds is illegal")
@@ -462,8 +465,8 @@
   @inline(__always)
   public func withUnsafeBytes<T>(
     body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try _storage.withUnsafeBytes(body)
   }
 
@@ -471,8 +474,8 @@
   @inline(__always)
   func withUnsafeMutableRawPointer<T>(
     body: (UnsafeMutableRawPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try _storage.withUnsafeRawPointer(body)
   }
 
@@ -480,8 +483,8 @@
   @inline(__always)
   func readWithUnsafeRawPointer<T>(
     position: Int,
-    _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-  {
+    _ body: (UnsafeRawPointer) throws -> T
+  ) rethrows -> T {
     try _storage.readWithUnsafeRawPointer(position: position, body)
   }
 }
diff --git a/swift/Sources/FlexBuffers/FlexBufferType.swift b/swift/Sources/FlexBuffers/FlexBufferType.swift
index 4f51c5d..13f38f5 100644
--- a/swift/Sources/FlexBuffers/FlexBufferType.swift
+++ b/swift/Sources/FlexBuffers/FlexBufferType.swift
@@ -46,7 +46,8 @@
   @available(
     *,
     deprecated,
-    message: "use FBT_VECTOR or FBT_VECTOR_KEY instead.")
+    message: "use FBT_VECTOR or FBT_VECTOR_KEY instead."
+  )
   case vectorString = 15
 
   /// Typed tuples (no type table, no size field).
diff --git a/swift/Sources/FlexBuffers/Reader/FixedTypedVector.swift b/swift/Sources/FlexBuffers/Reader/FixedTypedVector.swift
index 667dfc9..a43752d 100644
--- a/swift/Sources/FlexBuffers/Reader/FixedTypedVector.swift
+++ b/swift/Sources/FlexBuffers/Reader/FixedTypedVector.swift
@@ -31,8 +31,8 @@
     offset: Int,
     byteWidth: UInt8,
     type: FlexBufferType,
-    count: Int)
-  {
+    count: Int
+  ) {
     self.byteBuffer = byteBuffer
     self.offset = offset
     self.byteWidth = byteWidth
diff --git a/swift/Sources/FlexBuffers/Reader/FlexBufferVector.swift b/swift/Sources/FlexBuffers/Reader/FlexBufferVector.swift
index f9d4234..4f98a72 100644
--- a/swift/Sources/FlexBuffers/Reader/FlexBufferVector.swift
+++ b/swift/Sources/FlexBuffers/Reader/FlexBufferVector.swift
@@ -39,13 +39,14 @@
   var count: Int { get }
 
   func withUnsafeRawBufferPointer<Result>(
-    _ body: (UnsafeRawBufferPointer) throws -> Result) rethrows -> Result
+    _ body: (UnsafeRawBufferPointer) throws -> Result
+  ) rethrows -> Result
 }
 
 extension FlexBufferContiguousBytes {
   public func withUnsafeRawBufferPointer<Result>(
-    _ body: (UnsafeRawBufferPointer) throws -> Result) rethrows -> Result
-  {
+    _ body: (UnsafeRawBufferPointer) throws -> Result
+  ) rethrows -> Result {
     try byteBuffer.withUnsafePointerToSlice(
       index: offset,
       count: count,
diff --git a/swift/Sources/FlexBuffers/Reader/Reference.swift b/swift/Sources/FlexBuffers/Reader/Reference.swift
index 4c820c7..380c6b2 100644
--- a/swift/Sources/FlexBuffers/Reader/Reference.swift
+++ b/swift/Sources/FlexBuffers/Reader/Reference.swift
@@ -58,8 +58,8 @@
     byteBuffer: ByteBuffer,
     offset: Int,
     parentWidth: UInt8,
-    packedType: UInt8)
-  {
+    packedType: UInt8
+  ) {
     guard let type = FlexBufferType(rawValue: UInt64(packedType >> 2)) else {
       return nil
     }
@@ -76,8 +76,8 @@
     offset: Int,
     parentWidth: UInt8,
     byteWidth: UInt8,
-    type: FlexBufferType)
-  {
+    type: FlexBufferType
+  ) {
     self.byteBuffer = byteBuffer
     self.offset = offset
     self.parentWidth = parentWidth
@@ -97,7 +97,8 @@
   public var uint: UInt64? {
     return switch type {
     case .uint: byteBuffer.readUInt64(offset: offset, byteWidth: byteWidth)
-    case .indirectUInt: byteBuffer.readUInt64(
+    case .indirectUInt:
+      byteBuffer.readUInt64(
         offset: indirect(),
         byteWidth: byteWidth)
     default: nil
@@ -108,7 +109,8 @@
   public var int: Int64? {
     return switch type {
     case .int: byteBuffer.readInt64(offset: offset, byteWidth: byteWidth)
-    case .indirectInt: byteBuffer.readInt64(
+    case .indirectInt:
+      byteBuffer.readInt64(
         offset: indirect(),
         byteWidth: byteWidth)
     default: nil
@@ -119,7 +121,8 @@
   public var double: Double? {
     return switch type {
     case .float: byteBuffer.readDouble(offset: offset, byteWidth: byteWidth)
-    case .indirectFloat: byteBuffer.readDouble(
+    case .indirectFloat:
+      byteBuffer.readDouble(
         offset: indirect(),
         byteWidth: byteWidth)
     default: nil
@@ -238,7 +241,8 @@
   @inline(__always)
   public func withUnsafeRawPointer<Result>(
     _ completion: (UnsafeRawPointer) throws
-      -> Result)
+      -> Result
+  )
     rethrows -> Result?
   {
     return try byteBuffer.readWithUnsafeRawPointer(
diff --git a/swift/Sources/FlexBuffers/Reader/TypedVector.swift b/swift/Sources/FlexBuffers/Reader/TypedVector.swift
index 7a2f861..3d481c3 100644
--- a/swift/Sources/FlexBuffers/Reader/TypedVector.swift
+++ b/swift/Sources/FlexBuffers/Reader/TypedVector.swift
@@ -30,8 +30,8 @@
     byteBuffer: ByteBuffer,
     offset: Int,
     byteWidth: UInt8,
-    type: FlexBufferType)
-  {
+    type: FlexBufferType
+  ) {
     self.byteBuffer = byteBuffer
     self.offset = offset
     self.byteWidth = byteWidth
@@ -54,8 +54,8 @@
   static func mapKeys(
     byteBuffer: ByteBuffer,
     offset: Int,
-    byteWidth: UInt8) -> TypedVector
-  {
+    byteWidth: UInt8
+  ) -> TypedVector {
     let prefixedFields = 3
     let keysOffset = offset &- (numericCast(byteWidth) &* prefixedFields)
 
@@ -88,12 +88,11 @@
       byteWidth)
 
     return byteBuffer.readWithUnsafeRawPointer(
-      position: indirectoffset)
-    { bufPointer in
+      position: indirectoffset
+    ) { bufPointer in
       target.withCString { strPointer in
         Int(strcmp(bufPointer, strPointer))
       }
     }
   }
 }
-
diff --git a/swift/Sources/FlexBuffers/Utils/BitWidth.swift b/swift/Sources/FlexBuffers/Utils/BitWidth.swift
index 08c818e..d620500 100644
--- a/swift/Sources/FlexBuffers/Utils/BitWidth.swift
+++ b/swift/Sources/FlexBuffers/Utils/BitWidth.swift
@@ -18,7 +18,10 @@
 
 @usableFromInline
 enum BitWidth: UInt64, CaseIterable {
-  case w8 = 0, w16 = 1, w32 = 2, w64 = 3
+  case w8 = 0
+  case w16 = 1
+  case w32 = 2
+  case w64 = 3
 }
 
 extension BitWidth: Comparable {
diff --git a/swift/Sources/FlexBuffers/Utils/Constants.swift b/swift/Sources/FlexBuffers/Utils/Constants.swift
index 8b40f2d..f3489dc 100644
--- a/swift/Sources/FlexBuffers/Utils/Constants.swift
+++ b/swift/Sources/FlexBuffers/Utils/Constants.swift
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 extension UInt64 {
   static let one: UInt64 = 1
 }
@@ -55,4 +56,3 @@
     }
   }
 }
-
diff --git a/swift/Sources/FlexBuffers/Utils/Value.swift b/swift/Sources/FlexBuffers/Utils/Value.swift
index 04d46e0..32179f4 100644
--- a/swift/Sources/FlexBuffers/Utils/Value.swift
+++ b/swift/Sources/FlexBuffers/Utils/Value.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 public struct Value: Equatable {
 
   @usableFromInline
@@ -110,9 +110,11 @@
       return bitWidth
     } else {
       for byteWidth in stride(from: 1, to: MemoryLayout<UInt64>.size, by: 2) {
-        let _offsetLoc: UInt64 = numericCast(numericCast(size) &+ padding(
-          bufSize: numericCast(size),
-          elementSize: numericCast(byteWidth)))
+        let _offsetLoc: UInt64 = numericCast(
+          numericCast(size)
+            &+ padding(
+              bufSize: numericCast(size),
+              elementSize: numericCast(byteWidth)))
         let offsetLoc = _offsetLoc &+ (index &* numericCast(byteWidth))
         let offset = offsetLoc &- u
 
diff --git a/swift/Sources/FlexBuffers/Utils/functions.swift b/swift/Sources/FlexBuffers/Utils/functions.swift
index dc071cd..5a81edd 100644
--- a/swift/Sources/FlexBuffers/Utils/functions.swift
+++ b/swift/Sources/FlexBuffers/Utils/functions.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 @inline(__always)
 internal func isInline(_ t: FlexBufferType) -> Bool {
   return t <= .float || t == .bool
@@ -73,17 +73,26 @@
 
 @inline(__always)
 func toTypedVector(type: FlexBufferType, length: UInt64) -> FlexBufferType {
-  let type: UInt64 = switch length {
-  case 0: type.rawValue &- FlexBufferType.int.rawValue &+ FlexBufferType
-    .vectorInt.rawValue
-  case 2: type.rawValue &- FlexBufferType.int.rawValue &+ FlexBufferType
-    .vectorInt2.rawValue
-  case 3: type.rawValue &- FlexBufferType.int.rawValue &+ FlexBufferType
-    .vectorInt3.rawValue
-  case 4: type.rawValue &- FlexBufferType.int.rawValue &+ FlexBufferType
-    .vectorInt4.rawValue
-  default: 0
-  }
+  let type: UInt64 =
+    switch length {
+    case 0:
+      type.rawValue &- FlexBufferType.int.rawValue
+        &+ FlexBufferType
+        .vectorInt.rawValue
+    case 2:
+      type.rawValue &- FlexBufferType.int.rawValue
+        &+ FlexBufferType
+        .vectorInt2.rawValue
+    case 3:
+      type.rawValue &- FlexBufferType.int.rawValue
+        &+ FlexBufferType
+        .vectorInt3.rawValue
+    case 4:
+      type.rawValue &- FlexBufferType.int.rawValue
+        &+ FlexBufferType
+        .vectorInt4.rawValue
+    default: 0
+    }
   return FlexBufferType(rawValue: type) ?? .null
 }
 
@@ -100,7 +109,8 @@
 @inline(__always)
 func toTypedVectorElementType(type: FlexBufferType) -> FlexBufferType? {
   return FlexBufferType(
-    rawValue: type.rawValue &- FlexBufferType.vectorInt
+    rawValue: type.rawValue
+      &- FlexBufferType.vectorInt
       .rawValue &+ FlexBufferType.int.rawValue)
 }
 
@@ -115,12 +125,16 @@
 {
   assert(isFixedTypedVectorType(type: type))
   let fixedType: UInt64 = numericCast(
-    type.rawValue &- FlexBufferType.vectorInt2
+    type.rawValue
+      &- FlexBufferType.vectorInt2
       .rawValue)
   let len: Int = numericCast(fixedType.dividedReportingOverflow(by: 3).partialValue &+ 2)
   return (
-    FlexBufferType(rawValue: (fixedType.quotientAndRemainder(dividingBy: 3).remainder) &+ FlexBufferType.int.rawValue),
-    len)
+    FlexBufferType(
+      rawValue: (fixedType.quotientAndRemainder(dividingBy: 3).remainder)
+        &+ FlexBufferType.int.rawValue),
+    len
+  )
 }
 
 // MARK: - Reader functions
@@ -128,8 +142,8 @@
 @inline(__always)
 func binarySearch(
   vector: TypedVector,
-  target: String) -> Int?
-{
+  target: String
+) -> Int? {
   var left = 0
   var right = vector.count
 
@@ -149,14 +163,17 @@
 
 @inline(__always)
 func readIndirect(buffer: ByteBuffer, offset: Int, _ byteWidth: UInt8) -> Int {
-  return offset &- numericCast(buffer.readUInt64(
-    offset: offset,
-    byteWidth: byteWidth))
+  return offset
+    &- numericCast(
+      buffer.readUInt64(
+        offset: offset,
+        byteWidth: byteWidth))
 }
 
 @inline(__always)
 func getCount(buffer: ByteBuffer, offset: Int, byteWidth: UInt8) -> Int {
-  Int(buffer.readUInt64(
-    offset: offset &- numericCast(byteWidth),
-    byteWidth: byteWidth))
+  Int(
+    buffer.readUInt64(
+      offset: offset &- numericCast(byteWidth),
+      byteWidth: byteWidth))
 }
diff --git a/swift/Sources/FlexBuffers/Writer/FlexBuffersWriter.swift b/swift/Sources/FlexBuffers/Writer/FlexBuffersWriter.swift
index 4ab4e93..ac1373d 100644
--- a/swift/Sources/FlexBuffers/Writer/FlexBuffersWriter.swift
+++ b/swift/Sources/FlexBuffers/Writer/FlexBuffersWriter.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 private let twentyFourBytes: Int = 24
 public typealias FlexBuffersWriterBuilder = (inout FlexBuffersWriter) -> Void
 
@@ -74,21 +74,21 @@
   }
 
   #if !os(WASI)
-  /// Data representation of the buffer
-  ///
-  /// Should only be used after ``finish(offset:addPrefix:)`` is called
-  public var data: Data {
-    assert(finished, "Data shouldn't be called before finish()")
-    return _bb.withUnsafeSlicedBytes { ptr in
-      var data = Data()
-      data.append(
-        ptr.baseAddress!.bindMemory(
-          to: UInt8.self,
-          capacity: ptr.count),
-        count: ptr.count)
-      return data
+    /// Data representation of the buffer
+    ///
+    /// Should only be used after ``finish(offset:addPrefix:)`` is called
+    public var data: Data {
+      assert(finished, "Data shouldn't be called before finish()")
+      return _bb.withUnsafeSlicedBytes { ptr in
+        var data = Data()
+        data.append(
+          ptr.baseAddress!.bindMemory(
+            to: UInt8.self,
+            capacity: ptr.count),
+          count: ptr.count)
+        return data
+      }
     }
-  }
   #endif
 
   /// Resets the internal state. Automatically called before building a new flexbuffer.
@@ -139,8 +139,8 @@
   public mutating func endVector(
     start: Int,
     typed: Bool = false,
-    fixed: Bool = false) -> UInt64
-  {
+    fixed: Bool = false
+  ) -> UInt64 {
     let vec = createVector(
       start: start,
       count: stack.count &- start,
@@ -162,8 +162,7 @@
   @discardableResult
   @inline(__always)
   public mutating func create<T>(vector: [T], key: borrowing String) -> Int
-    where T: Scalar
-  {
+  where T: Scalar {
     add(key: key)
     return create(vector: vector, fixed: false)
   }
@@ -179,8 +178,8 @@
   @inline(__always)
   public mutating func createFixed<T>(
     vector: [T],
-    key: borrowing String) -> Int where T: Scalar
-  {
+    key: borrowing String
+  ) -> Int where T: Scalar {
     assert(vector.count >= 2 && vector.count <= 4)
     add(key: key)
     return create(vector: vector, fixed: true)
@@ -302,8 +301,8 @@
   @inline(__always)
   public mutating func add(
     uint64 value: borrowing UInt64,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     add(uint64: value)
   }
@@ -316,8 +315,8 @@
   @inline(__always)
   public mutating func indirect(
     uint64 val: borrowing UInt64,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(uint64: val)
   }
@@ -325,8 +324,8 @@
   @inline(__always)
   public mutating func indirect(
     uint val: borrowing UInt,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(uint64: numericCast(val))
   }
@@ -385,8 +384,8 @@
   @inline(__always)
   public mutating func add(
     int64 value: borrowing Int64,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     add(int64: value)
   }
@@ -399,8 +398,8 @@
   @inline(__always)
   public mutating func indirect(
     int64 val: borrowing Int64,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(int64: val)
   }
@@ -408,8 +407,8 @@
   @inline(__always)
   public mutating func indirect(
     int val: borrowing Int,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(int64: numericCast(val))
   }
@@ -424,8 +423,8 @@
   @inline(__always)
   public mutating func add(
     float32 value: borrowing Float32,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     add(float32: value)
   }
@@ -438,8 +437,8 @@
   @inline(__always)
   public mutating func indirect(
     float32 val: borrowing Float32,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(float32: val)
   }
@@ -452,8 +451,8 @@
   @inline(__always)
   public mutating func add(
     double value: borrowing Double,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     add(double: value)
   }
@@ -466,8 +465,8 @@
   @inline(__always)
   public mutating func indirect(
     double val: borrowing Double,
-    key: borrowing String)
-  {
+    key: borrowing String
+  ) {
     add(key: key)
     indirect(double: val)
   }
@@ -489,8 +488,8 @@
   @inline(__always)
   public mutating func add<T>(
     blob: borrowing T,
-    length l: Int) -> UInt where T: ContiguousBytes
-  {
+    length l: Int
+  ) -> UInt where T: ContiguousBytes {
     storeBlob(blob, len: l, type: .blob)
   }
 
@@ -499,8 +498,8 @@
   public mutating func add<T>(
     blob: borrowing T,
     key: borrowing String,
-    length l: Int) -> UInt where T: ContiguousBytes
-  {
+    length l: Int
+  ) -> UInt where T: ContiguousBytes {
     add(key: key)
     return storeBlob(blob, len: l, type: .blob)
   }
@@ -541,8 +540,8 @@
   mutating func pushIndirect<T>(
     value: T,
     type: FlexBufferType,
-    bitWidth: BitWidth)
-  {
+    bitWidth: BitWidth
+  ) {
     let byteWidth = align(width: bitWidth)
     let iloc = writerIndex
     _bb.ensureSpace(size: byteWidth)
@@ -619,8 +618,8 @@
   mutating func storeBlob<T>(
     _ bytes: T,
     len: Int,
-    type: FlexBufferType) -> UInt where T: ContiguousBytes
-  {
+    type: FlexBufferType
+  ) -> UInt where T: ContiguousBytes {
     return bytes.withUnsafeBytes {
       storeBlob(pointer: $0.baseAddress!, len: len, type: type)
     }
@@ -632,8 +631,8 @@
     pointer: borrowing UnsafeRawPointer,
     len: Int,
     trailing: Int = 0,
-    type: FlexBufferType) -> UInt
-  {
+    type: FlexBufferType
+  ) -> UInt {
     _bb.ensureSpace(size: len &+ trailing)
     let bitWidth = widthU(numericCast(len))
 
@@ -656,8 +655,7 @@
   @discardableResult
   @usableFromInline
   mutating func create<T>(vector: [T], fixed: Bool) -> Int
-    where T: Scalar
-  {
+  where T: Scalar {
     let length: UInt64 = numericCast(vector.count)
     let vectorType = getScalarType(type: T.self)
     let byteWidth = MemoryLayout<T>.size
@@ -693,8 +691,8 @@
     step: Int,
     typed: Bool,
     fixed: Bool,
-    keys: Value? = nil) -> Value
-  {
+    keys: Value? = nil
+  ) -> Value {
     assert(
       !fixed || typed,
       "Typed false and fixed true is a combination not supported currently")
@@ -736,16 +734,17 @@
     let byteWidth = align(width: bitWidth)
 
     let currentSize: Int = count &* step &* byteWidth
-    let requiredSize: Int = if !typed {
-      // We ensure that we have enough space
-      // for loop two write operations &
-      // 24 bytes for when its not fixed,
-      // and keys isn't null. As an extra safe
-      // guard
-      (currentSize &* 2) &+ twentyFourBytes
-    } else {
-      currentSize
-    }
+    let requiredSize: Int =
+      if !typed {
+        // We ensure that we have enough space
+        // for loop two write operations &
+        // 24 bytes for when its not fixed,
+        // and keys isn't null. As an extra safe
+        // guard
+        (currentSize &* 2) &+ twentyFourBytes
+      } else {
+        currentSize
+      }
 
     _bb.ensureSpace(
       size: requiredSize)
@@ -858,8 +857,8 @@
   @discardableResult
   public mutating func vector(
     key: String,
-    _ closure: FlexBuffersWriterBuilder) -> UInt64
-  {
+    _ closure: FlexBuffersWriterBuilder
+  ) -> UInt64 {
     let start = startVector(key: key)
     closure(&self)
     return endVector(start: start)
@@ -880,8 +879,8 @@
   @discardableResult
   public mutating func map(
     key: String,
-    _ closure: FlexBuffersWriterBuilder) -> UInt64
-  {
+    _ closure: FlexBuffersWriterBuilder
+  ) -> UInt64 {
     let start = startMap(key: key)
     closure(&self)
     return endMap(start: start)
diff --git a/swift/Sources/FlexBuffers/_InternalByteBuffer.swift b/swift/Sources/FlexBuffers/_InternalByteBuffer.swift
index f2ce467..42794f8 100644
--- a/swift/Sources/FlexBuffers/_InternalByteBuffer.swift
+++ b/swift/Sources/FlexBuffers/_InternalByteBuffer.swift
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#if canImport(Common)
-import Common
-#endif
-
 import Foundation
 
+#if canImport(Common)
+  import Common
+#endif
+
 /// `ByteBuffer` is the interface that stores the data for a `Flatbuffers` object
 /// it allows users to write and read data directly from memory thus the use of its
 /// functions should be used
@@ -124,7 +124,7 @@
   @usableFromInline
   mutating func ensureSpace(size: Int) {
     guard size &+ writerIndex > capacity else { return }
-    
+
     while capacity <= writerIndex &+ size {
       capacity = capacity << 1
     }
@@ -141,9 +141,12 @@
 
   @inline(__always)
   mutating func addPadding(bytes: Int) {
-    writerIndex = writerIndex &+ numericCast(padding(
-      bufSize: numericCast(writerIndex),
-      elementSize: numericCast(bytes)))
+    writerIndex =
+      writerIndex
+      &+ numericCast(
+        padding(
+          bufSize: numericCast(writerIndex),
+          elementSize: numericCast(bytes)))
     ensureSpace(size: writerIndex)
   }
 
@@ -171,30 +174,32 @@
   @inline(__always)
   func withUnsafeBytes<T>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
-    try body(UnsafeRawBufferPointer(
-      start: _storage.memory,
-      count: capacity))
+      -> T
+  ) rethrows -> T {
+    try body(
+      UnsafeRawBufferPointer(
+        start: _storage.memory,
+        count: capacity))
   }
 
   @discardableResult
   @inline(__always)
   func withUnsafeSlicedBytes<T>(
     _ body: (UnsafeRawBufferPointer) throws
-      -> T) rethrows -> T
-  {
-    try body(UnsafeRawBufferPointer(
-      start: _storage.memory,
-      count: writerIndex))
+      -> T
+  ) rethrows -> T {
+    try body(
+      UnsafeRawBufferPointer(
+        start: _storage.memory,
+        count: writerIndex))
   }
 
   @discardableResult
   @inline(__always)
   func withUnsafeRawPointer<T>(
     _ body: (UnsafeMutableRawPointer) throws
-      -> T) rethrows -> T
-  {
+      -> T
+  ) rethrows -> T {
     try body(_storage.memory)
   }
 
@@ -202,8 +207,8 @@
   @inline(__always)
   func readWithUnsafeRawPointer<T>(
     position: Int,
-    _ body: (UnsafeRawPointer) throws -> T) rethrows -> T
-  {
+    _ body: (UnsafeRawPointer) throws -> T
+  ) rethrows -> T {
     try body(_storage.memory.advanced(by: position))
   }
 }
diff --git a/tests/64bit/offset64_test.h b/tests/64bit/offset64_test.h
index b30985f..52dd5b2 100644
--- a/tests/64bit/offset64_test.h
+++ b/tests/64bit/offset64_test.h
@@ -17,4 +17,4 @@
 }  // namespace tests
 }  // namespace flatbuffers
 
-#endif // TESTS_64BIT_OFFSET64_TEST_H
+#endif  // TESTS_64BIT_OFFSET64_TEST_H
diff --git a/tests/KotlinTest.kt b/tests/KotlinTest.kt
index 9a8fe5f..b9ee393 100644
--- a/tests/KotlinTest.kt
+++ b/tests/KotlinTest.kt
@@ -14,23 +14,21 @@
  * limitations under the License.
  */
 
-import DictionaryLookup.*;
+import DictionaryLookup.*
 import MyGame.Example.*
-import optional_scalars.*
-import com.google.flatbuffers.ByteBufferUtil
-import com.google.flatbuffers.FlatBufferBuilder
 import NamespaceA.*
 import NamespaceA.NamespaceB.*
 import NamespaceA.NamespaceB.TableInNestedNS
+import com.google.flatbuffers.ByteBufferUtil
+import com.google.flatbuffers.Constants.SIZE_PREFIX_LENGTH
+import com.google.flatbuffers.FlatBufferBuilder
 import java.io.File
 import java.io.FileOutputStream
-import java.io.InputStream
 import java.io.RandomAccessFile
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
 import java.nio.channels.FileChannel
-
-import com.google.flatbuffers.Constants.SIZE_PREFIX_LENGTH
+import optional_scalars.*
 
 @kotlin.ExperimentalUnsignedTypes
 class KotlinTest {
@@ -39,584 +37,583 @@
     @JvmStatic
     fun main(args: Array<String>) {
 
-        // First, let's test reading a FlatBuffer generated by C++ code:
-        // This file was generated from monsterdata_test.json
+      // First, let's test reading a FlatBuffer generated by C++ code:
+      // This file was generated from monsterdata_test.json
 
-        val data = RandomAccessFile(File("monsterdata_test.mon"), "r").use {
-            val temp = ByteArray(it.length().toInt())
-            it.readFully(temp)
-            temp
+      val data =
+        RandomAccessFile(File("monsterdata_test.mon"), "r").use {
+          val temp = ByteArray(it.length().toInt())
+          it.readFully(temp)
+          temp
         }
 
-        // Now test it:
+      // Now test it:
 
-        val bb = ByteBuffer.wrap(data)
-        TestBuffer(bb)
+      val bb = ByteBuffer.wrap(data)
+      TestBuffer(bb)
 
-        // Second, let's create a FlatBuffer from scratch in Java, and test it also.
-        // We use an initial size of 1 to exercise the reallocation algorithm,
-        // normally a size larger than the typical FlatBuffer you generate would be
-        // better for performance.
-        val fbb = FlatBufferBuilder(1)
+      // Second, let's create a FlatBuffer from scratch in Java, and test it also.
+      // We use an initial size of 1 to exercise the reallocation algorithm,
+      // normally a size larger than the typical FlatBuffer you generate would be
+      // better for performance.
+      val fbb = FlatBufferBuilder(1)
 
-        TestBuilderBasics(fbb, true)
-        TestBuilderBasics(fbb, false)
+      TestBuilderBasics(fbb, true)
+      TestBuilderBasics(fbb, false)
 
-        TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer())
+      TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer())
 
-        TestNamespaceNesting()
+      TestNamespaceNesting()
 
-        TestNestedFlatBuffer()
+      TestNestedFlatBuffer()
 
-        TestCreateByteVector()
+      TestCreateByteVector()
 
-        TestCreateUninitializedVector()
+      TestCreateUninitializedVector()
 
-        TestByteBufferFactory()
+      TestByteBufferFactory()
 
-        TestSizedInputStream()
+      TestSizedInputStream()
 
-        TestVectorOfUnions()
+      TestVectorOfUnions()
 
-        TestSharedStringPool()
-        TestScalarOptional()
-        TestDictionaryLookup()
-        println("FlatBuffers test: completed successfully")
+      TestSharedStringPool()
+      TestScalarOptional()
+      TestDictionaryLookup()
+      println("FlatBuffers test: completed successfully")
     }
 
     fun TestDictionaryLookup() {
-        val fbb = FlatBufferBuilder(16)
-        val lfIndex = LongFloatEntry.createLongFloatEntry(fbb, 0, 99.0f)
-        val vectorEntriesIdx = LongFloatMap.createEntriesVector(fbb, intArrayOf(lfIndex))
-        val rootIdx = LongFloatMap.createLongFloatMap(fbb, vectorEntriesIdx)
+      val fbb = FlatBufferBuilder(16)
+      val lfIndex = LongFloatEntry.createLongFloatEntry(fbb, 0, 99.0f)
+      val vectorEntriesIdx = LongFloatMap.createEntriesVector(fbb, intArrayOf(lfIndex))
+      val rootIdx = LongFloatMap.createLongFloatMap(fbb, vectorEntriesIdx)
 
-        LongFloatMap.finishLongFloatMapBuffer(fbb, rootIdx)
-        val map = LongFloatMap.getRootAsLongFloatMap(fbb.dataBuffer())
-        assert(map.entriesLength == 1)
+      LongFloatMap.finishLongFloatMapBuffer(fbb, rootIdx)
+      val map = LongFloatMap.getRootAsLongFloatMap(fbb.dataBuffer())
+      assert(map.entriesLength == 1)
 
-        val e = map.entries(0)!!
-        assert(e.key == 0L)
-        assert(e.value == 99.0f)
+      val e = map.entries(0)!!
+      assert(e.key == 0L)
+      assert(e.value == 99.0f)
 
-        val e2 = map.entriesByKey(0)!!
-        assert(e2.key == 0L)
-        assert(e2.value == 99.0f)
+      val e2 = map.entriesByKey(0)!!
+      assert(e2.key == 0L)
+      assert(e2.value == 99.0f)
     }
 
     fun TestEnums() {
-        assert(Color.name(Color.Red.toInt()) == "Red")
-        assert(Color.name(Color.Blue.toInt()) == "Blue")
-        assert(Any_.name(Any_.NONE.toInt()) == "NONE")
-        assert(Any_.name(Any_.Monster.toInt()) == "Monster")
+      assert(Color.name(Color.Red.toInt()) == "Red")
+      assert(Color.name(Color.Blue.toInt()) == "Blue")
+      assert(Any_.name(Any_.NONE.toInt()) == "NONE")
+      assert(Any_.name(Any_.Monster.toInt()) == "Monster")
     }
 
     fun TestBuffer(bb: ByteBuffer) {
-        assert(Monster.MonsterBufferHasIdentifier(bb) == true)
+      assert(Monster.MonsterBufferHasIdentifier(bb) == true)
 
-        val monster = Monster.getRootAsMonster(bb)
+      val monster = Monster.getRootAsMonster(bb)
 
-        assert(monster.hp == 80.toShort())
-        assert(monster.mana == 150.toShort())  // default
+      assert(monster.hp == 80.toShort())
+      assert(monster.mana == 150.toShort()) // default
 
-        assert(monster.name == "MyMonster")
-        // monster.friendly() // can't access, deprecated
+      assert(monster.name == "MyMonster")
+      // monster.friendly() // can't access, deprecated
 
-        val pos = monster.pos!!
-        assert(pos.x == 1.0f)
-        assert(pos.y == 2.0f)
-        assert(pos.z == 3.0f)
-        assert(pos.test1 == 3.0)
-        // issue: int != byte
-        assert(pos.test2 == Color.Green)
-        val t = pos.test3!!
-        assert(t.a == 5.toShort())
-        assert(t.b == 6.toByte())
+      val pos = monster.pos!!
+      assert(pos.x == 1.0f)
+      assert(pos.y == 2.0f)
+      assert(pos.z == 3.0f)
+      assert(pos.test1 == 3.0)
+      // issue: int != byte
+      assert(pos.test2 == Color.Green)
+      val t = pos.test3!!
+      assert(t.a == 5.toShort())
+      assert(t.b == 6.toByte())
 
-        assert(monster.testType == Any_.Monster)
-        val monster2 = Monster()
-        assert(monster.test(monster2) != null == true)
-        assert(monster2.name == "Fred")
+      assert(monster.testType == Any_.Monster)
+      val monster2 = Monster()
+      assert(monster.test(monster2) != null == true)
+      assert(monster2.name == "Fred")
 
-        assert(monster.inventoryLength == 5)
-        var invsum = 0u
-        for (i in 0 until monster.inventoryLength)
-            invsum += monster.inventory(i)
-        assert(invsum == 10u)
+      assert(monster.inventoryLength == 5)
+      var invsum = 0u
+      for (i in 0 until monster.inventoryLength) invsum += monster.inventory(i)
+      assert(invsum == 10u)
 
-        // Alternative way of accessing a vector:
-        val ibb = monster.inventoryAsByteBuffer
-        invsum = 0u
-        while (ibb.position() < ibb.limit())
-            invsum += ibb.get().toUInt()
-        assert(invsum == 10u)
+      // Alternative way of accessing a vector:
+      val ibb = monster.inventoryAsByteBuffer
+      invsum = 0u
+      while (ibb.position() < ibb.limit()) invsum += ibb.get().toUInt()
+      assert(invsum == 10u)
 
+      val test_0 = monster.test4(0)!!
+      val test_1 = monster.test4(1)!!
+      assert(monster.test4Length == 2)
+      assert(test_0.a + test_0.b + test_1.a + test_1.b == 100)
 
-        val test_0 = monster.test4(0)!!
-        val test_1 = monster.test4(1)!!
-        assert(monster.test4Length == 2)
-        assert(test_0.a + test_0.b + test_1.a + test_1.b == 100)
+      assert(monster.testarrayofstringLength == 2)
+      assert(monster.testarrayofstring(0) == "test1")
+      assert(monster.testarrayofstring(1) == "test2")
 
-        assert(monster.testarrayofstringLength == 2)
-        assert(monster.testarrayofstring(0) == "test1")
-        assert(monster.testarrayofstring(1) == "test2")
-
-        assert(monster.testbool == true)
+      assert(monster.testbool == true)
     }
 
     // this method checks additional fields not present in the binary buffer read from file
     // these new tests are performed on top of the regular tests
     fun TestExtendedBuffer(bb: ByteBuffer) {
-        TestBuffer(bb)
+      TestBuffer(bb)
 
-        val monster = Monster.getRootAsMonster(bb)
+      val monster = Monster.getRootAsMonster(bb)
 
-        assert(monster.testhashu32Fnv1 == (Integer.MAX_VALUE + 1L).toUInt())
+      assert(monster.testhashu32Fnv1 == (Integer.MAX_VALUE + 1L).toUInt())
     }
 
     fun TestNamespaceNesting() {
-        // reference / manipulate these to verify compilation
-        val fbb = FlatBufferBuilder(1)
+      // reference / manipulate these to verify compilation
+      val fbb = FlatBufferBuilder(1)
 
-        TableInNestedNS.startTableInNestedNS(fbb)
-        TableInNestedNS.addFoo(fbb, 1234)
-        val nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb)
+      TableInNestedNS.startTableInNestedNS(fbb)
+      TableInNestedNS.addFoo(fbb, 1234)
+      val nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb)
 
-        TableInFirstNS.startTableInFirstNS(fbb)
-        TableInFirstNS.addFooTable(fbb, nestedTableOff)
+      TableInFirstNS.startTableInFirstNS(fbb)
+      TableInFirstNS.addFooTable(fbb, nestedTableOff)
     }
 
     fun TestNestedFlatBuffer() {
-        val nestedMonsterName = "NestedMonsterName"
-        val nestedMonsterHp: Short = 600
-        val nestedMonsterMana: Short = 1024
+      val nestedMonsterName = "NestedMonsterName"
+      val nestedMonsterHp: Short = 600
+      val nestedMonsterMana: Short = 1024
 
-        var fbb1: FlatBufferBuilder? = FlatBufferBuilder(16)
-        val str1 = fbb1!!.createString(nestedMonsterName)
-        Monster.startMonster(fbb1)
-        Monster.addName(fbb1, str1)
-        Monster.addHp(fbb1, nestedMonsterHp)
-        Monster.addMana(fbb1, nestedMonsterMana)
-        val monster1 = Monster.endMonster(fbb1)
-        Monster.finishMonsterBuffer(fbb1, monster1)
-        val fbb1Bytes = fbb1.sizedByteArray()
-        
-        val fbb2 = FlatBufferBuilder(16)
-        val str2 = fbb2.createString("My Monster")
-        val nestedBuffer = Monster.createTestnestedflatbufferVector(fbb2, fbb1Bytes.asUByteArray())
-        Monster.startMonster(fbb2)
-        Monster.addName(fbb2, str2)
-        Monster.addHp(fbb2, 50.toShort())
-        Monster.addMana(fbb2, 32.toShort())
-        Monster.addTestnestedflatbuffer(fbb2, nestedBuffer)
-        val monster = Monster.endMonster(fbb2)
-        Monster.finishMonsterBuffer(fbb2, monster)
+      var fbb1: FlatBufferBuilder? = FlatBufferBuilder(16)
+      val str1 = fbb1!!.createString(nestedMonsterName)
+      Monster.startMonster(fbb1)
+      Monster.addName(fbb1, str1)
+      Monster.addHp(fbb1, nestedMonsterHp)
+      Monster.addMana(fbb1, nestedMonsterMana)
+      val monster1 = Monster.endMonster(fbb1)
+      Monster.finishMonsterBuffer(fbb1, monster1)
+      val fbb1Bytes = fbb1.sizedByteArray()
 
-        // Now test the data extracted from the nested buffer
-        val mons = Monster.getRootAsMonster(fbb2.dataBuffer())
-        val nestedMonster = mons.testnestedflatbufferAsMonster!!
+      val fbb2 = FlatBufferBuilder(16)
+      val str2 = fbb2.createString("My Monster")
+      val nestedBuffer = Monster.createTestnestedflatbufferVector(fbb2, fbb1Bytes.asUByteArray())
+      Monster.startMonster(fbb2)
+      Monster.addName(fbb2, str2)
+      Monster.addHp(fbb2, 50.toShort())
+      Monster.addMana(fbb2, 32.toShort())
+      Monster.addTestnestedflatbuffer(fbb2, nestedBuffer)
+      val monster = Monster.endMonster(fbb2)
+      Monster.finishMonsterBuffer(fbb2, monster)
 
-        assert(nestedMonsterMana == nestedMonster.mana)
-        assert(nestedMonsterHp == nestedMonster.hp)
-        assert(nestedMonsterName == nestedMonster.name)
+      // Now test the data extracted from the nested buffer
+      val mons = Monster.getRootAsMonster(fbb2.dataBuffer())
+      val nestedMonster = mons.testnestedflatbufferAsMonster!!
+
+      assert(nestedMonsterMana == nestedMonster.mana)
+      assert(nestedMonsterHp == nestedMonster.hp)
+      assert(nestedMonsterName == nestedMonster.name)
     }
 
     fun TestCreateByteVector() {
-        val fbb = FlatBufferBuilder(16)
-        val str = fbb.createString("MyMonster")
-        val inventory = byteArrayOf(0, 1, 2, 3, 4)
-        val vec = fbb.createByteVector(inventory)
-        Monster.startMonster(fbb)
-        Monster.addInventory(fbb, vec)
-        Monster.addName(fbb, str)
-        val monster1 = Monster.endMonster(fbb)
-        Monster.finishMonsterBuffer(fbb, monster1)
-        val monsterObject = Monster.getRootAsMonster(fbb.dataBuffer())
+      val fbb = FlatBufferBuilder(16)
+      val str = fbb.createString("MyMonster")
+      val inventory = byteArrayOf(0, 1, 2, 3, 4)
+      val vec = fbb.createByteVector(inventory)
+      Monster.startMonster(fbb)
+      Monster.addInventory(fbb, vec)
+      Monster.addName(fbb, str)
+      val monster1 = Monster.endMonster(fbb)
+      Monster.finishMonsterBuffer(fbb, monster1)
+      val monsterObject = Monster.getRootAsMonster(fbb.dataBuffer())
 
-        assert(monsterObject.inventory(1) == inventory[1].toUByte())
-        assert(monsterObject.inventoryLength == inventory.size)
-        assert(ByteBuffer.wrap(inventory) == monsterObject.inventoryAsByteBuffer)
+      assert(monsterObject.inventory(1) == inventory[1].toUByte())
+      assert(monsterObject.inventoryLength == inventory.size)
+      assert(ByteBuffer.wrap(inventory) == monsterObject.inventoryAsByteBuffer)
     }
 
     fun TestCreateUninitializedVector() {
-        val fbb = FlatBufferBuilder(16)
-        val str = fbb.createString("MyMonster")
-        val inventory = byteArrayOf(0, 1, 2, 3, 4)
-        val bb = fbb.createUnintializedVector(1, inventory.size, 1)
-        for (i in inventory) {
-            bb.put(i)
-        }
-        val vec = fbb.endVector()
-        Monster.startMonster(fbb)
-        Monster.addInventory(fbb, vec)
-        Monster.addName(fbb, str)
-        val monster1 = Monster.endMonster(fbb)
-        Monster.finishMonsterBuffer(fbb, monster1)
-        val monsterObject = Monster.getRootAsMonster(fbb.dataBuffer())
+      val fbb = FlatBufferBuilder(16)
+      val str = fbb.createString("MyMonster")
+      val inventory = byteArrayOf(0, 1, 2, 3, 4)
+      val bb = fbb.createUnintializedVector(1, inventory.size, 1)
+      for (i in inventory) {
+        bb.put(i)
+      }
+      val vec = fbb.endVector()
+      Monster.startMonster(fbb)
+      Monster.addInventory(fbb, vec)
+      Monster.addName(fbb, str)
+      val monster1 = Monster.endMonster(fbb)
+      Monster.finishMonsterBuffer(fbb, monster1)
+      val monsterObject = Monster.getRootAsMonster(fbb.dataBuffer())
 
-        assert(monsterObject.inventory(1) == inventory[1].toUByte())
-        assert(monsterObject.inventoryLength == inventory.size)
-        assert(ByteBuffer.wrap(inventory) == monsterObject.inventoryAsByteBuffer)
+      assert(monsterObject.inventory(1) == inventory[1].toUByte())
+      assert(monsterObject.inventoryLength == inventory.size)
+      assert(ByteBuffer.wrap(inventory) == monsterObject.inventoryAsByteBuffer)
     }
 
     fun TestByteBufferFactory() {
-        class MappedByteBufferFactory : FlatBufferBuilder.ByteBufferFactory() {
-            override fun newByteBuffer(capacity: Int): ByteBuffer? {
-                var bb: ByteBuffer?
-                try {
-                    bb = RandomAccessFile("javatest.bin", "rw").channel.map(
-                        FileChannel.MapMode.READ_WRITE,
-                        0,
-                        capacity.toLong()
-                    ).order(ByteOrder.LITTLE_ENDIAN)
-                } catch (e: Throwable) {
-                    println("FlatBuffers test: couldn't map ByteBuffer to a file")
-                    bb = null
-                }
+      class MappedByteBufferFactory : FlatBufferBuilder.ByteBufferFactory() {
+        override fun newByteBuffer(capacity: Int): ByteBuffer? {
+          var bb: ByteBuffer?
+          try {
+            bb =
+              RandomAccessFile("javatest.bin", "rw")
+                .channel
+                .map(FileChannel.MapMode.READ_WRITE, 0, capacity.toLong())
+                .order(ByteOrder.LITTLE_ENDIAN)
+          } catch (e: Throwable) {
+            println("FlatBuffers test: couldn't map ByteBuffer to a file")
+            bb = null
+          }
 
-                return bb
-            }
+          return bb
         }
+      }
 
-        val fbb = FlatBufferBuilder(1, MappedByteBufferFactory())
+      val fbb = FlatBufferBuilder(1, MappedByteBufferFactory())
 
-        TestBuilderBasics(fbb, false)
+      TestBuilderBasics(fbb, false)
     }
 
     fun TestSizedInputStream() {
-        // Test on default FlatBufferBuilder that uses HeapByteBuffer
-        val fbb = FlatBufferBuilder(1)
+      // Test on default FlatBufferBuilder that uses HeapByteBuffer
+      val fbb = FlatBufferBuilder(1)
 
-        TestBuilderBasics(fbb, false)
+      TestBuilderBasics(fbb, false)
 
-        val `in` = fbb.sizedInputStream()
-        val array = fbb.sizedByteArray()
-        var count = 0
-        var currentVal = 0
+      val `in` = fbb.sizedInputStream()
+      val array = fbb.sizedByteArray()
+      var count = 0
+      var currentVal = 0
 
-        while (currentVal != -1 && count < array.size) {
-            try {
-                currentVal = `in`.read()
-            } catch (e: java.io.IOException) {
-                println("FlatBuffers test: couldn't read from InputStream")
-                return
-            }
-
-            assert(currentVal.toByte() == array[count])
-            count++
+      while (currentVal != -1 && count < array.size) {
+        try {
+          currentVal = `in`.read()
+        } catch (e: java.io.IOException) {
+          println("FlatBuffers test: couldn't read from InputStream")
+          return
         }
-        assert(count == array.size)
+
+        assert(currentVal.toByte() == array[count])
+        count++
+      }
+      assert(count == array.size)
     }
 
     fun TestBuilderBasics(fbb: FlatBufferBuilder, sizePrefix: Boolean) {
-        val names = intArrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
-        val off = IntArray(3)
-        Monster.startMonster(fbb)
-        Monster.addName(fbb, names[0])
-        off[0] = Monster.endMonster(fbb)
-        Monster.startMonster(fbb)
-        Monster.addName(fbb, names[1])
-        off[1] = Monster.endMonster(fbb)
-        Monster.startMonster(fbb)
-        Monster.addName(fbb, names[2])
-        off[2] = Monster.endMonster(fbb)
-        val sortMons = fbb.createSortedVectorOfTables(Monster(), off)
+      val names =
+        intArrayOf(fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma"))
+      val off = IntArray(3)
+      Monster.startMonster(fbb)
+      Monster.addName(fbb, names[0])
+      off[0] = Monster.endMonster(fbb)
+      Monster.startMonster(fbb)
+      Monster.addName(fbb, names[1])
+      off[1] = Monster.endMonster(fbb)
+      Monster.startMonster(fbb)
+      Monster.addName(fbb, names[2])
+      off[2] = Monster.endMonster(fbb)
+      val sortMons = fbb.createSortedVectorOfTables(Monster(), off)
 
-        // We set up the same values as monsterdata.json:
+      // We set up the same values as monsterdata.json:
 
-        val str = fbb.createString("MyMonster")
+      val str = fbb.createString("MyMonster")
 
-        val inv = Monster.createInventoryVector(fbb, byteArrayOf(0, 1, 2, 3, 4).asUByteArray())
+      val inv = Monster.createInventoryVector(fbb, byteArrayOf(0, 1, 2, 3, 4).asUByteArray())
 
-        val fred = fbb.createString("Fred")
-        Monster.startMonster(fbb)
-        Monster.addName(fbb, fred)
-        val mon2 = Monster.endMonster(fbb)
+      val fred = fbb.createString("Fred")
+      Monster.startMonster(fbb)
+      Monster.addName(fbb, fred)
+      val mon2 = Monster.endMonster(fbb)
 
-        Monster.startTest4Vector(fbb, 2)
-        Test.createTest(fbb, 10.toShort(), 20.toByte())
-        Test.createTest(fbb, 30.toShort(), 40.toByte())
-        val test4 = fbb.endVector()
+      Monster.startTest4Vector(fbb, 2)
+      Test.createTest(fbb, 10.toShort(), 20.toByte())
+      Test.createTest(fbb, 30.toShort(), 40.toByte())
+      val test4 = fbb.endVector()
 
-        val testArrayOfString =
-            Monster.createTestarrayofstringVector(fbb, intArrayOf(fbb.createString("test1"), fbb.createString("test2")))
-
-        Monster.startMonster(fbb)
-        Monster.addPos(
-            fbb, Vec3.createVec3(
-                fbb, 1.0f, 2.0f, 3.0f, 3.0,
-                Color.Green, 5.toShort(), 6.toByte()
-            )
+      val testArrayOfString =
+        Monster.createTestarrayofstringVector(
+          fbb,
+          intArrayOf(fbb.createString("test1"), fbb.createString("test2")),
         )
-        Monster.addHp(fbb, 80.toShort())
-        Monster.addName(fbb, str)
-        Monster.addInventory(fbb, inv)
-        Monster.addTestType(fbb, Any_.Monster)
-        Monster.addTest(fbb, mon2)
-        Monster.addTest4(fbb, test4)
-        Monster.addTestarrayofstring(fbb, testArrayOfString)
-        Monster.addTestbool(fbb, true)
-        Monster.addTesthashu32Fnv1(fbb, (Integer.MAX_VALUE + 1L).toUInt())
-        Monster.addTestarrayoftables(fbb, sortMons)
-        val mon = Monster.endMonster(fbb)
 
-        if (sizePrefix) {
-            Monster.finishSizePrefixedMonsterBuffer(fbb, mon)
-        } else {
-            Monster.finishMonsterBuffer(fbb, mon)
-        }
+      Monster.startMonster(fbb)
+      Monster.addPos(
+        fbb,
+        Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, Color.Green, 5.toShort(), 6.toByte()),
+      )
+      Monster.addHp(fbb, 80.toShort())
+      Monster.addName(fbb, str)
+      Monster.addInventory(fbb, inv)
+      Monster.addTestType(fbb, Any_.Monster)
+      Monster.addTest(fbb, mon2)
+      Monster.addTest4(fbb, test4)
+      Monster.addTestarrayofstring(fbb, testArrayOfString)
+      Monster.addTestbool(fbb, true)
+      Monster.addTesthashu32Fnv1(fbb, (Integer.MAX_VALUE + 1L).toUInt())
+      Monster.addTestarrayoftables(fbb, sortMons)
+      val mon = Monster.endMonster(fbb)
 
-        // Write the result to a file for debugging purposes:
-        // Note that the binaries are not necessarily identical, since the JSON
-        // parser may serialize in a slightly different order than the above
-        // Java code. They are functionally equivalent though.
+      if (sizePrefix) {
+        Monster.finishSizePrefixedMonsterBuffer(fbb, mon)
+      } else {
+        Monster.finishMonsterBuffer(fbb, mon)
+      }
 
-        try {
-            val filename = "monsterdata_java_wire" + (if (sizePrefix) "_sp" else "") + ".mon"
-            val fc = FileOutputStream(filename).channel
-            fc.write(fbb.dataBuffer().duplicate())
-            fc.close()
-        } catch (e: java.io.IOException) {
-            println("FlatBuffers test: couldn't write file")
-            return
-        }
+      // Write the result to a file for debugging purposes:
+      // Note that the binaries are not necessarily identical, since the JSON
+      // parser may serialize in a slightly different order than the above
+      // Java code. They are functionally equivalent though.
 
-        // Test it:
-        var dataBuffer = fbb.dataBuffer()
-        if (sizePrefix) {
-            assert(
-                ByteBufferUtil.getSizePrefix(dataBuffer) + SIZE_PREFIX_LENGTH ==
-                dataBuffer.remaining()
-            )
-            dataBuffer = ByteBufferUtil.removeSizePrefix(dataBuffer)
-        }
-        TestExtendedBuffer(dataBuffer)
+      try {
+        val filename = "monsterdata_java_wire" + (if (sizePrefix) "_sp" else "") + ".mon"
+        val fc = FileOutputStream(filename).channel
+        fc.write(fbb.dataBuffer().duplicate())
+        fc.close()
+      } catch (e: java.io.IOException) {
+        println("FlatBuffers test: couldn't write file")
+        return
+      }
 
-        // Make sure it also works with read only ByteBuffers. This is slower,
-        // since creating strings incurs an additional copy
-        // (see Table.__string).
-        TestExtendedBuffer(dataBuffer.asReadOnlyBuffer())
+      // Test it:
+      var dataBuffer = fbb.dataBuffer()
+      if (sizePrefix) {
+        assert(
+          ByteBufferUtil.getSizePrefix(dataBuffer) + SIZE_PREFIX_LENGTH == dataBuffer.remaining()
+        )
+        dataBuffer = ByteBufferUtil.removeSizePrefix(dataBuffer)
+      }
+      TestExtendedBuffer(dataBuffer)
 
-        TestEnums()
+      // Make sure it also works with read only ByteBuffers. This is slower,
+      // since creating strings incurs an additional copy
+      // (see Table.__string).
+      TestExtendedBuffer(dataBuffer.asReadOnlyBuffer())
 
-        //Attempt to mutate Monster fields and check whether the buffer has been mutated properly
-        // revert to original values after testing
-        val monster = Monster.getRootAsMonster(dataBuffer)
+      TestEnums()
 
-        // mana is optional and does not exist in the buffer so the mutation should fail
-        // the mana field should retain its default value
-        assert(monster.mutateMana(10.toShort()) == false)
-        assert(monster.mana == 150.toShort())
+      // Attempt to mutate Monster fields and check whether the buffer has been mutated properly
+      // revert to original values after testing
+      val monster = Monster.getRootAsMonster(dataBuffer)
 
-        // Accessing a vector of sorted by the key tables
-        assert(monster.testarrayoftables(0)!!.name == "Barney")
-        assert(monster.testarrayoftables(1)!!.name == "Frodo")
-        assert(monster.testarrayoftables(2)!!.name == "Wilma")
+      // mana is optional and does not exist in the buffer so the mutation should fail
+      // the mana field should retain its default value
+      assert(monster.mutateMana(10.toShort()) == false)
+      assert(monster.mana == 150.toShort())
 
-        // Example of searching for a table by the key
-        assert(monster.testarrayoftablesByKey("Frodo")!!.name == "Frodo")
-        assert(monster.testarrayoftablesByKey("Barney")!!.name == "Barney")
-        assert(monster.testarrayoftablesByKey("Wilma")!!.name == "Wilma")
+      // Accessing a vector of sorted by the key tables
+      assert(monster.testarrayoftables(0)!!.name == "Barney")
+      assert(monster.testarrayoftables(1)!!.name == "Frodo")
+      assert(monster.testarrayoftables(2)!!.name == "Wilma")
 
-        // testType is an existing field and mutating it should succeed
-        assert(monster.testType == Any_.Monster)
-        assert(monster.mutateTestType(Any_.NONE) == true)
-        assert(monster.testType == Any_.NONE)
-        assert(monster.mutateTestType(Any_.Monster) == true)
-        assert(monster.testType == Any_.Monster)
+      // Example of searching for a table by the key
+      assert(monster.testarrayoftablesByKey("Frodo")!!.name == "Frodo")
+      assert(monster.testarrayoftablesByKey("Barney")!!.name == "Barney")
+      assert(monster.testarrayoftablesByKey("Wilma")!!.name == "Wilma")
 
-        //mutate the inventory vector
-        assert(monster.mutateInventory(0, 1u) == true)
-        assert(monster.mutateInventory(1, 2u) == true)
-        assert(monster.mutateInventory(2, 3u) == true)
-        assert(monster.mutateInventory(3, 4u) == true)
-        assert(monster.mutateInventory(4, 5u) == true)
+      // testType is an existing field and mutating it should succeed
+      assert(monster.testType == Any_.Monster)
+      assert(monster.mutateTestType(Any_.NONE) == true)
+      assert(monster.testType == Any_.NONE)
+      assert(monster.mutateTestType(Any_.Monster) == true)
+      assert(monster.testType == Any_.Monster)
 
-        for (i in 0 until monster.inventoryLength) {
-            assert(monster.inventory(i) == (i.toUByte() + 1u).toUByte())
-        }
+      // mutate the inventory vector
+      assert(monster.mutateInventory(0, 1u) == true)
+      assert(monster.mutateInventory(1, 2u) == true)
+      assert(monster.mutateInventory(2, 3u) == true)
+      assert(monster.mutateInventory(3, 4u) == true)
+      assert(monster.mutateInventory(4, 5u) == true)
 
-        //reverse mutation
-        assert(monster.mutateInventory(0, 0u) == true)
-        assert(monster.mutateInventory(1, 1u) == true)
-        assert(monster.mutateInventory(2, 2u) == true)
-        assert(monster.mutateInventory(3, 3u) == true)
-        assert(monster.mutateInventory(4, 4u) == true)
+      for (i in 0 until monster.inventoryLength) {
+        assert(monster.inventory(i) == (i.toUByte() + 1u).toUByte())
+      }
 
-        // get a struct field and edit one of its fields
-        val pos = monster.pos!!
-        assert(pos.x == 1.0f)
-        pos.mutateX(55.0f)
-        assert(pos.x == 55.0f)
-        pos.mutateX(1.0f)
-        assert(pos.x == 1.0f)
+      // reverse mutation
+      assert(monster.mutateInventory(0, 0u) == true)
+      assert(monster.mutateInventory(1, 1u) == true)
+      assert(monster.mutateInventory(2, 2u) == true)
+      assert(monster.mutateInventory(3, 3u) == true)
+      assert(monster.mutateInventory(4, 4u) == true)
+
+      // get a struct field and edit one of its fields
+      val pos = monster.pos!!
+      assert(pos.x == 1.0f)
+      pos.mutateX(55.0f)
+      assert(pos.x == 55.0f)
+      pos.mutateX(1.0f)
+      assert(pos.x == 1.0f)
     }
 
     fun TestVectorOfUnions() {
-        val fbb = FlatBufferBuilder()
+      val fbb = FlatBufferBuilder()
 
-        val swordAttackDamage = 1
+      val swordAttackDamage = 1
 
-        val characterVector = intArrayOf(Attacker.createAttacker(fbb, swordAttackDamage))
+      val characterVector = intArrayOf(Attacker.createAttacker(fbb, swordAttackDamage))
 
-        val characterTypeVector = ubyteArrayOf(Character_.MuLan)
+      val characterTypeVector = ubyteArrayOf(Character_.MuLan)
 
-        Movie.finishMovieBuffer(
-            fbb,
-            Movie.createMovie(
-                fbb,
-                0u,
-                0,
-                Movie.createCharactersTypeVector(fbb, characterTypeVector),
-                Movie.createCharactersVector(fbb, characterVector)
-            )
-        )
+      Movie.finishMovieBuffer(
+        fbb,
+        Movie.createMovie(
+          fbb,
+          0u,
+          0,
+          Movie.createCharactersTypeVector(fbb, characterTypeVector),
+          Movie.createCharactersVector(fbb, characterVector),
+        ),
+      )
 
-        val movie = Movie.getRootAsMovie(fbb.dataBuffer())
+      val movie = Movie.getRootAsMovie(fbb.dataBuffer())
 
-        assert(movie.charactersTypeLength == characterTypeVector.size)
-        assert(movie.charactersLength == characterVector.size)
+      assert(movie.charactersTypeLength == characterTypeVector.size)
+      assert(movie.charactersLength == characterVector.size)
 
-        assert(movie.charactersType(0) == characterTypeVector[0])
+      assert(movie.charactersType(0) == characterTypeVector[0])
 
-        assert((movie.characters(Attacker(), 0) as Attacker).swordAttackDamage == swordAttackDamage)
+      assert((movie.characters(Attacker(), 0) as Attacker).swordAttackDamage == swordAttackDamage)
     }
 
     fun TestSharedStringPool() {
-        val fb = FlatBufferBuilder(1);
-        val testString = "My string";
-        val offset = fb.createSharedString(testString);
-        for (i in 0..10) {
-            assert(offset == fb.createSharedString(testString));
-        }
+      val fb = FlatBufferBuilder(1)
+      val testString = "My string"
+      val offset = fb.createSharedString(testString)
+      for (i in 0..10) {
+        assert(offset == fb.createSharedString(testString))
+      }
     }
 
     fun TestScalarOptional() {
-        val fbb = FlatBufferBuilder(1)
-        ScalarStuff.startScalarStuff(fbb)
-        var pos = ScalarStuff.endScalarStuff(fbb)
-        fbb.finish(pos)
+      val fbb = FlatBufferBuilder(1)
+      ScalarStuff.startScalarStuff(fbb)
+      var pos = ScalarStuff.endScalarStuff(fbb)
+      fbb.finish(pos)
 
-        var scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer())
+      var scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer())
 
-        assert(scalarStuff.justI8  == 0.toByte())
-        assert(scalarStuff.maybeI8 == null)
-        assert(scalarStuff.defaultI8 == 42.toByte())
-        assert(scalarStuff.justU8 == 0.toUByte())
-        assert(scalarStuff.maybeU8 == null)
-        assert(scalarStuff.defaultU8 == 42.toUByte())
-        assert(scalarStuff.justI16 == 0.toShort())
-        assert(scalarStuff.maybeI16 == null)
-        assert(scalarStuff.defaultI16 == 42.toShort())
-        assert(scalarStuff.justU16 == 0.toUShort())
-        assert(scalarStuff.maybeU16 == null)
-        assert(scalarStuff.defaultU16 == 42.toUShort())
-        assert(scalarStuff.justI32 == 0)
-        assert(scalarStuff.maybeI32 == null)
-        assert(scalarStuff.defaultI32 == 42)
-        assert(scalarStuff.justU32 == 0.toUInt())
-        assert(scalarStuff.maybeU32 == null)
-        assert(scalarStuff.defaultU32 == 42U)
-        assert(scalarStuff.justI64 == 0L)
-        assert(scalarStuff.maybeI64 == null)
-        assert(scalarStuff.defaultI64 == 42L)
-        assert(scalarStuff.justU64 == 0UL)
-        assert(scalarStuff.maybeU64 == null)
-        assert(scalarStuff.defaultU64 == 42UL)
-        assert(scalarStuff.justF32 == 0.0f)
-        assert(scalarStuff.maybeF32 == null)
-        assert(scalarStuff.defaultF32 == 42.0f)
-        assert(scalarStuff.justF64 == 0.0)
-        assert(scalarStuff.maybeF64 == null)
-        assert(scalarStuff.defaultF64 == 42.0)
-        assert(scalarStuff.justBool == false)
-        assert(scalarStuff.maybeBool == null)
-        assert(scalarStuff.defaultBool == true)
-        assert(scalarStuff.justEnum == OptionalByte.None)
-        assert(scalarStuff.maybeEnum == null)
-        assert(scalarStuff.defaultEnum == OptionalByte.One)
+      assert(scalarStuff.justI8 == 0.toByte())
+      assert(scalarStuff.maybeI8 == null)
+      assert(scalarStuff.defaultI8 == 42.toByte())
+      assert(scalarStuff.justU8 == 0.toUByte())
+      assert(scalarStuff.maybeU8 == null)
+      assert(scalarStuff.defaultU8 == 42.toUByte())
+      assert(scalarStuff.justI16 == 0.toShort())
+      assert(scalarStuff.maybeI16 == null)
+      assert(scalarStuff.defaultI16 == 42.toShort())
+      assert(scalarStuff.justU16 == 0.toUShort())
+      assert(scalarStuff.maybeU16 == null)
+      assert(scalarStuff.defaultU16 == 42.toUShort())
+      assert(scalarStuff.justI32 == 0)
+      assert(scalarStuff.maybeI32 == null)
+      assert(scalarStuff.defaultI32 == 42)
+      assert(scalarStuff.justU32 == 0.toUInt())
+      assert(scalarStuff.maybeU32 == null)
+      assert(scalarStuff.defaultU32 == 42U)
+      assert(scalarStuff.justI64 == 0L)
+      assert(scalarStuff.maybeI64 == null)
+      assert(scalarStuff.defaultI64 == 42L)
+      assert(scalarStuff.justU64 == 0UL)
+      assert(scalarStuff.maybeU64 == null)
+      assert(scalarStuff.defaultU64 == 42UL)
+      assert(scalarStuff.justF32 == 0.0f)
+      assert(scalarStuff.maybeF32 == null)
+      assert(scalarStuff.defaultF32 == 42.0f)
+      assert(scalarStuff.justF64 == 0.0)
+      assert(scalarStuff.maybeF64 == null)
+      assert(scalarStuff.defaultF64 == 42.0)
+      assert(scalarStuff.justBool == false)
+      assert(scalarStuff.maybeBool == null)
+      assert(scalarStuff.defaultBool == true)
+      assert(scalarStuff.justEnum == OptionalByte.None)
+      assert(scalarStuff.maybeEnum == null)
+      assert(scalarStuff.defaultEnum == OptionalByte.One)
 
-        fbb.clear()
- 
-        ScalarStuff.startScalarStuff(fbb)
-        ScalarStuff.addJustI8(fbb, 5.toByte())
-        ScalarStuff.addMaybeI8(fbb, 5.toByte())
-        ScalarStuff.addDefaultI8(fbb, 5.toByte())
-        ScalarStuff.addJustU8(fbb, 6.toUByte())
-        ScalarStuff.addMaybeU8(fbb, 6.toUByte())
-        ScalarStuff.addDefaultU8(fbb, 6.toUByte())
-        ScalarStuff.addJustI16(fbb, 7.toShort())
-        ScalarStuff.addMaybeI16(fbb, 7.toShort())
-        ScalarStuff.addDefaultI16(fbb, 7.toShort())
-        ScalarStuff.addJustU16(fbb, 8.toUShort())
-        ScalarStuff.addMaybeU16(fbb, 8.toUShort())
-        ScalarStuff.addDefaultU16(fbb, 8.toUShort())
-        ScalarStuff.addJustI32(fbb, 9)
-        ScalarStuff.addMaybeI32(fbb, 9)
-        ScalarStuff.addDefaultI32(fbb, 9)
-        ScalarStuff.addJustU32(fbb, 10.toUInt())
-        ScalarStuff.addMaybeU32(fbb, 10.toUInt())
-        ScalarStuff.addDefaultU32(fbb, 10.toUInt())
-        ScalarStuff.addJustI64(fbb, 11L)
-        ScalarStuff.addMaybeI64(fbb, 11L)
-        ScalarStuff.addDefaultI64(fbb, 11L)
-        ScalarStuff.addJustU64(fbb, 12UL)
-        ScalarStuff.addMaybeU64(fbb, 12UL)
-        ScalarStuff.addDefaultU64(fbb, 12UL)
-        ScalarStuff.addJustF32(fbb, 13.0f)
-        ScalarStuff.addMaybeF32(fbb, 13.0f)
-        ScalarStuff.addDefaultF32(fbb, 13.0f)
-        ScalarStuff.addJustF64(fbb, 14.0)
-        ScalarStuff.addMaybeF64(fbb, 14.0)
-        ScalarStuff.addDefaultF64(fbb, 14.0)
-        ScalarStuff.addJustBool(fbb, true)
-        ScalarStuff.addMaybeBool(fbb, true)
-        ScalarStuff.addDefaultBool(fbb, true)
-        ScalarStuff.addJustEnum(fbb, OptionalByte.Two)
-        ScalarStuff.addMaybeEnum(fbb, OptionalByte.Two)
-        ScalarStuff.addDefaultEnum(fbb, OptionalByte.Two)
+      fbb.clear()
 
-        pos = ScalarStuff.endScalarStuff(fbb)
+      ScalarStuff.startScalarStuff(fbb)
+      ScalarStuff.addJustI8(fbb, 5.toByte())
+      ScalarStuff.addMaybeI8(fbb, 5.toByte())
+      ScalarStuff.addDefaultI8(fbb, 5.toByte())
+      ScalarStuff.addJustU8(fbb, 6.toUByte())
+      ScalarStuff.addMaybeU8(fbb, 6.toUByte())
+      ScalarStuff.addDefaultU8(fbb, 6.toUByte())
+      ScalarStuff.addJustI16(fbb, 7.toShort())
+      ScalarStuff.addMaybeI16(fbb, 7.toShort())
+      ScalarStuff.addDefaultI16(fbb, 7.toShort())
+      ScalarStuff.addJustU16(fbb, 8.toUShort())
+      ScalarStuff.addMaybeU16(fbb, 8.toUShort())
+      ScalarStuff.addDefaultU16(fbb, 8.toUShort())
+      ScalarStuff.addJustI32(fbb, 9)
+      ScalarStuff.addMaybeI32(fbb, 9)
+      ScalarStuff.addDefaultI32(fbb, 9)
+      ScalarStuff.addJustU32(fbb, 10.toUInt())
+      ScalarStuff.addMaybeU32(fbb, 10.toUInt())
+      ScalarStuff.addDefaultU32(fbb, 10.toUInt())
+      ScalarStuff.addJustI64(fbb, 11L)
+      ScalarStuff.addMaybeI64(fbb, 11L)
+      ScalarStuff.addDefaultI64(fbb, 11L)
+      ScalarStuff.addJustU64(fbb, 12UL)
+      ScalarStuff.addMaybeU64(fbb, 12UL)
+      ScalarStuff.addDefaultU64(fbb, 12UL)
+      ScalarStuff.addJustF32(fbb, 13.0f)
+      ScalarStuff.addMaybeF32(fbb, 13.0f)
+      ScalarStuff.addDefaultF32(fbb, 13.0f)
+      ScalarStuff.addJustF64(fbb, 14.0)
+      ScalarStuff.addMaybeF64(fbb, 14.0)
+      ScalarStuff.addDefaultF64(fbb, 14.0)
+      ScalarStuff.addJustBool(fbb, true)
+      ScalarStuff.addMaybeBool(fbb, true)
+      ScalarStuff.addDefaultBool(fbb, true)
+      ScalarStuff.addJustEnum(fbb, OptionalByte.Two)
+      ScalarStuff.addMaybeEnum(fbb, OptionalByte.Two)
+      ScalarStuff.addDefaultEnum(fbb, OptionalByte.Two)
 
-        fbb.finish(pos)
+      pos = ScalarStuff.endScalarStuff(fbb)
 
-        scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer())
+      fbb.finish(pos)
 
-        assert(scalarStuff.justI8  == 5.toByte())
-        assert(scalarStuff.maybeI8 == 5.toByte())
-        assert(scalarStuff.defaultI8 == 5.toByte())
-        assert(scalarStuff.justU8 == 6.toUByte())
-        assert(scalarStuff.maybeU8 == 6.toUByte())
-        assert(scalarStuff.defaultU8 == 6.toUByte())
-        assert(scalarStuff.justI16 == 7.toShort())
-        assert(scalarStuff.maybeI16 == 7.toShort())
-        assert(scalarStuff.defaultI16 == 7.toShort())
-        assert(scalarStuff.justU16 == 8.toUShort())
-        assert(scalarStuff.maybeU16 == 8.toUShort())
-        assert(scalarStuff.defaultU16 == 8.toUShort())
-        assert(scalarStuff.justI32 == 9)
-        assert(scalarStuff.maybeI32 == 9)
-        assert(scalarStuff.defaultI32 == 9)
-        assert(scalarStuff.justU32 == 10u)
-        assert(scalarStuff.maybeU32 == 10u)
-        assert(scalarStuff.defaultU32 == 10u)
-        assert(scalarStuff.justI64 == 11L)
-        assert(scalarStuff.maybeI64 == 11L)
-        assert(scalarStuff.defaultI64 == 11L)
-        assert(scalarStuff.justU64 == 12UL)
-        assert(scalarStuff.maybeU64 == 12UL)
-        assert(scalarStuff.defaultU64 == 12UL)
-        assert(scalarStuff.justF32 == 13.0f)
-        assert(scalarStuff.maybeF32 == 13.0f)
-        assert(scalarStuff.defaultF32 == 13.0f)
-        assert(scalarStuff.justF64 == 14.0)
-        assert(scalarStuff.maybeF64 == 14.0)
-        assert(scalarStuff.defaultF64 == 14.0)
-        assert(scalarStuff.justBool == true)
-        assert(scalarStuff.maybeBool == true)
-        assert(scalarStuff.defaultBool == true)
-        assert(scalarStuff.justEnum == OptionalByte.Two)
-        assert(scalarStuff.maybeEnum == OptionalByte.Two)
-        assert(scalarStuff.defaultEnum == OptionalByte.Two)
+      scalarStuff = ScalarStuff.getRootAsScalarStuff(fbb.dataBuffer())
+
+      assert(scalarStuff.justI8 == 5.toByte())
+      assert(scalarStuff.maybeI8 == 5.toByte())
+      assert(scalarStuff.defaultI8 == 5.toByte())
+      assert(scalarStuff.justU8 == 6.toUByte())
+      assert(scalarStuff.maybeU8 == 6.toUByte())
+      assert(scalarStuff.defaultU8 == 6.toUByte())
+      assert(scalarStuff.justI16 == 7.toShort())
+      assert(scalarStuff.maybeI16 == 7.toShort())
+      assert(scalarStuff.defaultI16 == 7.toShort())
+      assert(scalarStuff.justU16 == 8.toUShort())
+      assert(scalarStuff.maybeU16 == 8.toUShort())
+      assert(scalarStuff.defaultU16 == 8.toUShort())
+      assert(scalarStuff.justI32 == 9)
+      assert(scalarStuff.maybeI32 == 9)
+      assert(scalarStuff.defaultI32 == 9)
+      assert(scalarStuff.justU32 == 10u)
+      assert(scalarStuff.maybeU32 == 10u)
+      assert(scalarStuff.defaultU32 == 10u)
+      assert(scalarStuff.justI64 == 11L)
+      assert(scalarStuff.maybeI64 == 11L)
+      assert(scalarStuff.defaultI64 == 11L)
+      assert(scalarStuff.justU64 == 12UL)
+      assert(scalarStuff.maybeU64 == 12UL)
+      assert(scalarStuff.defaultU64 == 12UL)
+      assert(scalarStuff.justF32 == 13.0f)
+      assert(scalarStuff.maybeF32 == 13.0f)
+      assert(scalarStuff.defaultF32 == 13.0f)
+      assert(scalarStuff.justF64 == 14.0)
+      assert(scalarStuff.maybeF64 == 14.0)
+      assert(scalarStuff.defaultF64 == 14.0)
+      assert(scalarStuff.justBool == true)
+      assert(scalarStuff.maybeBool == true)
+      assert(scalarStuff.defaultBool == true)
+      assert(scalarStuff.justEnum == OptionalByte.Two)
+      assert(scalarStuff.maybeEnum == OptionalByte.Two)
+      assert(scalarStuff.defaultEnum == OptionalByte.Two)
     }
   }
 }
diff --git a/tests/MyGame/Example/MonsterStorageGrpc.java b/tests/MyGame/Example/MonsterStorageGrpc.java
index 40103ae..957129c 100644
--- a/tests/MyGame/Example/MonsterStorageGrpc.java
+++ b/tests/MyGame/Example/MonsterStorageGrpc.java
@@ -1,12 +1,9 @@
-//Generated by flatc compiler (version 2.0.0)
-//If you make any local changes, they will be lost
-//source: monster_test.fbs
+// Generated by flatc compiler (version 2.0.0)
+// If you make any local changes, they will be lost
+// source: monster_test.fbs
 
 package MyGame.Example;
 
-import com.google.flatbuffers.grpc.FlatbuffersUtils;
-
-import java.nio.ByteBuffer;
 import static io.grpc.MethodDescriptor.generateFullMethodName;
 import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
 import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
@@ -22,446 +19,443 @@
 import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
 import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
 
-/**
- */
-@javax.annotation.Generated(
-    value = "by gRPC proto compiler",
-    comments = "Source: monster_test.fbs")
+import com.google.flatbuffers.grpc.FlatbuffersUtils;
+import java.nio.ByteBuffer;
+
+/** */
+@javax.annotation.Generated(value = "by gRPC proto compiler", comments = "Source: monster_test.fbs")
 public final class MonsterStorageGrpc {
 
   private MonsterStorageGrpc() {}
-  
+
   public static final String SERVICE_NAME = "MyGame.Example.MonsterStorage";
-  
+
   // Static method descriptors that strictly reflect the proto.
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  @java.lang.Deprecated // Use {@link #getStoreMethod()} instead. 
-  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> METHOD_STORE = getStoreMethod();
-  
-  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getStoreMethod;
-  
+  @java.lang.Deprecated // Use {@link #getStoreMethod()} instead.
+  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      METHOD_STORE = getStoreMethod();
+
+  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getStoreMethod;
+
   private static volatile FlatbuffersUtils.FBExtactor<MyGame.Example.Monster> extractorOfMonster;
+
   private static FlatbuffersUtils.FBExtactor<MyGame.Example.Monster> getExtractorOfMonster() {
+    if (extractorOfMonster != null) return extractorOfMonster;
+    synchronized (MonsterStorageGrpc.class) {
       if (extractorOfMonster != null) return extractorOfMonster;
-      synchronized (MonsterStorageGrpc.class) {
-          if (extractorOfMonster != null) return extractorOfMonster;
-          extractorOfMonster = new FlatbuffersUtils.FBExtactor<MyGame.Example.Monster>() {
-              public MyGame.Example.Monster extract (ByteBuffer buffer) {
-                  return MyGame.Example.Monster.getRootAsMonster(buffer);
-              }
+      extractorOfMonster =
+          new FlatbuffersUtils.FBExtactor<MyGame.Example.Monster>() {
+            public MyGame.Example.Monster extract(ByteBuffer buffer) {
+              return MyGame.Example.Monster.getRootAsMonster(buffer);
+            }
           };
-          return extractorOfMonster;
-      }
+      return extractorOfMonster;
+    }
   }
-  
+
   private static volatile FlatbuffersUtils.FBExtactor<MyGame.Example.Stat> extractorOfStat;
+
   private static FlatbuffersUtils.FBExtactor<MyGame.Example.Stat> getExtractorOfStat() {
+    if (extractorOfStat != null) return extractorOfStat;
+    synchronized (MonsterStorageGrpc.class) {
       if (extractorOfStat != null) return extractorOfStat;
-      synchronized (MonsterStorageGrpc.class) {
-          if (extractorOfStat != null) return extractorOfStat;
-          extractorOfStat = new FlatbuffersUtils.FBExtactor<MyGame.Example.Stat>() {
-              public MyGame.Example.Stat extract (ByteBuffer buffer) {
-                  return MyGame.Example.Stat.getRootAsStat(buffer);
-              }
+      extractorOfStat =
+          new FlatbuffersUtils.FBExtactor<MyGame.Example.Stat>() {
+            public MyGame.Example.Stat extract(ByteBuffer buffer) {
+              return MyGame.Example.Stat.getRootAsStat(buffer);
+            }
           };
-          return extractorOfStat;
-      }
+      return extractorOfStat;
+    }
   }
-  
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getStoreMethod() {
+  public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getStoreMethod() {
     io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getStoreMethod;
     if ((getStoreMethod = MonsterStorageGrpc.getStoreMethod) == null) {
       synchronized (MonsterStorageGrpc.class) {
         if ((getStoreMethod = MonsterStorageGrpc.getStoreMethod) == null) {
-          MonsterStorageGrpc.getStoreMethod = getStoreMethod = 
-              io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
-              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName(generateFullMethodName(
-                  "MyGame.Example.MonsterStorage", "Store"))
-              .setSampledToLocalTracing(true)
-              .setRequestMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Monster.class, getExtractorOfMonster()))
-              .setResponseMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Stat.class, getExtractorOfStat()))
-                  .setSchemaDescriptor(null)
-                  .build();
-          }
+          MonsterStorageGrpc.getStoreMethod =
+              getStoreMethod =
+                  io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(
+                          generateFullMethodName("MyGame.Example.MonsterStorage", "Store"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Monster.class, getExtractorOfMonster()))
+                      .setResponseMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Stat.class, getExtractorOfStat()))
+                      .setSchemaDescriptor(null)
+                      .build();
         }
-     }
-     return getStoreMethod;
+      }
+    }
+    return getStoreMethod;
   }
-  
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  @java.lang.Deprecated // Use {@link #getRetrieveMethod()} instead. 
-  public static final io.grpc.MethodDescriptor<MyGame.Example.Stat,
-      MyGame.Example.Monster> METHOD_RETRIEVE = getRetrieveMethod();
-  
-  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Stat,
-      MyGame.Example.Monster> getRetrieveMethod;
-  
+  @java.lang.Deprecated // Use {@link #getRetrieveMethod()} instead.
+  public static final io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
+      METHOD_RETRIEVE = getRetrieveMethod();
+
+  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
+      getRetrieveMethod;
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  public static io.grpc.MethodDescriptor<MyGame.Example.Stat,
-      MyGame.Example.Monster> getRetrieveMethod() {
+  public static io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
+      getRetrieveMethod() {
     io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster> getRetrieveMethod;
     if ((getRetrieveMethod = MonsterStorageGrpc.getRetrieveMethod) == null) {
       synchronized (MonsterStorageGrpc.class) {
         if ((getRetrieveMethod = MonsterStorageGrpc.getRetrieveMethod) == null) {
-          MonsterStorageGrpc.getRetrieveMethod = getRetrieveMethod = 
-              io.grpc.MethodDescriptor.<MyGame.Example.Stat, MyGame.Example.Monster>newBuilder()
-              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
-              .setFullMethodName(generateFullMethodName(
-                  "MyGame.Example.MonsterStorage", "Retrieve"))
-              .setSampledToLocalTracing(true)
-              .setRequestMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Stat.class, getExtractorOfStat()))
-              .setResponseMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Monster.class, getExtractorOfMonster()))
-                  .setSchemaDescriptor(null)
-                  .build();
-          }
+          MonsterStorageGrpc.getRetrieveMethod =
+              getRetrieveMethod =
+                  io.grpc.MethodDescriptor.<MyGame.Example.Stat, MyGame.Example.Monster>newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+                      .setFullMethodName(
+                          generateFullMethodName("MyGame.Example.MonsterStorage", "Retrieve"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Stat.class, getExtractorOfStat()))
+                      .setResponseMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Monster.class, getExtractorOfMonster()))
+                      .setSchemaDescriptor(null)
+                      .build();
         }
-     }
-     return getRetrieveMethod;
+      }
+    }
+    return getRetrieveMethod;
   }
-  
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  @java.lang.Deprecated // Use {@link #getGetMaxHitPointMethod()} instead. 
-  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> METHOD_GET_MAX_HIT_POINT = getGetMaxHitPointMethod();
-  
-  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getGetMaxHitPointMethod;
-  
+  @java.lang.Deprecated // Use {@link #getGetMaxHitPointMethod()} instead.
+  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      METHOD_GET_MAX_HIT_POINT = getGetMaxHitPointMethod();
+
+  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getGetMaxHitPointMethod;
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getGetMaxHitPointMethod() {
+  public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getGetMaxHitPointMethod() {
     io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getGetMaxHitPointMethod;
     if ((getGetMaxHitPointMethod = MonsterStorageGrpc.getGetMaxHitPointMethod) == null) {
       synchronized (MonsterStorageGrpc.class) {
         if ((getGetMaxHitPointMethod = MonsterStorageGrpc.getGetMaxHitPointMethod) == null) {
-          MonsterStorageGrpc.getGetMaxHitPointMethod = getGetMaxHitPointMethod = 
-              io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
-              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
-              .setFullMethodName(generateFullMethodName(
-                  "MyGame.Example.MonsterStorage", "GetMaxHitPoint"))
-              .setSampledToLocalTracing(true)
-              .setRequestMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Monster.class, getExtractorOfMonster()))
-              .setResponseMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Stat.class, getExtractorOfStat()))
-                  .setSchemaDescriptor(null)
-                  .build();
-          }
+          MonsterStorageGrpc.getGetMaxHitPointMethod =
+              getGetMaxHitPointMethod =
+                  io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
+                      .setFullMethodName(
+                          generateFullMethodName("MyGame.Example.MonsterStorage", "GetMaxHitPoint"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Monster.class, getExtractorOfMonster()))
+                      .setResponseMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Stat.class, getExtractorOfStat()))
+                      .setSchemaDescriptor(null)
+                      .build();
         }
-     }
-     return getGetMaxHitPointMethod;
+      }
+    }
+    return getGetMaxHitPointMethod;
   }
-  
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  @java.lang.Deprecated // Use {@link #getGetMinMaxHitPointsMethod()} instead. 
-  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> METHOD_GET_MIN_MAX_HIT_POINTS = getGetMinMaxHitPointsMethod();
-  
-  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getGetMinMaxHitPointsMethod;
-  
+  @java.lang.Deprecated // Use {@link #getGetMinMaxHitPointsMethod()} instead.
+  public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      METHOD_GET_MIN_MAX_HIT_POINTS = getGetMinMaxHitPointsMethod();
+
+  private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getGetMinMaxHitPointsMethod;
+
   @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
-  public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
-      MyGame.Example.Stat> getGetMinMaxHitPointsMethod() {
-    io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getGetMinMaxHitPointsMethod;
+  public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+      getGetMinMaxHitPointsMethod() {
+    io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
+        getGetMinMaxHitPointsMethod;
     if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod) == null) {
       synchronized (MonsterStorageGrpc.class) {
-        if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod) == null) {
-          MonsterStorageGrpc.getGetMinMaxHitPointsMethod = getGetMinMaxHitPointsMethod = 
-              io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
-              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
-              .setFullMethodName(generateFullMethodName(
-                  "MyGame.Example.MonsterStorage", "GetMinMaxHitPoints"))
-              .setSampledToLocalTracing(true)
-              .setRequestMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Monster.class, getExtractorOfMonster()))
-              .setResponseMarshaller(FlatbuffersUtils.marshaller(
-                  MyGame.Example.Stat.class, getExtractorOfStat()))
-                  .setSchemaDescriptor(null)
-                  .build();
-          }
+        if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod)
+            == null) {
+          MonsterStorageGrpc.getGetMinMaxHitPointsMethod =
+              getGetMinMaxHitPointsMethod =
+                  io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
+                      .setFullMethodName(
+                          generateFullMethodName(
+                              "MyGame.Example.MonsterStorage", "GetMinMaxHitPoints"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Monster.class, getExtractorOfMonster()))
+                      .setResponseMarshaller(
+                          FlatbuffersUtils.marshaller(
+                              MyGame.Example.Stat.class, getExtractorOfStat()))
+                      .setSchemaDescriptor(null)
+                      .build();
         }
-     }
-     return getGetMinMaxHitPointsMethod;
+      }
+    }
+    return getGetMinMaxHitPointsMethod;
   }
-  
-  /**
-   * Creates a new async stub that supports all call types for the service
-   */
+
+  /** Creates a new async stub that supports all call types for the service */
   public static MonsterStorageStub newStub(io.grpc.Channel channel) {
     return new MonsterStorageStub(channel);
   }
-  
+
   /**
    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
    */
-  public static MonsterStorageBlockingStub newBlockingStub(
-      io.grpc.Channel channel) {
+  public static MonsterStorageBlockingStub newBlockingStub(io.grpc.Channel channel) {
     return new MonsterStorageBlockingStub(channel);
   }
-  
-  /**
-   * Creates a new ListenableFuture-style stub that supports unary calls on the service
-   */
-  public static MonsterStorageFutureStub newFutureStub(
-      io.grpc.Channel channel) {
+
+  /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
+  public static MonsterStorageFutureStub newFutureStub(io.grpc.Channel channel) {
     return new MonsterStorageFutureStub(channel);
   }
-  
-  /**
-   */
-  public static abstract class MonsterStorageImplBase implements io.grpc.BindableService {
-    
-    /**
-     */
-    public     void store(MyGame.Example.Monster request,
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+  /** */
+  public abstract static class MonsterStorageImplBase implements io.grpc.BindableService {
+
+    /** */
+    public void store(
+        MyGame.Example.Monster request,
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       asyncUnimplementedUnaryCall(getStoreMethod(), responseObserver);
     }
-    
-    /**
-     */
-    public     void retrieve(MyGame.Example.Stat request,
-        io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver)     {
+
+    /** */
+    public void retrieve(
+        MyGame.Example.Stat request,
+        io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
       asyncUnimplementedUnaryCall(getRetrieveMethod(), responseObserver);
     }
-    
-    /**
-     */
-    public     io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+    /** */
+    public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       return asyncUnimplementedStreamingCall(getGetMaxHitPointMethod(), responseObserver);
     }
-    
-    /**
-     */
-    public     io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+    /** */
+    public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       return asyncUnimplementedStreamingCall(getGetMinMaxHitPointsMethod(), responseObserver);
     }
-    
-    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+
+    @java.lang.Override
+    public final io.grpc.ServerServiceDefinition bindService() {
       return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
           .addMethod(
-            getStoreMethod(),
-            asyncUnaryCall(
-              new MethodHandlers<
-                MyGame.Example.Monster,
-                MyGame.Example.Stat>(
-                  this, METHODID_STORE)))
+              getStoreMethod(),
+              asyncUnaryCall(
+                  new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
+                      this, METHODID_STORE)))
           .addMethod(
-            getRetrieveMethod(),
-            asyncServerStreamingCall(
-              new MethodHandlers<
-                MyGame.Example.Stat,
-                MyGame.Example.Monster>(
-                  this, METHODID_RETRIEVE)))
+              getRetrieveMethod(),
+              asyncServerStreamingCall(
+                  new MethodHandlers<MyGame.Example.Stat, MyGame.Example.Monster>(
+                      this, METHODID_RETRIEVE)))
           .addMethod(
-            getGetMaxHitPointMethod(),
-            asyncClientStreamingCall(
-              new MethodHandlers<
-                MyGame.Example.Monster,
-                MyGame.Example.Stat>(
-                  this, METHODID_GET_MAX_HIT_POINT)))
+              getGetMaxHitPointMethod(),
+              asyncClientStreamingCall(
+                  new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
+                      this, METHODID_GET_MAX_HIT_POINT)))
           .addMethod(
-            getGetMinMaxHitPointsMethod(),
-            asyncBidiStreamingCall(
-              new MethodHandlers<
-                MyGame.Example.Monster,
-                MyGame.Example.Stat>(
-                  this, METHODID_GET_MIN_MAX_HIT_POINTS)))
+              getGetMinMaxHitPointsMethod(),
+              asyncBidiStreamingCall(
+                  new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
+                      this, METHODID_GET_MIN_MAX_HIT_POINTS)))
           .build();
     }
   }
-  
-  /**
-   */
-  public static final class MonsterStorageStub extends io.grpc.stub.AbstractStub<MonsterStorageStub> {
+
+  /** */
+  public static final class MonsterStorageStub
+      extends io.grpc.stub.AbstractStub<MonsterStorageStub> {
     private MonsterStorageStub(io.grpc.Channel channel) {
       super(channel);
     }
-    
-    private MonsterStorageStub(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+
+    private MonsterStorageStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       super(channel, callOptions);
     }
-    
+
     @java.lang.Override
-    protected MonsterStorageStub build(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+    protected MonsterStorageStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       return new MonsterStorageStub(channel, callOptions);
     }
-    
-    /**
-     */
-    public     void store(MyGame.Example.Monster request,
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+    /** */
+    public void store(
+        MyGame.Example.Monster request,
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       asyncUnaryCall(
           getChannel().newCall(getStoreMethod(), getCallOptions()), request, responseObserver);
     }
-    
-    /**
-     */
-    public     void retrieve(MyGame.Example.Stat request,
-        io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver)     {
+
+    /** */
+    public void retrieve(
+        MyGame.Example.Stat request,
+        io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
       asyncServerStreamingCall(
           getChannel().newCall(getRetrieveMethod(), getCallOptions()), request, responseObserver);
     }
-    
-    /**
-     */
-    public     io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+    /** */
+    public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       return asyncClientStreamingCall(
           getChannel().newCall(getGetMaxHitPointMethod(), getCallOptions()), responseObserver);
     }
-    
-    /**
-     */
-    public     io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
-        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver)     {
+
+    /** */
+    public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
+        io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
       return asyncBidiStreamingCall(
           getChannel().newCall(getGetMinMaxHitPointsMethod(), getCallOptions()), responseObserver);
     }
   }
-  
-  /**
-   */
-  public static final class MonsterStorageBlockingStub extends io.grpc.stub.AbstractStub<MonsterStorageBlockingStub> {
+
+  /** */
+  public static final class MonsterStorageBlockingStub
+      extends io.grpc.stub.AbstractStub<MonsterStorageBlockingStub> {
     private MonsterStorageBlockingStub(io.grpc.Channel channel) {
       super(channel);
     }
-    
-    private MonsterStorageBlockingStub(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+
+    private MonsterStorageBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       super(channel, callOptions);
     }
-    
+
     @java.lang.Override
-    protected MonsterStorageBlockingStub build(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+    protected MonsterStorageBlockingStub build(
+        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       return new MonsterStorageBlockingStub(channel, callOptions);
     }
-    
-    /**
-     */
-    public     MyGame.Example.Stat store(MyGame.Example.Monster request)     {
-      return blockingUnaryCall(
-          getChannel(), getStoreMethod(), getCallOptions(), request);
+
+    /** */
+    public MyGame.Example.Stat store(MyGame.Example.Monster request) {
+      return blockingUnaryCall(getChannel(), getStoreMethod(), getCallOptions(), request);
     }
-    
-    /**
-     */
-    public     java.util.Iterator<MyGame.Example.Monster> retrieve(
-        MyGame.Example.Stat request)     {
+
+    /** */
+    public java.util.Iterator<MyGame.Example.Monster> retrieve(MyGame.Example.Stat request) {
       return blockingServerStreamingCall(
           getChannel(), getRetrieveMethod(), getCallOptions(), request);
     }
   }
-  
-  /**
-   */
-  public static final class MonsterStorageFutureStub extends io.grpc.stub.AbstractStub<MonsterStorageFutureStub> {
+
+  /** */
+  public static final class MonsterStorageFutureStub
+      extends io.grpc.stub.AbstractStub<MonsterStorageFutureStub> {
     private MonsterStorageFutureStub(io.grpc.Channel channel) {
       super(channel);
     }
-    
-    private MonsterStorageFutureStub(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+
+    private MonsterStorageFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       super(channel, callOptions);
     }
-    
+
     @java.lang.Override
-    protected MonsterStorageFutureStub build(io.grpc.Channel channel,
-        io.grpc.CallOptions callOptions) {
+    protected MonsterStorageFutureStub build(
+        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
       return new MonsterStorageFutureStub(channel, callOptions);
     }
-    
-    /**
-     */
-    public     com.google.common.util.concurrent.ListenableFuture<MyGame.Example.Stat> store(
-        MyGame.Example.Monster request)     {
-      return futureUnaryCall(
-          getChannel().newCall(getStoreMethod(), getCallOptions()), request);
+
+    /** */
+    public com.google.common.util.concurrent.ListenableFuture<MyGame.Example.Stat> store(
+        MyGame.Example.Monster request) {
+      return futureUnaryCall(getChannel().newCall(getStoreMethod(), getCallOptions()), request);
     }
   }
-  
+
   private static final int METHODID_STORE = 0;
   private static final int METHODID_RETRIEVE = 1;
   private static final int METHODID_GET_MIN_MAX_HIT_POINTS = 2;
   private static final int METHODID_GET_MAX_HIT_POINT = 3;
-  
-  private static final class MethodHandlers<Req, Resp> implements
-      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
-      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
-      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
-      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+
+  private static final class MethodHandlers<Req, Resp>
+      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
     private final MonsterStorageImplBase serviceImpl;
     private final int methodId;
-  
+
     MethodHandlers(MonsterStorageImplBase serviceImpl, int methodId) {
       this.serviceImpl = serviceImpl;
       this.methodId = methodId;
     }
-  
+
     @java.lang.Override
     @java.lang.SuppressWarnings("unchecked")
     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
       switch (methodId) {
         case METHODID_STORE:
-          serviceImpl.store((MyGame.Example.Monster) request,
+          serviceImpl.store(
+              (MyGame.Example.Monster) request,
               (io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
           break;
         case METHODID_RETRIEVE:
-          serviceImpl.retrieve((MyGame.Example.Stat) request,
+          serviceImpl.retrieve(
+              (MyGame.Example.Stat) request,
               (io.grpc.stub.StreamObserver<MyGame.Example.Monster>) responseObserver);
           break;
         default:
           throw new AssertionError();
       }
     }
-    
+
     @java.lang.Override
     @java.lang.SuppressWarnings("unchecked")
     public io.grpc.stub.StreamObserver<Req> invoke(
         io.grpc.stub.StreamObserver<Resp> responseObserver) {
       switch (methodId) {
         case METHODID_GET_MAX_HIT_POINT:
-          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.getMaxHitPoint(
-              (io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
+          return (io.grpc.stub.StreamObserver<Req>)
+              serviceImpl.getMaxHitPoint(
+                  (io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
         case METHODID_GET_MIN_MAX_HIT_POINTS:
-          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.getMinMaxHitPoints(
-              (io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
+          return (io.grpc.stub.StreamObserver<Req>)
+              serviceImpl.getMinMaxHitPoints(
+                  (io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
         default:
           throw new AssertionError();
       }
     }
   }
-  
+
   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
-  
+
   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
     io.grpc.ServiceDescriptor result = serviceDescriptor;
     if (result == null) {
       synchronized (MonsterStorageGrpc.class) {
         result = serviceDescriptor;
         if (result == null) {
-          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)              
-              .setSchemaDescriptor(null)              
-              .addMethod(getStoreMethod())              
-              .addMethod(getRetrieveMethod())              
-              .addMethod(getGetMaxHitPointMethod())              
-              .addMethod(getGetMinMaxHitPointsMethod())              
-              .build();
+          serviceDescriptor =
+              result =
+                  io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+                      .setSchemaDescriptor(null)
+                      .addMethod(getStoreMethod())
+                      .addMethod(getRetrieveMethod())
+                      .addMethod(getGetMaxHitPointMethod())
+                      .addMethod(getGetMinMaxHitPointsMethod())
+                      .build();
         }
       }
     }
diff --git a/tests/MyGame/Example/TestEnum.kt b/tests/MyGame/Example/TestEnum.kt
index ca4d7f8..e12c434 100644
--- a/tests/MyGame/Example/TestEnum.kt
+++ b/tests/MyGame/Example/TestEnum.kt
@@ -4,11 +4,12 @@
 
 @Suppress("unused")
 class TestEnum private constructor() {
-    companion object {
-        const val A: Byte = 0
-        const val B: Byte = 1
-        const val C: Byte = 2
-        val names : Array<String> = arrayOf("A", "B", "C")
-        fun name(e: Int) : String = names[e]
-    }
+  companion object {
+    const val A: Byte = 0
+    const val B: Byte = 1
+    const val C: Byte = 2
+    val names: Array<String> = arrayOf("A", "B", "C")
+
+    fun name(e: Int): String = names[e]
+  }
 }
diff --git a/tests/MyGame/Example/monster_test_grpc_fb.py b/tests/MyGame/Example/monster_test_grpc_fb.py
index 8375c98..d0c3ccc 100644
--- a/tests/MyGame/Example/monster_test_grpc_fb.py
+++ b/tests/MyGame/Example/monster_test_grpc_fb.py
@@ -3,52 +3,44 @@
 
 
 class MonsterStorageStub(object):
-  
+
   def __init__(self, channel):
     """Constructor.
-    
+
     Args:
       channel: A grpc.Channel.
     """
     self.Store = channel.unary_unary(
         '/MyGame.Example.MonsterStorage/Store',
-        
-        
-        )
+    )
     self.Retrieve = channel.unary_stream(
         '/MyGame.Example.MonsterStorage/Retrieve',
-        
-        
-        )
+    )
     self.GetMaxHitPoint = channel.stream_unary(
         '/MyGame.Example.MonsterStorage/GetMaxHitPoint',
-        
-        
-        )
+    )
     self.GetMinMaxHitPoints = channel.unary_unary(
         '/MyGame.Example.MonsterStorage/GetMinMaxHitPoints',
-        
-        
-        )
+    )
 
 
 class MonsterStorageServicer(object):
-  
+
   def Store(self, request, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
     context.set_details('Method not implemented!')
     raise NotImplementedError('Method not implemented!')
-  
+
   def Retrieve(self, request, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
     context.set_details('Method not implemented!')
     raise NotImplementedError('Method not implemented!')
-  
+
   def GetMaxHitPoint(self, request_iterator, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
     context.set_details('Method not implemented!')
     raise NotImplementedError('Method not implemented!')
-  
+
   def GetMinMaxHitPoints(self, request, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
     context.set_details('Method not implemented!')
@@ -59,28 +51,23 @@
   rpc_method_handlers = {
       'Store': grpc.unary_unary_rpc_method_handler(
           servicer.Store,
-          
-          
       ),
       'Retrieve': grpc.unary_stream_rpc_method_handler(
           servicer.Retrieve,
-          
-          
       ),
       'GetMaxHitPoint': grpc.stream_unary_rpc_method_handler(
           servicer.GetMaxHitPoint,
-          
-          
       ),
       'GetMinMaxHitPoints': grpc.unary_unary_rpc_method_handler(
           servicer.GetMinMaxHitPoints,
-          
-          
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
-      'MyGame.Example.MonsterStorage', rpc_method_handlers)
+      'MyGame.Example.MonsterStorage', rpc_method_handlers
+  )
   server.add_generic_rpc_handlers((generic_handler,))
+
+
 try:
   # THESE ELEMENTS WILL BE DEPRECATED.
   # Please use the generated *_pb2_grpc.py files instead.
@@ -89,153 +76,212 @@
   from grpc.beta import interfaces as beta_interfaces
   from grpc.framework.common import cardinality
   from grpc.framework.interfaces.face import utilities as face_utilities
-  
-  
+
   class MonsterStorageStub(object):
-    
+
     def __init__(self, channel):
       """Constructor.
-      
+
       Args:
         channel: A grpc.Channel.
       """
       self.Store = channel.unary_unary(
           '/MyGame.Example.MonsterStorage/Store',
-          
-          
-          )
+      )
       self.Retrieve = channel.unary_stream(
           '/MyGame.Example.MonsterStorage/Retrieve',
-          
-          
-          )
+      )
       self.GetMaxHitPoint = channel.stream_unary(
           '/MyGame.Example.MonsterStorage/GetMaxHitPoint',
-          
-          
-          )
+      )
       self.GetMinMaxHitPoints = channel.unary_unary(
           '/MyGame.Example.MonsterStorage/GetMinMaxHitPoints',
-          
-          
-          )
-  
-  
+      )
+
   class MonsterStorageServicer(object):
-    
+
     def Store(self, request, context):
       context.set_code(grpc.StatusCode.UNIMPLEMENTED)
       context.set_details('Method not implemented!')
       raise NotImplementedError('Method not implemented!')
-    
+
     def Retrieve(self, request, context):
       context.set_code(grpc.StatusCode.UNIMPLEMENTED)
       context.set_details('Method not implemented!')
       raise NotImplementedError('Method not implemented!')
-    
+
     def GetMaxHitPoint(self, request_iterator, context):
       context.set_code(grpc.StatusCode.UNIMPLEMENTED)
       context.set_details('Method not implemented!')
       raise NotImplementedError('Method not implemented!')
-    
+
     def GetMinMaxHitPoints(self, request, context):
       context.set_code(grpc.StatusCode.UNIMPLEMENTED)
       context.set_details('Method not implemented!')
       raise NotImplementedError('Method not implemented!')
-  
-  
+
   def add_MonsterStorageServicer_to_server(servicer, server):
     rpc_method_handlers = {
         'Store': grpc.unary_unary_rpc_method_handler(
             servicer.Store,
-            
-            
         ),
         'Retrieve': grpc.unary_stream_rpc_method_handler(
             servicer.Retrieve,
-            
-            
         ),
         'GetMaxHitPoint': grpc.stream_unary_rpc_method_handler(
             servicer.GetMaxHitPoint,
-            
-            
         ),
         'GetMinMaxHitPoints': grpc.unary_unary_rpc_method_handler(
             servicer.GetMinMaxHitPoints,
-            
-            
         ),
     }
     generic_handler = grpc.method_handlers_generic_handler(
-        'MyGame.Example.MonsterStorage', rpc_method_handlers)
+        'MyGame.Example.MonsterStorage', rpc_method_handlers
+    )
     server.add_generic_rpc_handlers((generic_handler,))
-  
-  
+
   class BetaMonsterStorageServicer(object):
     """The Beta API is deprecated for 0.15.0 and later.
-    
+
     It is recommended to use the GA API (classes and functions in this
     file not marked beta) for all further purposes. This class was generated
-    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
+    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.
+    """
+
     def Store(self, request, context):
       context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
+
     def Retrieve(self, request, context):
       context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
+
     def GetMaxHitPoint(self, request_iterator, context):
       context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
+
     def GetMinMaxHitPoints(self, request, context):
       context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
-  
-  
+
   class BetaMonsterStorageStub(object):
     """The Beta API is deprecated for 0.15.0 and later.
-    
+
     It is recommended to use the GA API (classes and functions in this
     file not marked beta) for all further purposes. This class was generated
-    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
-    def Store(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
+    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.
+    """
+
+    def Store(
+        self,
+        request,
+        timeout,
+        metadata=None,
+        with_call=False,
+        protocol_options=None,
+    ):
       raise NotImplementedError()
+
     Store.future = None
-    def Retrieve(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
+
+    def Retrieve(
+        self,
+        request,
+        timeout,
+        metadata=None,
+        with_call=False,
+        protocol_options=None,
+    ):
       raise NotImplementedError()
-    def GetMaxHitPoint(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None):
+
+    def GetMaxHitPoint(
+        self,
+        request_iterator,
+        timeout,
+        metadata=None,
+        with_call=False,
+        protocol_options=None,
+    ):
       raise NotImplementedError()
+
     GetMaxHitPoint.future = None
-    def GetMinMaxHitPoints(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
+
+    def GetMinMaxHitPoints(
+        self,
+        request,
+        timeout,
+        metadata=None,
+        with_call=False,
+        protocol_options=None,
+    ):
       raise NotImplementedError()
+
     GetMinMaxHitPoints.future = None
-  
-  
-  def beta_create_MonsterStorage_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
+
+  def beta_create_MonsterStorage_server(
+      servicer,
+      pool=None,
+      pool_size=None,
+      default_timeout=None,
+      maximum_timeout=None,
+  ):
     """The Beta API is deprecated for 0.15.0 and later.
-    
+
     It is recommended to use the GA API (classes and functions in this
     file not marked beta) for all further purposes. This function was
-    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
+    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
+    """
     method_implementations = {
-      ('MyGame.Example.MonsterStorage', 'GetMaxHitPoint'): face_utilities.stream_unary_inline(servicer.GetMaxHitPoint),
-      ('MyGame.Example.MonsterStorage', 'GetMinMaxHitPoints'): face_utilities.unary_unary_inline(servicer.GetMinMaxHitPoints),
-      ('MyGame.Example.MonsterStorage', 'Retrieve'): face_utilities.unary_stream_inline(servicer.Retrieve),
-      ('MyGame.Example.MonsterStorage', 'Store'): face_utilities.unary_unary_inline(servicer.Store),
+        (
+            'MyGame.Example.MonsterStorage',
+            'GetMaxHitPoint',
+        ): face_utilities.stream_unary_inline(servicer.GetMaxHitPoint),
+        (
+            'MyGame.Example.MonsterStorage',
+            'GetMinMaxHitPoints',
+        ): face_utilities.unary_unary_inline(servicer.GetMinMaxHitPoints),
+        (
+            'MyGame.Example.MonsterStorage',
+            'Retrieve',
+        ): face_utilities.unary_stream_inline(servicer.Retrieve),
+        (
+            'MyGame.Example.MonsterStorage',
+            'Store',
+        ): face_utilities.unary_unary_inline(servicer.Store),
     }
-    server_options = beta_implementations.server_options(thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
-    return beta_implementations.server(method_implementations, options=server_options)
-  
-  
-  def beta_create_MonsterStorage_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
+    server_options = beta_implementations.server_options(
+        thread_pool=pool,
+        thread_pool_size=pool_size,
+        default_timeout=default_timeout,
+        maximum_timeout=maximum_timeout,
+    )
+    return beta_implementations.server(
+        method_implementations, options=server_options
+    )
+
+  def beta_create_MonsterStorage_stub(
+      channel, host=None, metadata_transformer=None, pool=None, pool_size=None
+  ):
     """The Beta API is deprecated for 0.15.0 and later.
-    
+
     It is recommended to use the GA API (classes and functions in this
     file not marked beta) for all further purposes. This function was
-    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
+    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
+    """
     cardinalities = {
-      'GetMaxHitPoint': cardinality.Cardinality.STREAM_UNARY,
-      'GetMinMaxHitPoints': cardinality.Cardinality.UNARY_UNARY,
-      'Retrieve': cardinality.Cardinality.UNARY_STREAM,
-      'Store': cardinality.Cardinality.UNARY_UNARY,
+        'GetMaxHitPoint': cardinality.Cardinality.STREAM_UNARY,
+        'GetMinMaxHitPoints': cardinality.Cardinality.UNARY_UNARY,
+        'Retrieve': cardinality.Cardinality.UNARY_STREAM,
+        'Store': cardinality.Cardinality.UNARY_UNARY,
     }
-    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, thread_pool=pool, thread_pool_size=pool_size)
-    return beta_implementations.dynamic_stub(channel, 'MyGame.Example.MonsterStorage', cardinalities, options=stub_options)
+    stub_options = beta_implementations.stub_options(
+        host=host,
+        metadata_transformer=metadata_transformer,
+        thread_pool=pool,
+        thread_pool_size=pool_size,
+    )
+    return beta_implementations.dynamic_stub(
+        channel,
+        'MyGame.Example.MonsterStorage',
+        cardinalities,
+        options=stub_options,
+    )
+
 except ImportError:
-  pass
\ No newline at end of file
+  pass
diff --git a/tests/MyGame/OtherNameSpace/TableBT.java b/tests/MyGame/OtherNameSpace/TableBT.java
index d38d9ce..6696ec6 100644
--- a/tests/MyGame/OtherNameSpace/TableBT.java
+++ b/tests/MyGame/OtherNameSpace/TableBT.java
@@ -2,21 +2,22 @@
 
 package MyGame.OtherNameSpace;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class TableBT {
   private TableAT a;
 
-  public TableAT getA() { return a; }
+  public TableAT getA() {
+    return a;
+  }
 
-  public void setA(TableAT a) { this.a = a; }
-
+  public void setA(TableAT a) {
+    this.a = a;
+  }
 
   public TableBT() {
     this.a = null;
   }
 }
-
diff --git a/tests/MyGame/OtherNameSpace/UnusedT.java b/tests/MyGame/OtherNameSpace/UnusedT.java
index b525a1c..29f05a0 100644
--- a/tests/MyGame/OtherNameSpace/UnusedT.java
+++ b/tests/MyGame/OtherNameSpace/UnusedT.java
@@ -2,21 +2,22 @@
 
 package MyGame.OtherNameSpace;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class UnusedT {
   private int a;
 
-  public int getA() { return a; }
+  public int getA() {
+    return a;
+  }
 
-  public void setA(int a) { this.a = a; }
-
+  public void setA(int a) {
+    this.a = a;
+  }
 
   public UnusedT() {
     this.a = 0;
   }
 }
-
diff --git a/tests/Pizza.go b/tests/Pizza.go
index 08df9e1..8c63dc4 100644
--- a/tests/Pizza.go
+++ b/tests/Pizza.go
@@ -11,7 +11,9 @@
 }
 
 func (t *PizzaT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	PizzaStart(builder)
 	PizzaAddSize(builder, t.Size)
 	return PizzaEnd(builder)
@@ -22,7 +24,9 @@
 }
 
 func (rcv *Pizza) UnPack() *PizzaT {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &PizzaT{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/TableAT.java b/tests/TableAT.java
index a81b39b..667e163 100644
--- a/tests/TableAT.java
+++ b/tests/TableAT.java
@@ -1,20 +1,21 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class TableAT {
   private MyGame.OtherNameSpace.TableBT b;
 
-  public MyGame.OtherNameSpace.TableBT getB() { return b; }
+  public MyGame.OtherNameSpace.TableBT getB() {
+    return b;
+  }
 
-  public void setB(MyGame.OtherNameSpace.TableBT b) { this.b = b; }
-
+  public void setB(MyGame.OtherNameSpace.TableBT b) {
+    this.b = b;
+  }
 
   public TableAT() {
     this.b = null;
   }
 }
-
diff --git a/tests/annotated_binary/generate_annotations.py b/tests/annotated_binary/generate_annotations.py
index bd5de2b..e906ba3 100755
--- a/tests/annotated_binary/generate_annotations.py
+++ b/tests/annotated_binary/generate_annotations.py
@@ -14,9 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from pathlib import Path
 import platform
 import subprocess
-from pathlib import Path
 
 # Get the path where this script is located so we can invoke the script from
 # any directory and have the paths work correctly.
@@ -33,7 +33,7 @@
 
 # Find and assert flatc compiler is present.
 if root_path in flatc_exe.parents:
-    flatc_exe = flatc_exe.relative_to(root_path)
+  flatc_exe = flatc_exe.relative_to(root_path)
 flatc_path = Path(root_path, flatc_exe)
 assert flatc_path.exists(), "Cannot find the flatc compiler " + str(flatc_path)
 
@@ -42,8 +42,8 @@
 
 
 def flatc_annotate(schema, file, cwd=script_path):
-    cmd = [str(flatc_path), "--annotate", schema, file]
-    result = subprocess.run(cmd, cwd=str(cwd), check=True)
+  cmd = [str(flatc_path), "--annotate", schema, file]
+  result = subprocess.run(cmd, cwd=str(cwd), check=True)
 
 
 test_files = [
@@ -73,4 +73,4 @@
 ]
 
 for test_file in test_files:
-    flatc_annotate("annotated_binary.fbs", test_file)
+  flatc_annotate("annotated_binary.fbs", test_file)
diff --git a/tests/cpp17/generated_cpp17/optional_scalars2_generated.h b/tests/cpp17/generated_cpp17/optional_scalars2_generated.h
index 1aba093..07bcabd 100644
--- a/tests/cpp17/generated_cpp17/optional_scalars2_generated.h
+++ b/tests/cpp17/generated_cpp17/optional_scalars2_generated.h
@@ -1,6 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-
 #ifndef FLATBUFFERS_GENERATED_OPTIONALSCALARS2_OPTIONAL_SCALARS_H_
 #define FLATBUFFERS_GENERATED_OPTIONALSCALARS2_OPTIONAL_SCALARS_H_
 
@@ -12,7 +11,7 @@
 struct ScalarStuffBuilder;
 struct ScalarStuffT;
 
-inline const flatbuffers::TypeTable *ScalarStuffTypeTable();
+inline const flatbuffers::TypeTable* ScalarStuffTypeTable();
 
 enum class OptionalByte : int8_t {
   None = 0,
@@ -23,26 +22,19 @@
 };
 
 inline const OptionalByte (&EnumValuesOptionalByte())[3] {
-  static const OptionalByte values[] = {
-    OptionalByte::None,
-    OptionalByte::One,
-    OptionalByte::Two
-  };
+  static const OptionalByte values[] = {OptionalByte::None, OptionalByte::One,
+                                        OptionalByte::Two};
   return values;
 }
 
-inline const char * const *EnumNamesOptionalByte() {
-  static const char * const names[4] = {
-    "None",
-    "One",
-    "Two",
-    nullptr
-  };
+inline const char* const* EnumNamesOptionalByte() {
+  static const char* const names[4] = {"None", "One", "Two", nullptr};
   return names;
 }
 
-inline const char *EnumNameOptionalByte(OptionalByte e) {
-  if (flatbuffers::IsOutRange(e, OptionalByte::None, OptionalByte::Two)) return "";
+inline const char* EnumNameOptionalByte(OptionalByte e) {
+  if (flatbuffers::IsOutRange(e, OptionalByte::None, OptionalByte::Two))
+    return "";
   const size_t index = static_cast<size_t>(e);
   return EnumNamesOptionalByte()[index];
 }
@@ -82,16 +74,19 @@
   bool just_bool = false;
   flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt;
   bool default_bool = true;
-  optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte::None;
-  flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt;
-  optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte::One;
+  optional_scalars::OptionalByte just_enum =
+      optional_scalars::OptionalByte::None;
+  flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum =
+      flatbuffers::nullopt;
+  optional_scalars::OptionalByte default_enum =
+      optional_scalars::OptionalByte::One;
 };
 
 struct ScalarStuff FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
   typedef ScalarStuffT NativeTableType;
   typedef ScalarStuffBuilder Builder;
   struct Traits;
-  static const flatbuffers::TypeTable *MiniReflectTypeTable() {
+  static const flatbuffers::TypeTable* MiniReflectTypeTable() {
     return ScalarStuffTypeTable();
   }
   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
@@ -132,9 +127,7 @@
     VT_MAYBE_ENUM = 72,
     VT_DEFAULT_ENUM = 74
   };
-  int8_t just_i8() const {
-    return GetField<int8_t>(VT_JUST_I8, 0);
-  }
+  int8_t just_i8() const { return GetField<int8_t>(VT_JUST_I8, 0); }
   bool mutate_just_i8(int8_t _just_i8) {
     return SetField<int8_t>(VT_JUST_I8, _just_i8, 0);
   }
@@ -144,15 +137,11 @@
   bool mutate_maybe_i8(int8_t _maybe_i8) {
     return SetField<int8_t>(VT_MAYBE_I8, _maybe_i8);
   }
-  int8_t default_i8() const {
-    return GetField<int8_t>(VT_DEFAULT_I8, 42);
-  }
+  int8_t default_i8() const { return GetField<int8_t>(VT_DEFAULT_I8, 42); }
   bool mutate_default_i8(int8_t _default_i8) {
     return SetField<int8_t>(VT_DEFAULT_I8, _default_i8, 42);
   }
-  uint8_t just_u8() const {
-    return GetField<uint8_t>(VT_JUST_U8, 0);
-  }
+  uint8_t just_u8() const { return GetField<uint8_t>(VT_JUST_U8, 0); }
   bool mutate_just_u8(uint8_t _just_u8) {
     return SetField<uint8_t>(VT_JUST_U8, _just_u8, 0);
   }
@@ -162,15 +151,11 @@
   bool mutate_maybe_u8(uint8_t _maybe_u8) {
     return SetField<uint8_t>(VT_MAYBE_U8, _maybe_u8);
   }
-  uint8_t default_u8() const {
-    return GetField<uint8_t>(VT_DEFAULT_U8, 42);
-  }
+  uint8_t default_u8() const { return GetField<uint8_t>(VT_DEFAULT_U8, 42); }
   bool mutate_default_u8(uint8_t _default_u8) {
     return SetField<uint8_t>(VT_DEFAULT_U8, _default_u8, 42);
   }
-  int16_t just_i16() const {
-    return GetField<int16_t>(VT_JUST_I16, 0);
-  }
+  int16_t just_i16() const { return GetField<int16_t>(VT_JUST_I16, 0); }
   bool mutate_just_i16(int16_t _just_i16) {
     return SetField<int16_t>(VT_JUST_I16, _just_i16, 0);
   }
@@ -180,15 +165,11 @@
   bool mutate_maybe_i16(int16_t _maybe_i16) {
     return SetField<int16_t>(VT_MAYBE_I16, _maybe_i16);
   }
-  int16_t default_i16() const {
-    return GetField<int16_t>(VT_DEFAULT_I16, 42);
-  }
+  int16_t default_i16() const { return GetField<int16_t>(VT_DEFAULT_I16, 42); }
   bool mutate_default_i16(int16_t _default_i16) {
     return SetField<int16_t>(VT_DEFAULT_I16, _default_i16, 42);
   }
-  uint16_t just_u16() const {
-    return GetField<uint16_t>(VT_JUST_U16, 0);
-  }
+  uint16_t just_u16() const { return GetField<uint16_t>(VT_JUST_U16, 0); }
   bool mutate_just_u16(uint16_t _just_u16) {
     return SetField<uint16_t>(VT_JUST_U16, _just_u16, 0);
   }
@@ -204,9 +185,7 @@
   bool mutate_default_u16(uint16_t _default_u16) {
     return SetField<uint16_t>(VT_DEFAULT_U16, _default_u16, 42);
   }
-  int32_t just_i32() const {
-    return GetField<int32_t>(VT_JUST_I32, 0);
-  }
+  int32_t just_i32() const { return GetField<int32_t>(VT_JUST_I32, 0); }
   bool mutate_just_i32(int32_t _just_i32) {
     return SetField<int32_t>(VT_JUST_I32, _just_i32, 0);
   }
@@ -216,15 +195,11 @@
   bool mutate_maybe_i32(int32_t _maybe_i32) {
     return SetField<int32_t>(VT_MAYBE_I32, _maybe_i32);
   }
-  int32_t default_i32() const {
-    return GetField<int32_t>(VT_DEFAULT_I32, 42);
-  }
+  int32_t default_i32() const { return GetField<int32_t>(VT_DEFAULT_I32, 42); }
   bool mutate_default_i32(int32_t _default_i32) {
     return SetField<int32_t>(VT_DEFAULT_I32, _default_i32, 42);
   }
-  uint32_t just_u32() const {
-    return GetField<uint32_t>(VT_JUST_U32, 0);
-  }
+  uint32_t just_u32() const { return GetField<uint32_t>(VT_JUST_U32, 0); }
   bool mutate_just_u32(uint32_t _just_u32) {
     return SetField<uint32_t>(VT_JUST_U32, _just_u32, 0);
   }
@@ -240,9 +215,7 @@
   bool mutate_default_u32(uint32_t _default_u32) {
     return SetField<uint32_t>(VT_DEFAULT_U32, _default_u32, 42);
   }
-  int64_t just_i64() const {
-    return GetField<int64_t>(VT_JUST_I64, 0);
-  }
+  int64_t just_i64() const { return GetField<int64_t>(VT_JUST_I64, 0); }
   bool mutate_just_i64(int64_t _just_i64) {
     return SetField<int64_t>(VT_JUST_I64, _just_i64, 0);
   }
@@ -258,9 +231,7 @@
   bool mutate_default_i64(int64_t _default_i64) {
     return SetField<int64_t>(VT_DEFAULT_I64, _default_i64, 42LL);
   }
-  uint64_t just_u64() const {
-    return GetField<uint64_t>(VT_JUST_U64, 0);
-  }
+  uint64_t just_u64() const { return GetField<uint64_t>(VT_JUST_U64, 0); }
   bool mutate_just_u64(uint64_t _just_u64) {
     return SetField<uint64_t>(VT_JUST_U64, _just_u64, 0);
   }
@@ -276,9 +247,7 @@
   bool mutate_default_u64(uint64_t _default_u64) {
     return SetField<uint64_t>(VT_DEFAULT_U64, _default_u64, 42ULL);
   }
-  float just_f32() const {
-    return GetField<float>(VT_JUST_F32, 0.0f);
-  }
+  float just_f32() const { return GetField<float>(VT_JUST_F32, 0.0f); }
   bool mutate_just_f32(float _just_f32) {
     return SetField<float>(VT_JUST_F32, _just_f32, 0.0f);
   }
@@ -288,15 +257,11 @@
   bool mutate_maybe_f32(float _maybe_f32) {
     return SetField<float>(VT_MAYBE_F32, _maybe_f32);
   }
-  float default_f32() const {
-    return GetField<float>(VT_DEFAULT_F32, 42.0f);
-  }
+  float default_f32() const { return GetField<float>(VT_DEFAULT_F32, 42.0f); }
   bool mutate_default_f32(float _default_f32) {
     return SetField<float>(VT_DEFAULT_F32, _default_f32, 42.0f);
   }
-  double just_f64() const {
-    return GetField<double>(VT_JUST_F64, 0.0);
-  }
+  double just_f64() const { return GetField<double>(VT_JUST_F64, 0.0); }
   bool mutate_just_f64(double _just_f64) {
     return SetField<double>(VT_JUST_F64, _just_f64, 0.0);
   }
@@ -306,15 +271,11 @@
   bool mutate_maybe_f64(double _maybe_f64) {
     return SetField<double>(VT_MAYBE_F64, _maybe_f64);
   }
-  double default_f64() const {
-    return GetField<double>(VT_DEFAULT_F64, 42.0);
-  }
+  double default_f64() const { return GetField<double>(VT_DEFAULT_F64, 42.0); }
   bool mutate_default_f64(double _default_f64) {
     return SetField<double>(VT_DEFAULT_F64, _default_f64, 42.0);
   }
-  bool just_bool() const {
-    return GetField<uint8_t>(VT_JUST_BOOL, 0) != 0;
-  }
+  bool just_bool() const { return GetField<uint8_t>(VT_JUST_BOOL, 0) != 0; }
   bool mutate_just_bool(bool _just_bool) {
     return SetField<uint8_t>(VT_JUST_BOOL, static_cast<uint8_t>(_just_bool), 0);
   }
@@ -328,10 +289,12 @@
     return GetField<uint8_t>(VT_DEFAULT_BOOL, 1) != 0;
   }
   bool mutate_default_bool(bool _default_bool) {
-    return SetField<uint8_t>(VT_DEFAULT_BOOL, static_cast<uint8_t>(_default_bool), 1);
+    return SetField<uint8_t>(VT_DEFAULT_BOOL,
+                             static_cast<uint8_t>(_default_bool), 1);
   }
   optional_scalars::OptionalByte just_enum() const {
-    return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_JUST_ENUM, 0));
+    return static_cast<optional_scalars::OptionalByte>(
+        GetField<int8_t>(VT_JUST_ENUM, 0));
   }
   bool mutate_just_enum(optional_scalars::OptionalByte _just_enum) {
     return SetField<int8_t>(VT_JUST_ENUM, static_cast<int8_t>(_just_enum), 0);
@@ -343,12 +306,14 @@
     return SetField<int8_t>(VT_MAYBE_ENUM, static_cast<int8_t>(_maybe_enum));
   }
   optional_scalars::OptionalByte default_enum() const {
-    return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_DEFAULT_ENUM, 1));
+    return static_cast<optional_scalars::OptionalByte>(
+        GetField<int8_t>(VT_DEFAULT_ENUM, 1));
   }
   bool mutate_default_enum(optional_scalars::OptionalByte _default_enum) {
-    return SetField<int8_t>(VT_DEFAULT_ENUM, static_cast<int8_t>(_default_enum), 1);
+    return SetField<int8_t>(VT_DEFAULT_ENUM, static_cast<int8_t>(_default_enum),
+                            1);
   }
-  bool Verify(flatbuffers::Verifier &verifier) const {
+  bool Verify(flatbuffers::Verifier& verifier) const {
     return VerifyTableStart(verifier) &&
            VerifyField<int8_t>(verifier, VT_JUST_I8) &&
            VerifyField<int8_t>(verifier, VT_MAYBE_I8) &&
@@ -388,14 +353,19 @@
            VerifyField<int8_t>(verifier, VT_DEFAULT_ENUM) &&
            verifier.EndTable();
   }
-  ScalarStuffT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
-  void UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
-  static flatbuffers::Offset<ScalarStuff> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
+  ScalarStuffT* UnPack(
+      const flatbuffers::resolver_function_t* _resolver = nullptr) const;
+  void UnPackTo(
+      ScalarStuffT* _o,
+      const flatbuffers::resolver_function_t* _resolver = nullptr) const;
+  static flatbuffers::Offset<ScalarStuff> Pack(
+      flatbuffers::FlatBufferBuilder& _fbb, const ScalarStuffT* _o,
+      const flatbuffers::rehasher_function_t* _rehasher = nullptr);
 };
 
 struct ScalarStuffBuilder {
   typedef ScalarStuff Table;
-  flatbuffers::FlatBufferBuilder &fbb_;
+  flatbuffers::FlatBufferBuilder& fbb_;
   flatbuffers::uoffset_t start_;
   void add_just_i8(int8_t just_i8) {
     fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_I8, just_i8, 0);
@@ -488,25 +458,31 @@
     fbb_.AddElement<double>(ScalarStuff::VT_DEFAULT_F64, default_f64, 42.0);
   }
   void add_just_bool(bool just_bool) {
-    fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_BOOL, static_cast<uint8_t>(just_bool), 0);
+    fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_BOOL,
+                             static_cast<uint8_t>(just_bool), 0);
   }
   void add_maybe_bool(bool maybe_bool) {
-    fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_BOOL, static_cast<uint8_t>(maybe_bool));
+    fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_BOOL,
+                             static_cast<uint8_t>(maybe_bool));
   }
   void add_default_bool(bool default_bool) {
-    fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_BOOL, static_cast<uint8_t>(default_bool), 1);
+    fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_BOOL,
+                             static_cast<uint8_t>(default_bool), 1);
   }
   void add_just_enum(optional_scalars::OptionalByte just_enum) {
-    fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_ENUM, static_cast<int8_t>(just_enum), 0);
+    fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_ENUM,
+                            static_cast<int8_t>(just_enum), 0);
   }
   void add_maybe_enum(optional_scalars::OptionalByte maybe_enum) {
-    fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_ENUM, static_cast<int8_t>(maybe_enum));
+    fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_ENUM,
+                            static_cast<int8_t>(maybe_enum));
   }
   void add_default_enum(optional_scalars::OptionalByte default_enum) {
-    fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_ENUM, static_cast<int8_t>(default_enum), 1);
+    fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_ENUM,
+                            static_cast<int8_t>(default_enum), 1);
   }
-  explicit ScalarStuffBuilder(flatbuffers::FlatBufferBuilder &_fbb)
-        : fbb_(_fbb) {
+  explicit ScalarStuffBuilder(flatbuffers::FlatBufferBuilder& _fbb)
+      : fbb_(_fbb) {
     start_ = fbb_.StartTable();
   }
   flatbuffers::Offset<ScalarStuff> Finish() {
@@ -517,79 +493,95 @@
 };
 
 inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(
-    flatbuffers::FlatBufferBuilder &_fbb,
-    int8_t just_i8 = 0,
+    flatbuffers::FlatBufferBuilder& _fbb, int8_t just_i8 = 0,
     flatbuffers::Optional<int8_t> maybe_i8 = flatbuffers::nullopt,
-    int8_t default_i8 = 42,
-    uint8_t just_u8 = 0,
+    int8_t default_i8 = 42, uint8_t just_u8 = 0,
     flatbuffers::Optional<uint8_t> maybe_u8 = flatbuffers::nullopt,
-    uint8_t default_u8 = 42,
-    int16_t just_i16 = 0,
+    uint8_t default_u8 = 42, int16_t just_i16 = 0,
     flatbuffers::Optional<int16_t> maybe_i16 = flatbuffers::nullopt,
-    int16_t default_i16 = 42,
-    uint16_t just_u16 = 0,
+    int16_t default_i16 = 42, uint16_t just_u16 = 0,
     flatbuffers::Optional<uint16_t> maybe_u16 = flatbuffers::nullopt,
-    uint16_t default_u16 = 42,
-    int32_t just_i32 = 0,
+    uint16_t default_u16 = 42, int32_t just_i32 = 0,
     flatbuffers::Optional<int32_t> maybe_i32 = flatbuffers::nullopt,
-    int32_t default_i32 = 42,
-    uint32_t just_u32 = 0,
+    int32_t default_i32 = 42, uint32_t just_u32 = 0,
     flatbuffers::Optional<uint32_t> maybe_u32 = flatbuffers::nullopt,
-    uint32_t default_u32 = 42,
-    int64_t just_i64 = 0,
+    uint32_t default_u32 = 42, int64_t just_i64 = 0,
     flatbuffers::Optional<int64_t> maybe_i64 = flatbuffers::nullopt,
-    int64_t default_i64 = 42LL,
-    uint64_t just_u64 = 0,
+    int64_t default_i64 = 42LL, uint64_t just_u64 = 0,
     flatbuffers::Optional<uint64_t> maybe_u64 = flatbuffers::nullopt,
-    uint64_t default_u64 = 42ULL,
-    float just_f32 = 0.0f,
+    uint64_t default_u64 = 42ULL, float just_f32 = 0.0f,
     flatbuffers::Optional<float> maybe_f32 = flatbuffers::nullopt,
-    float default_f32 = 42.0f,
-    double just_f64 = 0.0,
+    float default_f32 = 42.0f, double just_f64 = 0.0,
     flatbuffers::Optional<double> maybe_f64 = flatbuffers::nullopt,
-    double default_f64 = 42.0,
-    bool just_bool = false,
+    double default_f64 = 42.0, bool just_bool = false,
     flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt,
     bool default_bool = true,
-    optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte::None,
-    flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt,
-    optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte::One) {
+    optional_scalars::OptionalByte just_enum =
+        optional_scalars::OptionalByte::None,
+    flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum =
+        flatbuffers::nullopt,
+    optional_scalars::OptionalByte default_enum =
+        optional_scalars::OptionalByte::One) {
   ScalarStuffBuilder builder_(_fbb);
   builder_.add_default_f64(default_f64);
-  if(maybe_f64) { builder_.add_maybe_f64(*maybe_f64); }
+  if (maybe_f64) {
+    builder_.add_maybe_f64(*maybe_f64);
+  }
   builder_.add_just_f64(just_f64);
   builder_.add_default_u64(default_u64);
-  if(maybe_u64) { builder_.add_maybe_u64(*maybe_u64); }
+  if (maybe_u64) {
+    builder_.add_maybe_u64(*maybe_u64);
+  }
   builder_.add_just_u64(just_u64);
   builder_.add_default_i64(default_i64);
-  if(maybe_i64) { builder_.add_maybe_i64(*maybe_i64); }
+  if (maybe_i64) {
+    builder_.add_maybe_i64(*maybe_i64);
+  }
   builder_.add_just_i64(just_i64);
   builder_.add_default_f32(default_f32);
-  if(maybe_f32) { builder_.add_maybe_f32(*maybe_f32); }
+  if (maybe_f32) {
+    builder_.add_maybe_f32(*maybe_f32);
+  }
   builder_.add_just_f32(just_f32);
   builder_.add_default_u32(default_u32);
-  if(maybe_u32) { builder_.add_maybe_u32(*maybe_u32); }
+  if (maybe_u32) {
+    builder_.add_maybe_u32(*maybe_u32);
+  }
   builder_.add_just_u32(just_u32);
   builder_.add_default_i32(default_i32);
-  if(maybe_i32) { builder_.add_maybe_i32(*maybe_i32); }
+  if (maybe_i32) {
+    builder_.add_maybe_i32(*maybe_i32);
+  }
   builder_.add_just_i32(just_i32);
   builder_.add_default_u16(default_u16);
-  if(maybe_u16) { builder_.add_maybe_u16(*maybe_u16); }
+  if (maybe_u16) {
+    builder_.add_maybe_u16(*maybe_u16);
+  }
   builder_.add_just_u16(just_u16);
   builder_.add_default_i16(default_i16);
-  if(maybe_i16) { builder_.add_maybe_i16(*maybe_i16); }
+  if (maybe_i16) {
+    builder_.add_maybe_i16(*maybe_i16);
+  }
   builder_.add_just_i16(just_i16);
   builder_.add_default_enum(default_enum);
-  if(maybe_enum) { builder_.add_maybe_enum(*maybe_enum); }
+  if (maybe_enum) {
+    builder_.add_maybe_enum(*maybe_enum);
+  }
   builder_.add_just_enum(just_enum);
   builder_.add_default_bool(default_bool);
-  if(maybe_bool) { builder_.add_maybe_bool(*maybe_bool); }
+  if (maybe_bool) {
+    builder_.add_maybe_bool(*maybe_bool);
+  }
   builder_.add_just_bool(just_bool);
   builder_.add_default_u8(default_u8);
-  if(maybe_u8) { builder_.add_maybe_u8(*maybe_u8); }
+  if (maybe_u8) {
+    builder_.add_maybe_u8(*maybe_u8);
+  }
   builder_.add_just_u8(just_u8);
   builder_.add_default_i8(default_i8);
-  if(maybe_i8) { builder_.add_maybe_i8(*maybe_i8); }
+  if (maybe_i8) {
+    builder_.add_maybe_i8(*maybe_i8);
+  }
   builder_.add_just_i8(just_i8);
   return builder_.Finish();
 }
@@ -599,63 +591,184 @@
   static auto constexpr Create = CreateScalarStuff;
 };
 
-flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
+flatbuffers::Offset<ScalarStuff> CreateScalarStuff(
+    flatbuffers::FlatBufferBuilder& _fbb, const ScalarStuffT* _o,
+    const flatbuffers::rehasher_function_t* _rehasher = nullptr);
 
-inline ScalarStuffT *ScalarStuff::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
+inline ScalarStuffT* ScalarStuff::UnPack(
+    const flatbuffers::resolver_function_t* _resolver) const {
   auto _o = std::make_unique<ScalarStuffT>();
   UnPackTo(_o.get(), _resolver);
   return _o.release();
 }
 
-inline void ScalarStuff::UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver) const {
+inline void ScalarStuff::UnPackTo(
+    ScalarStuffT* _o, const flatbuffers::resolver_function_t* _resolver) const {
   (void)_o;
   (void)_resolver;
-  { auto _e = just_i8(); _o->just_i8 = _e; }
-  { auto _e = maybe_i8(); _o->maybe_i8 = _e; }
-  { auto _e = default_i8(); _o->default_i8 = _e; }
-  { auto _e = just_u8(); _o->just_u8 = _e; }
-  { auto _e = maybe_u8(); _o->maybe_u8 = _e; }
-  { auto _e = default_u8(); _o->default_u8 = _e; }
-  { auto _e = just_i16(); _o->just_i16 = _e; }
-  { auto _e = maybe_i16(); _o->maybe_i16 = _e; }
-  { auto _e = default_i16(); _o->default_i16 = _e; }
-  { auto _e = just_u16(); _o->just_u16 = _e; }
-  { auto _e = maybe_u16(); _o->maybe_u16 = _e; }
-  { auto _e = default_u16(); _o->default_u16 = _e; }
-  { auto _e = just_i32(); _o->just_i32 = _e; }
-  { auto _e = maybe_i32(); _o->maybe_i32 = _e; }
-  { auto _e = default_i32(); _o->default_i32 = _e; }
-  { auto _e = just_u32(); _o->just_u32 = _e; }
-  { auto _e = maybe_u32(); _o->maybe_u32 = _e; }
-  { auto _e = default_u32(); _o->default_u32 = _e; }
-  { auto _e = just_i64(); _o->just_i64 = _e; }
-  { auto _e = maybe_i64(); _o->maybe_i64 = _e; }
-  { auto _e = default_i64(); _o->default_i64 = _e; }
-  { auto _e = just_u64(); _o->just_u64 = _e; }
-  { auto _e = maybe_u64(); _o->maybe_u64 = _e; }
-  { auto _e = default_u64(); _o->default_u64 = _e; }
-  { auto _e = just_f32(); _o->just_f32 = _e; }
-  { auto _e = maybe_f32(); _o->maybe_f32 = _e; }
-  { auto _e = default_f32(); _o->default_f32 = _e; }
-  { auto _e = just_f64(); _o->just_f64 = _e; }
-  { auto _e = maybe_f64(); _o->maybe_f64 = _e; }
-  { auto _e = default_f64(); _o->default_f64 = _e; }
-  { auto _e = just_bool(); _o->just_bool = _e; }
-  { auto _e = maybe_bool(); _o->maybe_bool = _e; }
-  { auto _e = default_bool(); _o->default_bool = _e; }
-  { auto _e = just_enum(); _o->just_enum = _e; }
-  { auto _e = maybe_enum(); _o->maybe_enum = _e; }
-  { auto _e = default_enum(); _o->default_enum = _e; }
+  {
+    auto _e = just_i8();
+    _o->just_i8 = _e;
+  }
+  {
+    auto _e = maybe_i8();
+    _o->maybe_i8 = _e;
+  }
+  {
+    auto _e = default_i8();
+    _o->default_i8 = _e;
+  }
+  {
+    auto _e = just_u8();
+    _o->just_u8 = _e;
+  }
+  {
+    auto _e = maybe_u8();
+    _o->maybe_u8 = _e;
+  }
+  {
+    auto _e = default_u8();
+    _o->default_u8 = _e;
+  }
+  {
+    auto _e = just_i16();
+    _o->just_i16 = _e;
+  }
+  {
+    auto _e = maybe_i16();
+    _o->maybe_i16 = _e;
+  }
+  {
+    auto _e = default_i16();
+    _o->default_i16 = _e;
+  }
+  {
+    auto _e = just_u16();
+    _o->just_u16 = _e;
+  }
+  {
+    auto _e = maybe_u16();
+    _o->maybe_u16 = _e;
+  }
+  {
+    auto _e = default_u16();
+    _o->default_u16 = _e;
+  }
+  {
+    auto _e = just_i32();
+    _o->just_i32 = _e;
+  }
+  {
+    auto _e = maybe_i32();
+    _o->maybe_i32 = _e;
+  }
+  {
+    auto _e = default_i32();
+    _o->default_i32 = _e;
+  }
+  {
+    auto _e = just_u32();
+    _o->just_u32 = _e;
+  }
+  {
+    auto _e = maybe_u32();
+    _o->maybe_u32 = _e;
+  }
+  {
+    auto _e = default_u32();
+    _o->default_u32 = _e;
+  }
+  {
+    auto _e = just_i64();
+    _o->just_i64 = _e;
+  }
+  {
+    auto _e = maybe_i64();
+    _o->maybe_i64 = _e;
+  }
+  {
+    auto _e = default_i64();
+    _o->default_i64 = _e;
+  }
+  {
+    auto _e = just_u64();
+    _o->just_u64 = _e;
+  }
+  {
+    auto _e = maybe_u64();
+    _o->maybe_u64 = _e;
+  }
+  {
+    auto _e = default_u64();
+    _o->default_u64 = _e;
+  }
+  {
+    auto _e = just_f32();
+    _o->just_f32 = _e;
+  }
+  {
+    auto _e = maybe_f32();
+    _o->maybe_f32 = _e;
+  }
+  {
+    auto _e = default_f32();
+    _o->default_f32 = _e;
+  }
+  {
+    auto _e = just_f64();
+    _o->just_f64 = _e;
+  }
+  {
+    auto _e = maybe_f64();
+    _o->maybe_f64 = _e;
+  }
+  {
+    auto _e = default_f64();
+    _o->default_f64 = _e;
+  }
+  {
+    auto _e = just_bool();
+    _o->just_bool = _e;
+  }
+  {
+    auto _e = maybe_bool();
+    _o->maybe_bool = _e;
+  }
+  {
+    auto _e = default_bool();
+    _o->default_bool = _e;
+  }
+  {
+    auto _e = just_enum();
+    _o->just_enum = _e;
+  }
+  {
+    auto _e = maybe_enum();
+    _o->maybe_enum = _e;
+  }
+  {
+    auto _e = default_enum();
+    _o->default_enum = _e;
+  }
 }
 
-inline flatbuffers::Offset<ScalarStuff> ScalarStuff::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
+inline flatbuffers::Offset<ScalarStuff> ScalarStuff::Pack(
+    flatbuffers::FlatBufferBuilder& _fbb, const ScalarStuffT* _o,
+    const flatbuffers::rehasher_function_t* _rehasher) {
   return CreateScalarStuff(_fbb, _o, _rehasher);
 }
 
-inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
+inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(
+    flatbuffers::FlatBufferBuilder& _fbb, const ScalarStuffT* _o,
+    const flatbuffers::rehasher_function_t* _rehasher) {
   (void)_rehasher;
   (void)_o;
-  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ScalarStuffT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
+  struct _VectorArgs {
+    flatbuffers::FlatBufferBuilder* __fbb;
+    const ScalarStuffT* __o;
+    const flatbuffers::rehasher_function_t* __rehasher;
+  } _va = {&_fbb, _o, _rehasher};
+  (void)_va;
   auto _just_i8 = _o->just_i8;
   auto _maybe_i8 = _o->maybe_i8;
   auto _default_i8 = _o->default_i8;
@@ -693,208 +806,125 @@
   auto _maybe_enum = _o->maybe_enum;
   auto _default_enum = _o->default_enum;
   return optional_scalars::CreateScalarStuff(
-      _fbb,
-      _just_i8,
-      _maybe_i8,
-      _default_i8,
-      _just_u8,
-      _maybe_u8,
-      _default_u8,
-      _just_i16,
-      _maybe_i16,
-      _default_i16,
-      _just_u16,
-      _maybe_u16,
-      _default_u16,
-      _just_i32,
-      _maybe_i32,
-      _default_i32,
-      _just_u32,
-      _maybe_u32,
-      _default_u32,
-      _just_i64,
-      _maybe_i64,
-      _default_i64,
-      _just_u64,
-      _maybe_u64,
-      _default_u64,
-      _just_f32,
-      _maybe_f32,
-      _default_f32,
-      _just_f64,
-      _maybe_f64,
-      _default_f64,
-      _just_bool,
-      _maybe_bool,
-      _default_bool,
-      _just_enum,
-      _maybe_enum,
+      _fbb, _just_i8, _maybe_i8, _default_i8, _just_u8, _maybe_u8, _default_u8,
+      _just_i16, _maybe_i16, _default_i16, _just_u16, _maybe_u16, _default_u16,
+      _just_i32, _maybe_i32, _default_i32, _just_u32, _maybe_u32, _default_u32,
+      _just_i64, _maybe_i64, _default_i64, _just_u64, _maybe_u64, _default_u64,
+      _just_f32, _maybe_f32, _default_f32, _just_f64, _maybe_f64, _default_f64,
+      _just_bool, _maybe_bool, _default_bool, _just_enum, _maybe_enum,
       _default_enum);
 }
 
-inline const flatbuffers::TypeTable *OptionalByteTypeTable() {
+inline const flatbuffers::TypeTable* OptionalByteTypeTable() {
   static const flatbuffers::TypeCode type_codes[] = {
-    { flatbuffers::ET_CHAR, 0, 0 },
-    { flatbuffers::ET_CHAR, 0, 0 },
-    { flatbuffers::ET_CHAR, 0, 0 }
-  };
+      {flatbuffers::ET_CHAR, 0, 0},
+      {flatbuffers::ET_CHAR, 0, 0},
+      {flatbuffers::ET_CHAR, 0, 0}};
   static const flatbuffers::TypeFunction type_refs[] = {
-    optional_scalars::OptionalByteTypeTable
-  };
-  static const char * const names[] = {
-    "None",
-    "One",
-    "Two"
-  };
+      optional_scalars::OptionalByteTypeTable};
+  static const char* const names[] = {"None", "One", "Two"};
   static const flatbuffers::TypeTable tt = {
-    flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names
-  };
+      flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names};
   return &tt;
 }
 
-inline const flatbuffers::TypeTable *ScalarStuffTypeTable() {
+inline const flatbuffers::TypeTable* ScalarStuffTypeTable() {
   static const flatbuffers::TypeCode type_codes[] = {
-    { flatbuffers::ET_CHAR, 0, -1 },
-    { flatbuffers::ET_CHAR, 0, -1 },
-    { flatbuffers::ET_CHAR, 0, -1 },
-    { flatbuffers::ET_UCHAR, 0, -1 },
-    { flatbuffers::ET_UCHAR, 0, -1 },
-    { flatbuffers::ET_UCHAR, 0, -1 },
-    { flatbuffers::ET_SHORT, 0, -1 },
-    { flatbuffers::ET_SHORT, 0, -1 },
-    { flatbuffers::ET_SHORT, 0, -1 },
-    { flatbuffers::ET_USHORT, 0, -1 },
-    { flatbuffers::ET_USHORT, 0, -1 },
-    { flatbuffers::ET_USHORT, 0, -1 },
-    { flatbuffers::ET_INT, 0, -1 },
-    { flatbuffers::ET_INT, 0, -1 },
-    { flatbuffers::ET_INT, 0, -1 },
-    { flatbuffers::ET_UINT, 0, -1 },
-    { flatbuffers::ET_UINT, 0, -1 },
-    { flatbuffers::ET_UINT, 0, -1 },
-    { flatbuffers::ET_LONG, 0, -1 },
-    { flatbuffers::ET_LONG, 0, -1 },
-    { flatbuffers::ET_LONG, 0, -1 },
-    { flatbuffers::ET_ULONG, 0, -1 },
-    { flatbuffers::ET_ULONG, 0, -1 },
-    { flatbuffers::ET_ULONG, 0, -1 },
-    { flatbuffers::ET_FLOAT, 0, -1 },
-    { flatbuffers::ET_FLOAT, 0, -1 },
-    { flatbuffers::ET_FLOAT, 0, -1 },
-    { flatbuffers::ET_DOUBLE, 0, -1 },
-    { flatbuffers::ET_DOUBLE, 0, -1 },
-    { flatbuffers::ET_DOUBLE, 0, -1 },
-    { flatbuffers::ET_BOOL, 0, -1 },
-    { flatbuffers::ET_BOOL, 0, -1 },
-    { flatbuffers::ET_BOOL, 0, -1 },
-    { flatbuffers::ET_CHAR, 0, 0 },
-    { flatbuffers::ET_CHAR, 0, 0 },
-    { flatbuffers::ET_CHAR, 0, 0 }
-  };
+      {flatbuffers::ET_CHAR, 0, -1},   {flatbuffers::ET_CHAR, 0, -1},
+      {flatbuffers::ET_CHAR, 0, -1},   {flatbuffers::ET_UCHAR, 0, -1},
+      {flatbuffers::ET_UCHAR, 0, -1},  {flatbuffers::ET_UCHAR, 0, -1},
+      {flatbuffers::ET_SHORT, 0, -1},  {flatbuffers::ET_SHORT, 0, -1},
+      {flatbuffers::ET_SHORT, 0, -1},  {flatbuffers::ET_USHORT, 0, -1},
+      {flatbuffers::ET_USHORT, 0, -1}, {flatbuffers::ET_USHORT, 0, -1},
+      {flatbuffers::ET_INT, 0, -1},    {flatbuffers::ET_INT, 0, -1},
+      {flatbuffers::ET_INT, 0, -1},    {flatbuffers::ET_UINT, 0, -1},
+      {flatbuffers::ET_UINT, 0, -1},   {flatbuffers::ET_UINT, 0, -1},
+      {flatbuffers::ET_LONG, 0, -1},   {flatbuffers::ET_LONG, 0, -1},
+      {flatbuffers::ET_LONG, 0, -1},   {flatbuffers::ET_ULONG, 0, -1},
+      {flatbuffers::ET_ULONG, 0, -1},  {flatbuffers::ET_ULONG, 0, -1},
+      {flatbuffers::ET_FLOAT, 0, -1},  {flatbuffers::ET_FLOAT, 0, -1},
+      {flatbuffers::ET_FLOAT, 0, -1},  {flatbuffers::ET_DOUBLE, 0, -1},
+      {flatbuffers::ET_DOUBLE, 0, -1}, {flatbuffers::ET_DOUBLE, 0, -1},
+      {flatbuffers::ET_BOOL, 0, -1},   {flatbuffers::ET_BOOL, 0, -1},
+      {flatbuffers::ET_BOOL, 0, -1},   {flatbuffers::ET_CHAR, 0, 0},
+      {flatbuffers::ET_CHAR, 0, 0},    {flatbuffers::ET_CHAR, 0, 0}};
   static const flatbuffers::TypeFunction type_refs[] = {
-    optional_scalars::OptionalByteTypeTable
-  };
-  static const char * const names[] = {
-    "just_i8",
-    "maybe_i8",
-    "default_i8",
-    "just_u8",
-    "maybe_u8",
-    "default_u8",
-    "just_i16",
-    "maybe_i16",
-    "default_i16",
-    "just_u16",
-    "maybe_u16",
-    "default_u16",
-    "just_i32",
-    "maybe_i32",
-    "default_i32",
-    "just_u32",
-    "maybe_u32",
-    "default_u32",
-    "just_i64",
-    "maybe_i64",
-    "default_i64",
-    "just_u64",
-    "maybe_u64",
-    "default_u64",
-    "just_f32",
-    "maybe_f32",
-    "default_f32",
-    "just_f64",
-    "maybe_f64",
-    "default_f64",
-    "just_bool",
-    "maybe_bool",
-    "default_bool",
-    "just_enum",
-    "maybe_enum",
-    "default_enum"
-  };
-  static const flatbuffers::TypeTable tt = {
-    flatbuffers::ST_TABLE, 36, type_codes, type_refs, nullptr, nullptr, names
-  };
+      optional_scalars::OptionalByteTypeTable};
+  static const char* const names[] = {
+      "just_i8",      "maybe_i8",    "default_i8",  "just_u8",
+      "maybe_u8",     "default_u8",  "just_i16",    "maybe_i16",
+      "default_i16",  "just_u16",    "maybe_u16",   "default_u16",
+      "just_i32",     "maybe_i32",   "default_i32", "just_u32",
+      "maybe_u32",    "default_u32", "just_i64",    "maybe_i64",
+      "default_i64",  "just_u64",    "maybe_u64",   "default_u64",
+      "just_f32",     "maybe_f32",   "default_f32", "just_f64",
+      "maybe_f64",    "default_f64", "just_bool",   "maybe_bool",
+      "default_bool", "just_enum",   "maybe_enum",  "default_enum"};
+  static const flatbuffers::TypeTable tt = {flatbuffers::ST_TABLE,
+                                            36,
+                                            type_codes,
+                                            type_refs,
+                                            nullptr,
+                                            nullptr,
+                                            names};
   return &tt;
 }
 
-inline const optional_scalars::ScalarStuff *GetScalarStuff(const void *buf) {
+inline const optional_scalars::ScalarStuff* GetScalarStuff(const void* buf) {
   return flatbuffers::GetRoot<optional_scalars::ScalarStuff>(buf);
 }
 
-inline const optional_scalars::ScalarStuff *GetSizePrefixedScalarStuff(const void *buf) {
+inline const optional_scalars::ScalarStuff* GetSizePrefixedScalarStuff(
+    const void* buf) {
   return flatbuffers::GetSizePrefixedRoot<optional_scalars::ScalarStuff>(buf);
 }
 
-inline ScalarStuff *GetMutableScalarStuff(void *buf) {
+inline ScalarStuff* GetMutableScalarStuff(void* buf) {
   return flatbuffers::GetMutableRoot<ScalarStuff>(buf);
 }
 
-inline const char *ScalarStuffIdentifier() {
-  return "NULL";
+inline const char* ScalarStuffIdentifier() { return "NULL"; }
+
+inline bool ScalarStuffBufferHasIdentifier(const void* buf) {
+  return flatbuffers::BufferHasIdentifier(buf, ScalarStuffIdentifier());
 }
 
-inline bool ScalarStuffBufferHasIdentifier(const void *buf) {
-  return flatbuffers::BufferHasIdentifier(
-      buf, ScalarStuffIdentifier());
-}
-
-inline bool VerifyScalarStuffBuffer(
-    flatbuffers::Verifier &verifier) {
-  return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
+inline bool VerifyScalarStuffBuffer(flatbuffers::Verifier& verifier) {
+  return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(
+      ScalarStuffIdentifier());
 }
 
 inline bool VerifySizePrefixedScalarStuffBuffer(
-    flatbuffers::Verifier &verifier) {
-  return verifier.VerifySizePrefixedBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
+    flatbuffers::Verifier& verifier) {
+  return verifier.VerifySizePrefixedBuffer<optional_scalars::ScalarStuff>(
+      ScalarStuffIdentifier());
 }
 
-inline const char *ScalarStuffExtension() {
-  return "mon";
-}
+inline const char* ScalarStuffExtension() { return "mon"; }
 
 inline void FinishScalarStuffBuffer(
-    flatbuffers::FlatBufferBuilder &fbb,
+    flatbuffers::FlatBufferBuilder& fbb,
     flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
   fbb.Finish(root, ScalarStuffIdentifier());
 }
 
 inline void FinishSizePrefixedScalarStuffBuffer(
-    flatbuffers::FlatBufferBuilder &fbb,
+    flatbuffers::FlatBufferBuilder& fbb,
     flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
   fbb.FinishSizePrefixed(root, ScalarStuffIdentifier());
 }
 
 inline std::unique_ptr<optional_scalars::ScalarStuffT> UnPackScalarStuff(
-    const void *buf,
-    const flatbuffers::resolver_function_t *res = nullptr) {
-  return std::unique_ptr<optional_scalars::ScalarStuffT>(GetScalarStuff(buf)->UnPack(res));
+    const void* buf, const flatbuffers::resolver_function_t* res = nullptr) {
+  return std::unique_ptr<optional_scalars::ScalarStuffT>(
+      GetScalarStuff(buf)->UnPack(res));
 }
 
-inline std::unique_ptr<optional_scalars::ScalarStuffT> UnPackSizePrefixedScalarStuff(
-    const void *buf,
-    const flatbuffers::resolver_function_t *res = nullptr) {
-  return std::unique_ptr<optional_scalars::ScalarStuffT>(GetSizePrefixedScalarStuff(buf)->UnPack(res));
+inline std::unique_ptr<optional_scalars::ScalarStuffT>
+UnPackSizePrefixedScalarStuff(
+    const void* buf, const flatbuffers::resolver_function_t* res = nullptr) {
+  return std::unique_ptr<optional_scalars::ScalarStuffT>(
+      GetSizePrefixedScalarStuff(buf)->UnPack(res));
 }
 
 }  // namespace optional_scalars
diff --git a/tests/cpp17/stringify_util.h b/tests/cpp17/stringify_util.h
index e2e7e22..61e643c 100644
--- a/tests/cpp17/stringify_util.h
+++ b/tests/cpp17/stringify_util.h
@@ -32,57 +32,60 @@
 namespace cpp17 {
 
 // User calls this; need to forward declare it since it is called recursively.
-template<typename T>
+template <typename T>
 std::optional<std::string> StringifyFlatbufferValue(
-    T &&val, const std::string &indent = "");
+    T&& val, const std::string& indent = "");
 
 namespace detail {
 
 /*******************************************************************************
 ** Metaprogramming helpers for detecting Flatbuffers Tables, Structs, & Vectors.
 *******************************************************************************/
-template<typename FBS, typename = void>
+template <typename FBS, typename = void>
 struct is_flatbuffers_table_or_struct : std::false_type {};
 
 // We know it's a table or struct when it has a Traits subclass.
-template<typename FBS>
+template <typename FBS>
 struct is_flatbuffers_table_or_struct<FBS, std::void_t<typename FBS::Traits>>
     : std::true_type {};
 
-template<typename FBS>
+template <typename FBS>
 inline constexpr bool is_flatbuffers_table_or_struct_v =
     is_flatbuffers_table_or_struct<FBS>::value;
 
-template<typename T> struct is_flatbuffers_vector : std::false_type {};
+template <typename T>
+struct is_flatbuffers_vector : std::false_type {};
 
-template<typename T>
+template <typename T>
 struct is_flatbuffers_vector<flatbuffers::Vector<T>> : std::true_type {};
 
-template<typename T>
+template <typename T>
 inline constexpr bool is_flatbuffers_vector_v = is_flatbuffers_vector<T>::value;
 
 /*******************************************************************************
 ** Compile-time Iteration & Recursive Stringification over Flatbuffers types.
 *******************************************************************************/
-template<size_t Index, typename FBS>
-std::string AddStringifiedField(const FBS &fbs, const std::string &indent) {
+template <size_t Index, typename FBS>
+std::string AddStringifiedField(const FBS& fbs, const std::string& indent) {
   auto value_string =
       StringifyFlatbufferValue(fbs.template get_field<Index>(), indent);
-  if (!value_string) { return ""; }
+  if (!value_string) {
+    return "";
+  }
   return indent + FBS::Traits::field_names[Index] + " = " + *value_string +
          "\n";
 }
 
-template<typename FBS, size_t... Indexes>
-std::string StringifyTableOrStructImpl(const FBS &fbs,
-                                       const std::string &indent,
+template <typename FBS, size_t... Indexes>
+std::string StringifyTableOrStructImpl(const FBS& fbs,
+                                       const std::string& indent,
                                        std::index_sequence<Indexes...>) {
   // This line is where the compile-time iteration happens!
   return (AddStringifiedField<Indexes>(fbs, indent) + ...);
 }
 
-template<typename FBS>
-std::string StringifyTableOrStruct(const FBS &fbs, const std::string &indent) {
+template <typename FBS>
+std::string StringifyTableOrStruct(const FBS& fbs, const std::string& indent) {
   (void)fbs;
   (void)indent;
   static constexpr size_t field_count = FBS::Traits::fields_number;
@@ -96,9 +99,9 @@
   return out;
 }
 
-template<typename T>
-std::string StringifyVector(const flatbuffers::Vector<T> &vec,
-                            const std::string &indent) {
+template <typename T>
+std::string StringifyVector(const flatbuffers::Vector<T>& vec,
+                            const std::string& indent) {
   const auto prologue = indent + std::string("  ");
   const auto epilogue = std::string(",\n");
   std::string text;
@@ -115,7 +118,8 @@
   return text;
 }
 
-template<typename T> std::string StringifyArithmeticType(T val) {
+template <typename T>
+std::string StringifyArithmeticType(T val) {
   return flatbuffers::NumToString(val);
 }
 
@@ -124,9 +128,9 @@
 /*******************************************************************************
 ** Take any flatbuffer type (table, struct, Vector, int...) and stringify it.
 *******************************************************************************/
-template<typename T>
-std::optional<std::string> StringifyFlatbufferValue(T &&val,
-                                                    const std::string &indent) {
+template <typename T>
+std::optional<std::string> StringifyFlatbufferValue(T&& val,
+                                                    const std::string& indent) {
   (void)indent;
   constexpr bool is_pointer = std::is_pointer_v<std::remove_reference_t<T>>;
   if constexpr (is_pointer) {
diff --git a/tests/evolution_test.h b/tests/evolution_test.h
index 3933c3b..496e41f 100644
--- a/tests/evolution_test.h
+++ b/tests/evolution_test.h
@@ -6,9 +6,9 @@
 namespace flatbuffers {
 namespace tests {
 
-void EvolutionTest(const std::string &tests_data_path);
+void EvolutionTest(const std::string& tests_data_path);
 void ConformTest();
-void UnionDeprecationTest(const std::string &tests_data_path);
+void UnionDeprecationTest(const std::string& tests_data_path);
 
 }  // namespace tests
 }  // namespace flatbuffers
diff --git a/tests/flatc/flatc_cpp_tests.py b/tests/flatc/flatc_cpp_tests.py
index 72b2e9d..de00346 100755
--- a/tests/flatc/flatc_cpp_tests.py
+++ b/tests/flatc/flatc_cpp_tests.py
@@ -16,239 +16,246 @@
 
 
 class CppTests:
-    def Flatten(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", "foo.fbs"])
 
-        # Foo should be generated in place and include bar flatten
-        assert_file_and_contents("foo_generated.h", '#include "bar_generated.h"')
+  def Flatten(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", "foo.fbs"])
 
-    def FlattenAbsolutePath(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", make_absolute("foo.fbs")])
+    # Foo should be generated in place and include bar flatten
+    assert_file_and_contents("foo_generated.h", '#include "bar_generated.h"')
 
-        # Foo should be generated in place and include bar flatten
-        assert_file_and_contents("foo_generated.h", '#include "bar_generated.h"')
+  def FlattenAbsolutePath(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", make_absolute("foo.fbs")])
 
-    def FlattenSubDirectory(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", "bar/bar.fbs"])
+    # Foo should be generated in place and include bar flatten
+    assert_file_and_contents("foo_generated.h", '#include "bar_generated.h"')
 
-        # Bar should be generated in place and include baz
-        assert_file_and_contents("bar_generated.h", '#include "baz_generated.h"')
+  def FlattenSubDirectory(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", "bar/bar.fbs"])
 
-    def FlattenOutPath(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", "-o", ".tmp", "foo.fbs"])
+    # Bar should be generated in place and include baz
+    assert_file_and_contents("bar_generated.h", '#include "baz_generated.h"')
 
-        # Foo should be generated in the out path and include bar flatten to the out path.
-        assert_file_and_contents(".tmp/foo_generated.h", '#include "bar_generated.h"')
+  def FlattenOutPath(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", "-o", ".tmp", "foo.fbs"])
 
-    def FlattenOutPathSuperDirectory(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", "-o", "../.tmp", "foo.fbs"])
+    # Foo should be generated in the out path and include bar flatten to the out path.
+    assert_file_and_contents(
+        ".tmp/foo_generated.h", '#include "bar_generated.h"'
+    )
 
-        # Foo should be generated in the out path and include bar flatten to the out path.
-        assert_file_and_contents(
-            "../.tmp/foo_generated.h", '#include "bar_generated.h"'
-        )
+  def FlattenOutPathSuperDirectory(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", "-o", "../.tmp", "foo.fbs"])
 
-    def FlattenOutPathSubDirectory(self):
-        # Generate just foo with a "flatten" import of bar.
-        flatc(["--cpp", "-o", ".tmp", "bar/bar.fbs"])
+    # Foo should be generated in the out path and include bar flatten to the out path.
+    assert_file_and_contents(
+        "../.tmp/foo_generated.h", '#include "bar_generated.h"'
+    )
 
-        # Bar should be generated in the out path and include baz flatten to the out path.
-        assert_file_and_contents(".tmp/bar_generated.h", '#include "baz_generated.h"')
+  def FlattenOutPathSubDirectory(self):
+    # Generate just foo with a "flatten" import of bar.
+    flatc(["--cpp", "-o", ".tmp", "bar/bar.fbs"])
 
-    def KeepPrefix(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "foo.fbs"])
+    # Bar should be generated in the out path and include baz flatten to the out path.
+    assert_file_and_contents(
+        ".tmp/bar_generated.h", '#include "baz_generated.h"'
+    )
 
-        assert_file_and_contents("foo_generated.h", '#include "bar/bar_generated.h"')
+  def KeepPrefix(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "foo.fbs"])
 
-    def KeepPrefixAbsolutePath(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", make_absolute("foo.fbs")])
+    assert_file_and_contents(
+        "foo_generated.h", '#include "bar/bar_generated.h"'
+    )
 
-        assert_file_and_contents("foo_generated.h", '#include "bar/bar_generated.h"')
+  def KeepPrefixAbsolutePath(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", make_absolute("foo.fbs")])
 
-    def KeepPrefixSubDirectory(self):
-        # Generate with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "bar/bar.fbs"])
+    assert_file_and_contents(
+        "foo_generated.h", '#include "bar/bar_generated.h"'
+    )
 
-        assert_file_and_contents("bar_generated.h", '#include "baz/baz_generated.h"')
+  def KeepPrefixSubDirectory(self):
+    # Generate with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "bar/bar.fbs"])
 
-    def KeepPrefixOutPath(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "-o", ".tmp", "foo.fbs"])
+    assert_file_and_contents(
+        "bar_generated.h", '#include "baz/baz_generated.h"'
+    )
 
-        assert_file_and_contents(
-            ".tmp/foo_generated.h",
-            '#include "bar/bar_generated.h"',
-        )
+  def KeepPrefixOutPath(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "-o", ".tmp", "foo.fbs"])
 
-    def KeepPrefixOutPathSubDirectory(self):
-        # Generate with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "-o", ".tmp", "bar/bar.fbs"])
+    assert_file_and_contents(
+        ".tmp/foo_generated.h",
+        '#include "bar/bar_generated.h"',
+    )
 
-        assert_file_and_contents(
-            ".tmp/bar_generated.h", '#include "baz/baz_generated.h"'
-        )
+  def KeepPrefixOutPathSubDirectory(self):
+    # Generate with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "-o", ".tmp", "bar/bar.fbs"])
 
-    def IncludePrefix(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--include-prefix", "test", "foo.fbs"])
+    assert_file_and_contents(
+        ".tmp/bar_generated.h", '#include "baz/baz_generated.h"'
+    )
 
-        assert_file_and_contents("foo_generated.h", '#include "test/bar_generated.h"')
+  def IncludePrefix(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--include-prefix", "test", "foo.fbs"])
 
-    def IncludePrefixAbolutePath(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--include-prefix", "test", make_absolute("foo.fbs")])
+    assert_file_and_contents(
+        "foo_generated.h", '#include "test/bar_generated.h"'
+    )
 
-        assert_file_and_contents("foo_generated.h", '#include "test/bar_generated.h"')
+  def IncludePrefixAbolutePath(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--include-prefix", "test", make_absolute("foo.fbs")])
 
-    def IncludePrefixSubDirectory(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--include-prefix", "test", "bar/bar.fbs"])
+    assert_file_and_contents(
+        "foo_generated.h", '#include "test/bar_generated.h"'
+    )
 
-        assert_file_and_contents("bar_generated.h", '#include "test/baz_generated.h"')
+  def IncludePrefixSubDirectory(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--include-prefix", "test", "bar/bar.fbs"])
 
-    def IncludePrefixOutPath(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--include-prefix", "test", "-o", ".tmp", "foo.fbs"])
+    assert_file_and_contents(
+        "bar_generated.h", '#include "test/baz_generated.h"'
+    )
 
-        assert_file_and_contents(
-            ".tmp/foo_generated.h", '#include "test/bar_generated.h"'
-        )
+  def IncludePrefixOutPath(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--include-prefix", "test", "-o", ".tmp", "foo.fbs"])
 
-    def IncludePrefixOutPathSubDirectory(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--include-prefix", "test", "-o", ".tmp", "bar/bar.fbs"])
+    assert_file_and_contents(
+        ".tmp/foo_generated.h", '#include "test/bar_generated.h"'
+    )
 
-        assert_file_and_contents(
-            ".tmp/bar_generated.h", '#include "test/baz_generated.h"'
-        )
+  def IncludePrefixOutPathSubDirectory(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--include-prefix", "test", "-o", ".tmp", "bar/bar.fbs"])
 
-    def KeepPrefixIncludePrefix(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "--include-prefix", "test", "foo.fbs"])
+    assert_file_and_contents(
+        ".tmp/bar_generated.h", '#include "test/baz_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            "foo_generated.h", '#include "test/bar/bar_generated.h"'
-        )
+  def KeepPrefixIncludePrefix(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "--include-prefix", "test", "foo.fbs"])
 
-    def KeepPrefixIncludePrefixAbsolutePath(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(
-            [
-                "--cpp",
-                "--keep-prefix",
-                "--include-prefix",
-                "test",
-                make_absolute("foo.fbs"),
-            ]
-        )
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        "foo_generated.h", '#include "test/bar/bar_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            "foo_generated.h", '#include "test/bar/bar_generated.h"'
-        )
+  def KeepPrefixIncludePrefixAbsolutePath(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc([
+        "--cpp",
+        "--keep-prefix",
+        "--include-prefix",
+        "test",
+        make_absolute("foo.fbs"),
+    ])
 
-    def KeepPrefixIncludePrefixSubDirectory(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(["--cpp", "--keep-prefix", "--include-prefix", "test", "bar/bar.fbs"])
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        "foo_generated.h", '#include "test/bar/bar_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            "bar_generated.h", '#include "test/baz/baz_generated.h"'
-        )
+  def KeepPrefixIncludePrefixSubDirectory(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc(["--cpp", "--keep-prefix", "--include-prefix", "test", "bar/bar.fbs"])
 
-    def KeepPrefixIncludePrefixOutPathSubDirectory(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(
-            [
-                "--cpp",
-                "--keep-prefix",
-                "--include-prefix",
-                "test",
-                "-o",
-                ".tmp",
-                "bar/bar.fbs",
-            ]
-        )
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        "bar_generated.h", '#include "test/baz/baz_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            ".tmp/bar_generated.h", '#include "test/baz/baz_generated.h"'
-        )
+  def KeepPrefixIncludePrefixOutPathSubDirectory(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc([
+        "--cpp",
+        "--keep-prefix",
+        "--include-prefix",
+        "test",
+        "-o",
+        ".tmp",
+        "bar/bar.fbs",
+    ])
 
-    def KeepPrefixIncludePrefixOutPathSuperDirectory(self):
-        # Generate just foo with the import of bar keeping the prefix of where it is located.
-        flatc(
-            [
-                "--cpp",
-                "--keep-prefix",
-                "--include-prefix",
-                "test",
-                "-o",
-                "../.tmp",
-                "bar/bar.fbs",
-            ]
-        )
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        ".tmp/bar_generated.h", '#include "test/baz/baz_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            "../.tmp/bar_generated.h", '#include "test/baz/baz_generated.h"'
-        )
+  def KeepPrefixIncludePrefixOutPathSuperDirectory(self):
+    # Generate just foo with the import of bar keeping the prefix of where it is located.
+    flatc([
+        "--cpp",
+        "--keep-prefix",
+        "--include-prefix",
+        "test",
+        "-o",
+        "../.tmp",
+        "bar/bar.fbs",
+    ])
 
-    def KeepPrefixIncludePrefixoutPathAbsoluePaths_SuperDirectoryReference(self):
-        # Generate bar_with_foo that references a type in a super directory.
-        flatc(
-            [
-                "--cpp",
-                "--keep-prefix",
-                "--include-prefix",
-                "generated",
-                "-I",
-                str(script_path.absolute()),
-                "-o",
-                str(Path(script_path, ".tmp").absolute()),
-                str(Path(script_path, "bar/bar_with_foo.fbs").absolute()),
-            ]
-        )
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        "../.tmp/bar_generated.h", '#include "test/baz/baz_generated.h"'
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            ".tmp/bar_with_foo_generated.h",
-            [
-                '#include "generated/baz/baz_generated.h"',
-                '#include "generated/foo_generated.h"',
-            ],
-        )
+  def KeepPrefixIncludePrefixoutPathAbsoluePaths_SuperDirectoryReference(self):
+    # Generate bar_with_foo that references a type in a super directory.
+    flatc([
+        "--cpp",
+        "--keep-prefix",
+        "--include-prefix",
+        "generated",
+        "-I",
+        str(script_path.absolute()),
+        "-o",
+        str(Path(script_path, ".tmp").absolute()),
+        str(Path(script_path, "bar/bar_with_foo.fbs").absolute()),
+    ])
 
-    def KeepPrefixIncludePrefixoutPath_SuperDirectoryReference(self):
-        # Generate bar_with_foo that references a type in a super directory.
-        flatc(
-            [
-                "--cpp",
-                "--keep-prefix",
-                "--include-prefix",
-                "generated",
-                "-I",
-                "./",
-                "-o",
-                ".tmp",
-                "bar/bar_with_foo.fbs",
-            ]
-        )
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        ".tmp/bar_with_foo_generated.h",
+        [
+            '#include "generated/baz/baz_generated.h"',
+            '#include "generated/foo_generated.h"',
+        ],
+    )
 
-        # The include prefix should come first, with the kept prefix next.
-        assert_file_and_contents(
-            ".tmp/bar_with_foo_generated.h",
-            [
-                '#include "generated/baz/baz_generated.h"',
-                '#include "generated/foo_generated.h"',
-            ],
-            unlink=False,
-        )
+  def KeepPrefixIncludePrefixoutPath_SuperDirectoryReference(self):
+    # Generate bar_with_foo that references a type in a super directory.
+    flatc([
+        "--cpp",
+        "--keep-prefix",
+        "--include-prefix",
+        "generated",
+        "-I",
+        "./",
+        "-o",
+        ".tmp",
+        "bar/bar_with_foo.fbs",
+    ])
+
+    # The include prefix should come first, with the kept prefix next.
+    assert_file_and_contents(
+        ".tmp/bar_with_foo_generated.h",
+        [
+            '#include "generated/baz/baz_generated.h"',
+            '#include "generated/foo_generated.h"',
+        ],
+        unlink=False,
+    )
diff --git a/tests/flatc/flatc_kotlin_tests.py b/tests/flatc/flatc_kotlin_tests.py
index bca3cba..87342e3 100644
--- a/tests/flatc/flatc_kotlin_tests.py
+++ b/tests/flatc/flatc_kotlin_tests.py
@@ -17,16 +17,20 @@
 
 class KotlinTests:
 
-    def EnumValAttributes(self):
-        flatc(["--kotlin", "enum_val_attributes.fbs"])
+  def EnumValAttributes(self):
+    flatc(["--kotlin", "enum_val_attributes.fbs"])
 
-        subject = assert_file_exists("ValAttributes.kt")
-        assert_file_doesnt_contains(subject, 'val names : Array<String> = arrayOf("Val1", "Val2", "Val3")')
-        assert_file_doesnt_contains(subject, 'fun name(e: Int) : String = names[e]')
+    subject = assert_file_exists("ValAttributes.kt")
+    assert_file_doesnt_contains(
+        subject, 'val names : Array<String> = arrayOf("Val1", "Val2", "Val3")'
+    )
+    assert_file_doesnt_contains(subject, "fun name(e: Int) : String = names[e]")
 
-    def EnumValAttributes_ReflectNames(self):
-        flatc(["--kotlin", "--reflect-names", "enum_val_attributes.fbs"])
+  def EnumValAttributes_ReflectNames(self):
+    flatc(["--kotlin", "--reflect-names", "enum_val_attributes.fbs"])
 
-        subject = assert_file_exists("ValAttributes.kt")
-        assert_file_contains(subject, 'val names : Array<String> = arrayOf("Val1", "Val2", "Val3")')
-        assert_file_contains(subject, 'fun name(e: Int) : String = names[e]')
+    subject = assert_file_exists("ValAttributes.kt")
+    assert_file_contains(
+        subject, 'val names : Array<String> = arrayOf("Val1", "Val2", "Val3")'
+    )
+    assert_file_contains(subject, "fun name(e: Int) : String = names[e]")
diff --git a/tests/flatc/flatc_schema_tests.py b/tests/flatc/flatc_schema_tests.py
index e79bb3c..ebd5a79 100644
--- a/tests/flatc/flatc_schema_tests.py
+++ b/tests/flatc/flatc_schema_tests.py
@@ -12,32 +12,62 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from flatc_test import *
 import json
+from flatc_test import *
 
 
 class SchemaTests:
-    def EnumValAttributes(self):
-        # Generate .bfbs schema first
-        flatc(["--schema", "--binary", "--bfbs-builtins", "enum_val_attributes.fbs"])
-        assert_file_exists("enum_val_attributes.bfbs")
 
-        # Then turn it into JSON
-        flatc(["--json", "--strict-json", str(reflection_fbs_path()), "--", "enum_val_attributes.bfbs"])
+  def EnumValAttributes(self):
+    # Generate .bfbs schema first
+    flatc(
+        ["--schema", "--binary", "--bfbs-builtins", "enum_val_attributes.fbs"]
+    )
+    assert_file_exists("enum_val_attributes.bfbs")
 
-        # The attributes should be present in JSON
-        schema_json = json.loads(get_file_contents("enum_val_attributes.json"))
+    # Then turn it into JSON
+    flatc([
+        "--json",
+        "--strict-json",
+        str(reflection_fbs_path()),
+        "--",
+        "enum_val_attributes.bfbs",
+    ])
 
-        assert schema_json["enums"][0]["name"] == "ValAttributes"
-        assert schema_json["enums"][0]["values"][0]["name"] == "Val1"
-        assert schema_json["enums"][0]["values"][0]["attributes"][0]["key"] == "display_name"
-        assert schema_json["enums"][0]["values"][0]["attributes"][0]["value"] == "Value 1"
+    # The attributes should be present in JSON
+    schema_json = json.loads(get_file_contents("enum_val_attributes.json"))
 
-        assert schema_json["enums"][0]["values"][1]["name"] == "Val2"
-        assert schema_json["enums"][0]["values"][1]["attributes"][0]["key"] == "display_name"
-        assert schema_json["enums"][0]["values"][1]["attributes"][0]["value"] == "Value 2"
+    assert schema_json["enums"][0]["name"] == "ValAttributes"
+    assert schema_json["enums"][0]["values"][0]["name"] == "Val1"
+    assert (
+        schema_json["enums"][0]["values"][0]["attributes"][0]["key"]
+        == "display_name"
+    )
+    assert (
+        schema_json["enums"][0]["values"][0]["attributes"][0]["value"]
+        == "Value 1"
+    )
 
-        assert schema_json["enums"][0]["values"][2]["name"] == "Val3"
-        assert schema_json["enums"][0]["values"][2]["attributes"][0]["key"] == "deprecated"
-        assert schema_json["enums"][0]["values"][2]["attributes"][1]["key"] == "display_name"
-        assert schema_json["enums"][0]["values"][2]["attributes"][1]["value"] == "Value 3 (deprecated)"
+    assert schema_json["enums"][0]["values"][1]["name"] == "Val2"
+    assert (
+        schema_json["enums"][0]["values"][1]["attributes"][0]["key"]
+        == "display_name"
+    )
+    assert (
+        schema_json["enums"][0]["values"][1]["attributes"][0]["value"]
+        == "Value 2"
+    )
+
+    assert schema_json["enums"][0]["values"][2]["name"] == "Val3"
+    assert (
+        schema_json["enums"][0]["values"][2]["attributes"][0]["key"]
+        == "deprecated"
+    )
+    assert (
+        schema_json["enums"][0]["values"][2]["attributes"][1]["key"]
+        == "display_name"
+    )
+    assert (
+        schema_json["enums"][0]["values"][2]["attributes"][1]["value"]
+        == "Value 3 (deprecated)"
+    )
diff --git a/tests/flatc/flatc_test.py b/tests/flatc/flatc_test.py
index 2e51743..e893eb6 100755
--- a/tests/flatc/flatc_test.py
+++ b/tests/flatc/flatc_test.py
@@ -13,9 +13,9 @@
 # limitations under the License.
 
 import argparse
+from pathlib import Path
 import platform
 import subprocess
-from pathlib import Path
 
 parser = argparse.ArgumentParser()
 parser.add_argument(
@@ -41,99 +41,100 @@
 
 # Find and assert flatc compiler is present.
 if root_path in flatc_exe.parents:
-    flatc_exe = flatc_exe.relative_to(root_path)
+  flatc_exe = flatc_exe.relative_to(root_path)
 flatc_path = Path(root_path, flatc_exe)
 assert flatc_path.exists(), "Cannot find the flatc compiler " + str(flatc_path)
 
+
 # Execute the flatc compiler with the specified parameters
 def flatc(options, cwd=script_path):
-    cmd = [str(flatc_path)] + options
-    subprocess.check_call(cmd, cwd=str(cwd))
+  cmd = [str(flatc_path)] + options
+  subprocess.check_call(cmd, cwd=str(cwd))
 
 
 def reflection_fbs_path():
-    return Path(root_path).joinpath("reflection", "reflection.fbs")
+  return Path(root_path).joinpath("reflection", "reflection.fbs")
 
 
 def make_absolute(filename, path=script_path):
-    return str(Path(path, filename).absolute())
+  return str(Path(path, filename).absolute())
 
 
 def assert_file_exists(filename, path=script_path):
-    file = Path(path, filename)
-    assert file.exists(), "could not find file: " + filename
-    return file
+  file = Path(path, filename)
+  assert file.exists(), "could not find file: " + filename
+  return file
 
 
 def assert_file_doesnt_exists(filename, path=script_path):
-    file = Path(path, filename)
-    assert not file.exists(), "file exists but shouldn't: " + filename
-    return file
+  file = Path(path, filename)
+  assert not file.exists(), "file exists but shouldn't: " + filename
+  return file
 
 
 def get_file_contents(filename, path=script_path):
-    file = Path(path, filename)
-    contents = ""
-    with open(file) as file:
-        contents = file.read()
-    return contents
+  file = Path(path, filename)
+  contents = ""
+  with open(file) as file:
+    contents = file.read()
+  return contents
 
 
 def assert_file_contains(file, needles):
-    with open(file) as file:
-        contents = file.read()
-        for needle in [needles] if isinstance(needles, str) else needles:
-            assert needle in contents, (
-                "coudn't find '" + needle + "' in file: " + str(file)
-            )
-    return file
+  with open(file) as file:
+    contents = file.read()
+    for needle in [needles] if isinstance(needles, str) else needles:
+      assert needle in contents, (
+          "coudn't find '" + needle + "' in file: " + str(file)
+      )
+  return file
 
 
 def assert_file_doesnt_contains(file, needles):
-    with open(file) as file:
-        contents = file.read()
-        for needle in [needles] if isinstance(needles, str) else needles:
-            assert needle not in contents, (
-                "Found unexpected '" + needle + "' in file: " + str(file)
-            )
-    return file
+  with open(file) as file:
+    contents = file.read()
+    for needle in [needles] if isinstance(needles, str) else needles:
+      assert needle not in contents, (
+          "Found unexpected '" + needle + "' in file: " + str(file)
+      )
+  return file
 
 
 def assert_file_and_contents(
     file, needle, doesnt_contain=None, path=script_path, unlink=True
 ):
-    assert_file_contains(assert_file_exists(file, path), needle)
-    if doesnt_contain:
-        assert_file_doesnt_contains(assert_file_exists(file, path), doesnt_contain)
-    if unlink:
-        Path(path, file).unlink()
+  assert_file_contains(assert_file_exists(file, path), needle)
+  if doesnt_contain:
+    assert_file_doesnt_contains(assert_file_exists(file, path), doesnt_contain)
+  if unlink:
+    Path(path, file).unlink()
 
 
 def run_all(*modules):
-    failing = 0
-    passing = 0
-    for module in modules:
-        methods = [
-            func
-            for func in dir(module)
-            if callable(getattr(module, func)) and not func.startswith("__")
-        ]
-        module_failing = 0
-        module_passing = 0
-        for method in methods:
-            try:
-                print("{0}.{1}".format(module.__name__, method))
-                getattr(module, method)(module)
-                print(" [PASSED]")
-                module_passing = module_passing + 1
-            except Exception as e:
-                print(" [FAILED]: " + str(e))
-                module_failing = module_failing + 1
-        print(
-            "{0}: {1} of {2} passsed".format(
-                module.__name__, module_passing, module_passing + module_failing
-            )
+  failing = 0
+  passing = 0
+  for module in modules:
+    methods = [
+        func
+        for func in dir(module)
+        if callable(getattr(module, func)) and not func.startswith("__")
+    ]
+    module_failing = 0
+    module_passing = 0
+    for method in methods:
+      try:
+        print("{0}.{1}".format(module.__name__, method))
+        getattr(module, method)(module)
+        print(" [PASSED]")
+        module_passing = module_passing + 1
+      except Exception as e:
+        print(" [FAILED]: " + str(e))
+        module_failing = module_failing + 1
+    print(
+        "{0}: {1} of {2} passsed".format(
+            module.__name__, module_passing, module_passing + module_failing
         )
-        passing = passing + module_passing
-        failing = failing + module_failing
-    return passing, failing
+    )
+    passing = passing + module_passing
+    failing = failing + module_failing
+  return passing, failing
diff --git a/tests/flatc/flatc_ts_tests.py b/tests/flatc/flatc_ts_tests.py
index 6e444bc..3716885 100755
--- a/tests/flatc/flatc_ts_tests.py
+++ b/tests/flatc/flatc_ts_tests.py
@@ -15,228 +15,225 @@
 from flatc_test import *
 
 
-class TsTests():
+class TsTests:
 
-    def Base(self):
-        # Generate just foo with no extra arguments
-        flatc(["--ts", "foo.fbs"])
+  def Base(self):
+    # Generate just foo with no extra arguments
+    flatc(["--ts", "foo.fbs"])
 
-        # Should generate the module that exports both foo and its direct
-        # include, bar.
-        assert_file_and_contents(
-            "foo_generated.ts",
-            [
-                "export { Bar } from './bar.js';",
-                "export { Foo } from './foo.js';",
-            ],
-        )
+    # Should generate the module that exports both foo and its direct
+    # include, bar.
+    assert_file_and_contents(
+        "foo_generated.ts",
+        [
+            "export { Bar } from './bar.js';",
+            "export { Foo } from './foo.js';",
+        ],
+    )
 
-        # Foo should be generated in place and exports the Foo table.
-        assert_file_and_contents("foo.ts", "export class Foo {")
+    # Foo should be generated in place and exports the Foo table.
+    assert_file_and_contents("foo.ts", "export class Foo {")
 
-        # Included files, like bar, should not be generated.
-        assert_file_doesnt_exists("bar.ts")
+    # Included files, like bar, should not be generated.
+    assert_file_doesnt_exists("bar.ts")
 
-    def BaseMultipleFiles(self):
-        # Generate both foo and bar with no extra arguments
-        flatc(["--ts", "foo.fbs", "bar/bar.fbs"])
+  def BaseMultipleFiles(self):
+    # Generate both foo and bar with no extra arguments
+    flatc(["--ts", "foo.fbs", "bar/bar.fbs"])
 
-        # Should generate the module that exports both foo and its direct
-        # include, bar.
-        assert_file_and_contents(
-            "foo_generated.ts",
-            [
-                "export { Bar } from './bar.js';",
-                "export { Foo } from './foo.js';",
-            ],
-        )
+    # Should generate the module that exports both foo and its direct
+    # include, bar.
+    assert_file_and_contents(
+        "foo_generated.ts",
+        [
+            "export { Bar } from './bar.js';",
+            "export { Foo } from './foo.js';",
+        ],
+    )
 
-        # Foo should be generated in place and exports the Foo table.
-        assert_file_and_contents("foo.ts", "export class Foo {")
+    # Foo should be generated in place and exports the Foo table.
+    assert_file_and_contents("foo.ts", "export class Foo {")
 
-        # Bar should also be generatd in place and exports the Bar table.
-        assert_file_and_contents("bar.ts", "export class Bar {")
+    # Bar should also be generatd in place and exports the Bar table.
+    assert_file_and_contents("bar.ts", "export class Bar {")
 
-    def BaseWithNamespace(self):
-        # Generate foo with namespacing, with no extra arguments
-        flatc(["--ts", "foo_with_ns.fbs"])
+  def BaseWithNamespace(self):
+    # Generate foo with namespacing, with no extra arguments
+    flatc(["--ts", "foo_with_ns.fbs"])
 
-        # Should generate the module that exports both foo in its namespace
-        # directory and its direct include, bar.
-        assert_file_and_contents(
-            "foo_with_ns_generated.ts",
-            [
-                "export { Bar } from './bar/bar.js';",
-                "export { Foo } from './something/foo.js';",
-            ],
-        )
+    # Should generate the module that exports both foo in its namespace
+    # directory and its direct include, bar.
+    assert_file_and_contents(
+        "foo_with_ns_generated.ts",
+        [
+            "export { Bar } from './bar/bar.js';",
+            "export { Foo } from './something/foo.js';",
+        ],
+    )
 
-        # Foo should be placed in the namespaced directory. It should export
-        # Foo, and the import of Bar should be relative to its location.
-        assert_file_and_contents(
-            "something/foo.ts",
-            [
-                "export class Foo {",
-                "import { Bar } from '../bar/bar.js';",
-            ],
-        )
+    # Foo should be placed in the namespaced directory. It should export
+    # Foo, and the import of Bar should be relative to its location.
+    assert_file_and_contents(
+        "something/foo.ts",
+        [
+            "export class Foo {",
+            "import { Bar } from '../bar/bar.js';",
+        ],
+    )
 
-        # Included files, like bar, should not be generated.
-        assert_file_doesnt_exists("bar.ts")
+    # Included files, like bar, should not be generated.
+    assert_file_doesnt_exists("bar.ts")
 
-    def GenAll(self):
-        # Generate foo with generate all options
-        flatc(["--ts", "--gen-all", "foo.fbs"])
+  def GenAll(self):
+    # Generate foo with generate all options
+    flatc(["--ts", "--gen-all", "foo.fbs"])
 
-        # Should generate a single file that exports all the generated types.
-        assert_file_and_contents(
-            "foo_generated.ts",
-            [
-                "export { Bar } from './bar.js'",
-                "export { Baz } from './baz.js'",
-                "export { Foo } from './foo.js'",
-            ],
-        )
+    # Should generate a single file that exports all the generated types.
+    assert_file_and_contents(
+        "foo_generated.ts",
+        [
+            "export { Bar } from './bar.js'",
+            "export { Baz } from './baz.js'",
+            "export { Foo } from './foo.js'",
+        ],
+    )
 
-        # Foo should be generated with an import to Bar and an export of itself.
-        assert_file_and_contents(
-            "foo.ts",
-            [
-                "import { Bar } from './bar.js';",
-                "export class Foo {",
-            ],
-        )
+    # Foo should be generated with an import to Bar and an export of itself.
+    assert_file_and_contents(
+        "foo.ts",
+        [
+            "import { Bar } from './bar.js';",
+            "export class Foo {",
+        ],
+    )
 
-        # Bar should be generated with an import to Baz and an export of itself.
-        assert_file_and_contents(
-            "bar.ts",
-            [
-                "import { Baz } from './baz.js';",
-                "export class Bar {",
-            ],
-        )
+    # Bar should be generated with an import to Baz and an export of itself.
+    assert_file_and_contents(
+        "bar.ts",
+        [
+            "import { Baz } from './baz.js';",
+            "export class Bar {",
+        ],
+    )
 
-        # Baz should be generated with an export of itself.
-        assert_file_and_contents(
-            "baz.ts",
-            [
-                "export enum Baz {",
-            ],
-        )
+    # Baz should be generated with an export of itself.
+    assert_file_and_contents(
+        "baz.ts",
+        [
+            "export enum Baz {",
+        ],
+    )
 
+  def FlatFiles(self):
+    # Generate just foo with the flat files option
+    flatc(["--ts", "--ts-flat-files", "foo.fbs"])
 
-    def FlatFiles(self):
-        # Generate just foo with the flat files option
-        flatc(["--ts", "--ts-flat-files", "foo.fbs"])
+    # Should generate a single file that imports bar as a single file, and
+    # exports the Foo table.
+    assert_file_and_contents(
+        "foo_generated.ts",
+        [
+            "import {Bar as Bar} from './bar_generated.js';",
+            "export class Foo {",
+        ],
+    )
 
-        # Should generate a single file that imports bar as a single file, and
-        # exports the Foo table.
-        assert_file_and_contents(
-            "foo_generated.ts",
-            [
-                "import {Bar as Bar} from './bar_generated.js';",
-                "export class Foo {",
-            ],
-        )
+    # The root type Foo should not be generated in its own file.
+    assert_file_doesnt_exists("foo.ts")
 
-        # The root type Foo should not be generated in its own file.
-        assert_file_doesnt_exists("foo.ts")
+  def FlatFilesWithNamespace(self):
+    # Generate just foo with the flat files option
+    flatc(["--ts", "--ts-flat-files", "foo_with_ns.fbs"])
 
-    def FlatFilesWithNamespace(self):
-        # Generate just foo with the flat files option
-        flatc(["--ts", "--ts-flat-files", "foo_with_ns.fbs"])
+    # Should generate a single file that imports bar as a single file, and
+    # exports the Foo table.
+    assert_file_and_contents(
+        "foo_with_ns_generated.ts",
+        [
+            "import {Bar as Bar} from './bar_with_ns_generated.js';",
+            "export class Foo {",
+        ],
+    )
 
-        # Should generate a single file that imports bar as a single file, and
-        # exports the Foo table.
-        assert_file_and_contents(
-            "foo_with_ns_generated.ts",
-            [
-                "import {Bar as Bar} from './bar_with_ns_generated.js';",
-                "export class Foo {",
-            ],
-        )
+    # The root type Foo should not be generated in its own file.
+    assert_file_doesnt_exists("foo.ts")
 
-        # The root type Foo should not be generated in its own file.
-        assert_file_doesnt_exists("foo.ts")
+  def FlatFilesMultipleFiles(self):
+    # Generate both foo and bar with the flat files option
+    flatc(["--ts", "--ts-flat-files", "foo.fbs", "bar/bar.fbs"])
 
-    def FlatFilesMultipleFiles(self):
-        # Generate both foo and bar with the flat files option
-        flatc(["--ts", "--ts-flat-files", "foo.fbs", "bar/bar.fbs"])
+    # Should generate a single foo file that imports bar as a single file,
+    # and exports the Foo table.
+    assert_file_and_contents(
+        "foo_generated.ts",
+        [
+            "import {Bar as Bar} from './bar_generated.js';",
+            "export class Foo {",
+        ],
+    )
 
-        # Should generate a single foo file that imports bar as a single file,
-        # and exports the Foo table.
-        assert_file_and_contents(
-            "foo_generated.ts",
-            [
-                "import {Bar as Bar} from './bar_generated.js';",
-                "export class Foo {",
-            ],
-        )
+    # Should generate a single bar file that imports bar as a single file,
+    # and exports the Bar table.
+    assert_file_and_contents(
+        "bar_generated.ts",
+        [
+            "import {Baz as Baz} from './baz_generated.js';",
+            "export class Bar {",
+        ],
+    )
 
-        # Should generate a single bar file that imports bar as a single file,
-        # and exports the Bar table.
-        assert_file_and_contents(
-            "bar_generated.ts",
-            [
-                "import {Baz as Baz} from './baz_generated.js';",
-                "export class Bar {",
-            ],
-        )
+    # The types Foo and Bar should not be generated in their own files
+    assert_file_doesnt_exists("foo.ts")
+    assert_file_doesnt_exists("bar.ts")
 
-        # The types Foo and Bar should not be generated in their own files
-        assert_file_doesnt_exists("foo.ts")
-        assert_file_doesnt_exists("bar.ts")
+  def FlatFilesGenAll(self):
+    # Generate foo with all of its dependents with the flat files option
+    flatc(["--ts", "--ts-flat-files", "--gen-all", "foo.fbs"])
 
-    def FlatFilesGenAll(self):
-        # Generate foo with all of its dependents with the flat files option
-        flatc(["--ts", "--ts-flat-files", "--gen-all", "foo.fbs"])
+    # Should generate a single foo file
+    assert_file_and_contents(
+        "foo_generated.ts",
+        # Should export each of the types within the single file
+        [
+            "export class Foo {",
+            "export class Bar {",
+            "export enum Baz {",
+        ],
+        # No includes for the dependent types should be present.
+        doesnt_contain=[
+            "import {Bar as Bar}",
+            "import {Baz as Baz}",
+        ],
+    )
 
-        # Should generate a single foo file
-        assert_file_and_contents(
-            "foo_generated.ts",
-            # Should export each of the types within the single file
-            [
-                "export class Foo {",
-                "export class Bar {",
-                "export enum Baz {",
-            ],
-            # No includes for the dependent types should be present.
-            doesnt_contain=[
-                "import {Bar as Bar}",
-                "import {Baz as Baz}",
-            ],
-        )
+    # The types Foo, Bar and Baz should not be generated in their own files.
+    assert_file_doesnt_exists("foo.ts")
+    assert_file_doesnt_exists("bar.ts")
+    assert_file_doesnt_exists("baz.ts")
 
-        # The types Foo, Bar and Baz should not be generated in their own files.
-        assert_file_doesnt_exists("foo.ts")
-        assert_file_doesnt_exists("bar.ts")
-        assert_file_doesnt_exists("baz.ts")
+  def ZFlatFilesGenAllWithNamespacing(self):
+    # Generate foo with all of its dependents with the flat files option
+    flatc(["--ts", "--ts-flat-files", "--gen-all", "foo_with_ns.fbs"])
 
+    # Should generate a single foo file
+    assert_file_and_contents(
+        "foo_with_ns_generated.ts",
+        # Should export each of the types within the single file
+        [
+            "export class bar_Bar {",
+            "export class bar_Foo {",
+            "export enum Baz {",
+            "export enum baz_Baz {",
+            "export class something_Foo {",
+        ],
+        # No includes for the dependent types should be present.
+        doesnt_contain=[
+            "import {Bar as Bar}",
+            "import {Baz as Baz}",
+        ],
+    )
 
-    def ZFlatFilesGenAllWithNamespacing(self):
-        # Generate foo with all of its dependents with the flat files option
-        flatc(["--ts", "--ts-flat-files", "--gen-all", "foo_with_ns.fbs"])
-
-        # Should generate a single foo file
-        assert_file_and_contents(
-            "foo_with_ns_generated.ts",
-            # Should export each of the types within the single file
-            [
-                "export class bar_Bar {",
-                "export class bar_Foo {",
-                "export enum Baz {",
-                "export enum baz_Baz {",
-                "export class something_Foo {"
-            ],
-            # No includes for the dependent types should be present.
-            doesnt_contain=[
-                "import {Bar as Bar}",
-                "import {Baz as Baz}",
-            ],
-        )
-
-        # The types Foo, Bar and Baz should not be generated in their own files.
-        assert_file_doesnt_exists("foo.ts")
-        assert_file_doesnt_exists("bar.ts")
-        assert_file_doesnt_exists("baz.ts")
-
+    # The types Foo, Bar and Baz should not be generated in their own files.
+    assert_file_doesnt_exists("foo.ts")
+    assert_file_doesnt_exists("bar.ts")
+    assert_file_doesnt_exists("baz.ts")
diff --git a/tests/flatc/main.py b/tests/flatc/main.py
index b296c47..1333d90 100755
--- a/tests/flatc/main.py
+++ b/tests/flatc/main.py
@@ -16,11 +16,11 @@
 
 import sys
 
-from flatc_test import run_all
 from flatc_cpp_tests import CppTests
 from flatc_kotlin_tests import KotlinTests
-from flatc_ts_tests import TsTests
 from flatc_schema_tests import SchemaTests
+from flatc_test import run_all
+from flatc_ts_tests import TsTests
 
 passing, failing = run_all(CppTests, KotlinTests, TsTests, SchemaTests)
 
@@ -28,4 +28,4 @@
 print("{0} of {1} tests passed".format(passing, passing + failing))
 
 if failing > 0:
-    sys.exit(1)
+  sys.exit(1)
diff --git a/tests/fuzzer/flatbuffers_64bit_fuzzer.cc b/tests/fuzzer/flatbuffers_64bit_fuzzer.cc
index efb629d..e62a586 100644
--- a/tests/fuzzer/flatbuffers_64bit_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_64bit_fuzzer.cc
@@ -23,7 +23,7 @@
 
 namespace flatbuffers {
 
-template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
+template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
 uint64_t Hash(T value, uint64_t hash) {
   return (hash * kFnvPrime) ^ value;
 }
@@ -33,33 +33,51 @@
   return (hash * kFnvPrime) ^ static_cast<uint64_t>(value);
 }
 
-uint64_t Hash(const flatbuffers::String *value, uint64_t hash) {
-  if (value == nullptr) { return hash * kFnvPrime; }
-  for (auto &c : value->str()) { hash = Hash(static_cast<uint8_t>(c), hash); }
+uint64_t Hash(const flatbuffers::String* value, uint64_t hash) {
+  if (value == nullptr) {
+    return hash * kFnvPrime;
+  }
+  for (auto& c : value->str()) {
+    hash = Hash(static_cast<uint8_t>(c), hash);
+  }
   return hash;
 }
 
-uint64_t Hash(const LeafStruct *value, uint64_t hash) {
-  if (value == nullptr) { return hash * kFnvPrime; }
+uint64_t Hash(const LeafStruct* value, uint64_t hash) {
+  if (value == nullptr) {
+    return hash * kFnvPrime;
+  }
   hash = Hash(value->a(), hash);
   hash = Hash(value->b(), hash);
   return hash;
 }
 
-template<typename T> uint64_t Hash(const Vector<T> *value, uint64_t hash) {
-  if (value == nullptr) { return hash * kFnvPrime; }
-  for (const T c : *value) { hash = Hash(c, hash); }
+template <typename T>
+uint64_t Hash(const Vector<T>* value, uint64_t hash) {
+  if (value == nullptr) {
+    return hash * kFnvPrime;
+  }
+  for (const T c : *value) {
+    hash = Hash(c, hash);
+  }
   return hash;
 }
 
-template<typename T> uint64_t Hash(const Vector64<T> *value, uint64_t hash) {
-  if (value == nullptr) { return hash * kFnvPrime; }
-  for (const T c : *value) { hash = Hash(c, hash); }
+template <typename T>
+uint64_t Hash(const Vector64<T>* value, uint64_t hash) {
+  if (value == nullptr) {
+    return hash * kFnvPrime;
+  }
+  for (const T c : *value) {
+    hash = Hash(c, hash);
+  }
   return hash;
 }
 
-uint64_t Hash(const RootTable *value, uint64_t hash) {
-  if (value == nullptr) { return hash * kFnvPrime; }
+uint64_t Hash(const RootTable* value, uint64_t hash) {
+  if (value == nullptr) {
+    return hash * kFnvPrime;
+  }
   // Hash all the fields so we can exercise all parts of the code.
   hash = Hash(value->far_vector(), hash);
   hash = Hash(value->a(), hash);
@@ -72,9 +90,9 @@
   return hash;
 }
 
-static int AccessBuffer(const uint8_t *data, size_t size,
+static int AccessBuffer(const uint8_t* data, size_t size,
                         bool is_size_prefixed) {
-  const RootTable *root_table =
+  const RootTable* root_table =
       is_size_prefixed ? GetSizePrefixedRootTable(data) : GetRootTable(data);
   TEST_NOTNULL(root_table);
 
@@ -85,15 +103,17 @@
   return 0;
 }
 
-extern "C" int LLVMFuzzerInitialize(int *, char ***argv) {
+extern "C" int LLVMFuzzerInitialize(int*, char*** argv) {
   Verifier verifier(schema.begin(), schema.size());
   TEST_EQ(true, reflection::VerifySchemaBuffer(verifier));
 
   return 0;
 }
 
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
-  if (size < FLATBUFFERS_MIN_BUFFER_SIZE) { return 0; }
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  if (size < FLATBUFFERS_MIN_BUFFER_SIZE) {
+    return 0;
+  }
 
   // Take the first bit of data as a flag to control things.
   const uint8_t flags = data[0];
diff --git a/tests/fuzzer/flatbuffers_annotator_fuzzer.cc b/tests/fuzzer/flatbuffers_annotator_fuzzer.cc
index 08c1e0b..134fbc8 100644
--- a/tests/fuzzer/flatbuffers_annotator_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_annotator_fuzzer.cc
@@ -6,7 +6,7 @@
 #include "test_init.h"
 
 static std::filesystem::path exe_path_;
-static const uint8_t *schema_bfbs_;
+static const uint8_t* schema_bfbs_;
 static size_t schema_bfbs_length_;
 
 bool TestFileExists(std::filesystem::path file_path) {
@@ -14,7 +14,7 @@
     return true;
 
   TEST_OUTPUT_LINE("@DEBUG: file '%s' not found", file_path.string().c_str());
-  for (const auto &entry :
+  for (const auto& entry :
        std::filesystem::directory_iterator(file_path.parent_path())) {
     TEST_OUTPUT_LINE("@DEBUG: parent path entry: '%s'",
                      entry.path().string().c_str());
@@ -22,7 +22,7 @@
   return false;
 }
 
-std::string LoadBinarySchema(const char *file_name) {
+std::string LoadBinarySchema(const char* file_name) {
   const auto file_path = exe_path_.parent_path() / file_name;
   TEST_EQ(true, TestFileExists(file_path));
   std::string schemafile;
@@ -30,21 +30,21 @@
           flatbuffers::LoadFile(file_path.string().c_str(), true, &schemafile));
 
   flatbuffers::Verifier verifier(
-      reinterpret_cast<const uint8_t *>(schemafile.c_str()), schemafile.size());
+      reinterpret_cast<const uint8_t*>(schemafile.c_str()), schemafile.size());
   TEST_EQ(true, reflection::VerifySchemaBuffer(verifier));
   return schemafile;
 }
 
-extern "C" int LLVMFuzzerInitialize(int *, char ***argv) {
+extern "C" int LLVMFuzzerInitialize(int*, char*** argv) {
   exe_path_ = (*argv)[0];
   static const std::string schema_file =
       LoadBinarySchema("annotated_binary.bfbs");
-  schema_bfbs_ = reinterpret_cast<const uint8_t *>(schema_file.c_str());
+  schema_bfbs_ = reinterpret_cast<const uint8_t*>(schema_file.c_str());
   schema_bfbs_length_ = schema_file.size();
   return 0;
 }
 
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   flatbuffers::BinaryAnnotator annotator(schema_bfbs_, schema_bfbs_length_,
                                          data, size, false);
 
diff --git a/tests/fuzzer/flatbuffers_monster_fuzzer.cc b/tests/fuzzer/flatbuffers_monster_fuzzer.cc
index 71a6802..0f568b7 100644
--- a/tests/fuzzer/flatbuffers_monster_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_monster_fuzzer.cc
@@ -48,14 +48,14 @@
   if (file_path.has_filename() && fs::exists(file_path)) return true;
 
   TEST_OUTPUT_LINE("@DEBUG: file '%s' not found", file_path.string().c_str());
-  for (const auto &entry : fs::directory_iterator(file_path.parent_path())) {
+  for (const auto& entry : fs::directory_iterator(file_path.parent_path())) {
     TEST_OUTPUT_LINE("@DEBUG: parent path entry: '%s'",
                      entry.path().string().c_str());
   }
   return false;
 }
 
-std::string LoadBinarySchema(const char *file_name) {
+std::string LoadBinarySchema(const char* file_name) {
   const auto file_path = exe_path_.parent_path() / file_name;
   TEST_EQ(true, TestFileExists(file_path));
   std::string schemafile;
@@ -63,12 +63,12 @@
           flatbuffers::LoadFile(file_path.string().c_str(), true, &schemafile));
 
   flatbuffers::Verifier verifier(
-      reinterpret_cast<const uint8_t *>(schemafile.c_str()), schemafile.size());
+      reinterpret_cast<const uint8_t*>(schemafile.c_str()), schemafile.size());
   TEST_EQ(true, reflection::VerifySchemaBuffer(verifier));
   return schemafile;
 }
 
-std::string do_test(const flatbuffers::IDLOptions &opts,
+std::string do_test(const flatbuffers::IDLOptions& opts,
                     const std::string input_json, const bool check_parser) {
   // (re)define parser options
   parser_.opts = opts;
@@ -78,8 +78,7 @@
     flatbuffers::Verifier verifier(parser_.builder_.GetBufferPointer(),
                                    parser_.builder_.GetSize());
     TEST_EQ(true, MyGame::Example::VerifyMonsterBuffer(verifier));
-    TEST_NULL(
-        GenText(parser_, parser_.builder_.GetBufferPointer(), &jsongen));
+    TEST_NULL(GenText(parser_, parser_.builder_.GetBufferPointer(), &jsongen));
   } else if (check_parser) {
     TEST_OUTPUT_LINE("parser failed with JSON:\n%s", input_json.c_str());
     TEST_EQ_STR("", parser_.error_.c_str());
@@ -95,18 +94,18 @@
 // your fuzz target. If you need to load data files, please use argv[0] to get
 // the directory where your fuzz target executable is located.
 // You must not modify argv[0].
-extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) {
+extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) {
   (void)argc;
   exe_path_ = (*argv)[0];
 
   static const std::string schemafile = LoadBinarySchema("monster_test.bfbs");
   // parse schema first, so we can use it to parse the data after
-  parser_.Deserialize(reinterpret_cast<const uint8_t *>(schemafile.c_str()),
+  parser_.Deserialize(reinterpret_cast<const uint8_t*>(schemafile.c_str()),
                       schemafile.size());
   return 0;
 }
 
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   // Reserve one byte for Parser flags and one byte for repetition counter.
   if (size < 3) return 0;
   const uint8_t flags = data[0];
@@ -114,7 +113,7 @@
   data += 2;
   size -= 2;  // bypass
 
-  const std::string original(reinterpret_cast<const char *>(data), size);
+  const std::string original(reinterpret_cast<const char*>(data), size);
   auto input = std::string(original.c_str());  // until '\0'
   if (input.size() < kMinInputLength || input.size() > kMaxInputLength)
     return 0;
diff --git a/tests/fuzzer/flatbuffers_parser_fuzzer.cc b/tests/fuzzer/flatbuffers_parser_fuzzer.cc
index 0b74f2c..d1877ec 100644
--- a/tests/fuzzer/flatbuffers_parser_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_parser_fuzzer.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 #include <stddef.h>
 #include <stdint.h>
+
 #include <clocale>
 #include <string>
 
@@ -19,7 +20,7 @@
 // Utility for test run.
 OneTimeTestInit OneTimeTestInit::one_time_init_;
 
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   // Reserve one byte for Parser flags and one byte for repetition counter.
   if (size < 3) return 0;
   const uint8_t flags = data[0];
@@ -27,7 +28,7 @@
   data += 2;
   size -= 2;  // bypass
 
-  const std::string original(reinterpret_cast<const char *>(data), size);
+  const std::string original(reinterpret_cast<const char*>(data), size);
   auto input = std::string(original.c_str());  // until '\0'
   if (input.size() < kMinInputLength || input.size() > kMaxInputLength)
     return 0;
@@ -46,7 +47,8 @@
   // Check Parser.
   parser.Parse(parse_input);
   // TODO:
-  // Need to add additional checks for inputs passed Parse(parse_input) successfully:
+  // Need to add additional checks for inputs passed Parse(parse_input)
+  // successfully:
   // 1. Serialization to bfbs.
   // 2. Generation of a default object.
   // 3. Verification of the object using reflection.
diff --git a/tests/fuzzer/flatbuffers_scalar_fuzzer.cc b/tests/fuzzer/flatbuffers_scalar_fuzzer.cc
index cd43506..5d0dc95 100644
--- a/tests/fuzzer/flatbuffers_scalar_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_scalar_fuzzer.cc
@@ -38,7 +38,7 @@
 // Find all 'subj' sub-strings and replace first character of sub-string.
 // BreakSequence("testest","tes", 'X') -> "XesXest".
 // BreakSequence("xxx","xx", 'Y') -> "YYx".
-static void BreakSequence(std::string &s, const char *subj, char repl) {
+static void BreakSequence(std::string& s, const char* subj, char repl) {
   size_t pos = 0;
   while (pos = s.find(subj, pos), pos != std::string::npos) {
     s.at(pos) = repl;
@@ -48,8 +48,8 @@
 
 // Remove all leading and trailing symbols matched with pattern set.
 // StripString("xy{xy}y", "xy") -> "{xy}"
-static std::string StripString(const std::string &s, const char *pattern,
-                               size_t *pos = nullptr) {
+static std::string StripString(const std::string& s, const char* pattern,
+                               size_t* pos = nullptr) {
   if (pos) *pos = 0;
   // leading
   auto first = s.find_first_not_of(pattern);
@@ -64,19 +64,19 @@
 
 class RegexMatcher {
  protected:
-  virtual bool MatchNumber(const std::string &input) const = 0;
+  virtual bool MatchNumber(const std::string& input) const = 0;
 
  public:
   virtual ~RegexMatcher() = default;
 
   struct MatchResult {
-    size_t pos{ 0 };
-    size_t len{ 0 };
-    bool res{ false };
-    bool quoted{ false };
+    size_t pos{0};
+    size_t len{0};
+    bool res{false};
+    bool quoted{false};
   };
 
-  MatchResult Match(const std::string &input) const {
+  MatchResult Match(const std::string& input) const {
     MatchResult r;
     // strip leading and trailing "spaces" accepted by flatbuffer
     auto test = StripString(input, "\t\r\n ", &r.pos);
@@ -103,11 +103,11 @@
     return r;
   }
 
-  bool MatchRegexList(const std::string &input,
-                      const std::vector<std::regex> &re_list) const {
+  bool MatchRegexList(const std::string& input,
+                      const std::vector<std::regex>& re_list) const {
     auto str = StripString(input, " ");
     if (str.empty()) return false;
-    for (auto &re : re_list) {
+    for (auto& re : re_list) {
       std::smatch match;
       if (std::regex_match(str, match, re)) return true;
     }
@@ -117,13 +117,12 @@
 
 class IntegerRegex : public RegexMatcher {
  protected:
-  bool MatchNumber(const std::string &input) const override {
+  bool MatchNumber(const std::string& input) const override {
     static const std::vector<std::regex> re_list = {
-      std::regex{ R"(^[-+]?[0-9]+$)", std::regex_constants::optimize },
+        std::regex{R"(^[-+]?[0-9]+$)", std::regex_constants::optimize},
 
-      std::regex{ R"(^[-+]?0[xX][0-9a-fA-F]+$)",
-                  std::regex_constants::optimize }
-    };
+        std::regex{R"(^[-+]?0[xX][0-9a-fA-F]+$)",
+                   std::regex_constants::optimize}};
     return MatchRegexList(input, re_list);
   }
 
@@ -134,14 +133,13 @@
 
 class UIntegerRegex : public RegexMatcher {
  protected:
-  bool MatchNumber(const std::string &input) const override {
+  bool MatchNumber(const std::string& input) const override {
     static const std::vector<std::regex> re_list = {
-      std::regex{ R"(^[+]?[0-9]+$)", std::regex_constants::optimize },
-      std::regex{ R"(^[+]?0[xX][0-9a-fA-F]+$)",
-                  std::regex_constants::optimize },
-      // accept -0 number
-      std::regex{ R"(^[-](?:0[xX])?0+$)", std::regex_constants::optimize }
-    };
+        std::regex{R"(^[+]?[0-9]+$)", std::regex_constants::optimize},
+        std::regex{R"(^[+]?0[xX][0-9a-fA-F]+$)",
+                   std::regex_constants::optimize},
+        // accept -0 number
+        std::regex{R"(^[-](?:0[xX])?0+$)", std::regex_constants::optimize}};
     return MatchRegexList(input, re_list);
   }
 
@@ -152,7 +150,7 @@
 
 class BooleanRegex : public IntegerRegex {
  protected:
-  bool MatchNumber(const std::string &input) const override {
+  bool MatchNumber(const std::string& input) const override {
     if (input == "true" || input == "false") return true;
     return IntegerRegex::MatchNumber(input);
   }
@@ -164,20 +162,20 @@
 
 class FloatRegex : public RegexMatcher {
  protected:
-  bool MatchNumber(const std::string &input) const override {
+  bool MatchNumber(const std::string& input) const override {
     static const std::vector<std::regex> re_list = {
-      // hex-float
-      std::regex{
-          R"(^[-+]?0[xX](?:(?:[.][0-9a-fA-F]+)|(?:[0-9a-fA-F]+[.][0-9a-fA-F]*)|(?:[0-9a-fA-F]+))[pP][-+]?[0-9]+$)",
-          std::regex_constants::optimize },
-      // dec-float
-      std::regex{
-          R"(^[-+]?(?:(?:[.][0-9]+)|(?:[0-9]+[.][0-9]*)|(?:[0-9]+))(?:[eE][-+]?[0-9]+)?$)",
-          std::regex_constants::optimize },
+        // hex-float
+        std::regex{
+            R"(^[-+]?0[xX](?:(?:[.][0-9a-fA-F]+)|(?:[0-9a-fA-F]+[.][0-9a-fA-F]*)|(?:[0-9a-fA-F]+))[pP][-+]?[0-9]+$)",
+            std::regex_constants::optimize},
+        // dec-float
+        std::regex{
+            R"(^[-+]?(?:(?:[.][0-9]+)|(?:[0-9]+[.][0-9]*)|(?:[0-9]+))(?:[eE][-+]?[0-9]+)?$)",
+            std::regex_constants::optimize},
 
-      std::regex{ R"(^[-+]?(?:nan|inf|infinity)$)",
-                  std::regex_constants::optimize | std::regex_constants::icase }
-    };
+        std::regex{
+            R"(^[-+]?(?:nan|inf|infinity)$)",
+            std::regex_constants::optimize | std::regex_constants::icase}};
     return MatchRegexList(input, re_list);
   }
 
@@ -188,34 +186,46 @@
 
 class ScalarReferenceResult {
  private:
-  ScalarReferenceResult(const char *_type, RegexMatcher::MatchResult _matched)
+  ScalarReferenceResult(const char* _type, RegexMatcher::MatchResult _matched)
       : type(_type), matched(_matched) {}
 
  public:
   // Decode scalar type and check if the input string satisfies the scalar type.
-  static ScalarReferenceResult Check(uint8_t code, const std::string &input) {
+  static ScalarReferenceResult Check(uint8_t code, const std::string& input) {
     switch (code) {
-      case 0x0: return { "double", FloatRegex().Match(input) };
-      case 0x1: return { "float", FloatRegex().Match(input) };
-      case 0x2: return { "int8", IntegerRegex().Match(input) };
-      case 0x3: return { "int16", IntegerRegex().Match(input) };
-      case 0x4: return { "int32", IntegerRegex().Match(input) };
-      case 0x5: return { "int64", IntegerRegex().Match(input) };
-      case 0x6: return { "uint8", UIntegerRegex().Match(input) };
-      case 0x7: return { "uint16", UIntegerRegex().Match(input) };
-      case 0x8: return { "uint32", UIntegerRegex().Match(input) };
-      case 0x9: return { "uint64", UIntegerRegex().Match(input) };
-      case 0xA: return { "bool", BooleanRegex().Match(input) };
-      default: return { "float", FloatRegex().Match(input) };
+      case 0x0:
+        return {"double", FloatRegex().Match(input)};
+      case 0x1:
+        return {"float", FloatRegex().Match(input)};
+      case 0x2:
+        return {"int8", IntegerRegex().Match(input)};
+      case 0x3:
+        return {"int16", IntegerRegex().Match(input)};
+      case 0x4:
+        return {"int32", IntegerRegex().Match(input)};
+      case 0x5:
+        return {"int64", IntegerRegex().Match(input)};
+      case 0x6:
+        return {"uint8", UIntegerRegex().Match(input)};
+      case 0x7:
+        return {"uint16", UIntegerRegex().Match(input)};
+      case 0x8:
+        return {"uint32", UIntegerRegex().Match(input)};
+      case 0x9:
+        return {"uint64", UIntegerRegex().Match(input)};
+      case 0xA:
+        return {"bool", BooleanRegex().Match(input)};
+      default:
+        return {"float", FloatRegex().Match(input)};
     };
   }
 
-  const char *type;
+  const char* type;
   const RegexMatcher::MatchResult matched;
 };
 
-bool Parse(flatbuffers::Parser &parser, const std::string &json,
-           std::string *_text) {
+bool Parse(flatbuffers::Parser& parser, const std::string& json,
+           std::string* _text) {
   auto done = parser.ParseJson(json.c_str());
   if (done) {
     TEST_NULL(GenText(parser, parser.builder_.GetBufferPointer(), _text));
@@ -230,7 +240,7 @@
 
 // llvm std::regex have problem with stack overflow, limit maximum length.
 // ./scalar_fuzzer -max_len=3000
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   // Reserve one byte for Parser flags and one byte for repetition counter.
   if (size < 3) return 0;
   const uint8_t flags = data[0];
@@ -241,7 +251,7 @@
   size -= 2;  // bypass
 
   // Guarantee 0-termination.
-  const std::string original(reinterpret_cast<const char *>(data), size);
+  const std::string original(reinterpret_cast<const char*>(data), size);
   auto input = std::string(original.c_str());  // until '\0'
   if (input.size() < kMinInputLength || input.size() > kMaxInputLength)
     return 0;
@@ -257,7 +267,7 @@
   // This key:value ignored by the parser. Numbers can not have $.
   BreakSequence(input, "$schema", '@');  // "$schema" -> "@schema"
   // Break all known scalar functions (todo: add them to regex?):
-  for (auto f : { "deg", "rad", "sin", "cos", "tan", "asin", "acos", "atan" }) {
+  for (auto f : {"deg", "rad", "sin", "cos", "tan", "asin", "acos", "atan"}) {
     BreakSequence(input, f, '_');  // ident -> ident
   }
 
@@ -265,7 +275,7 @@
   // the scalar type.
   const auto ref_res =
       ScalarReferenceResult::Check(flags & flags_scalar_type, input);
-  auto &recheck = ref_res.matched;
+  auto& recheck = ref_res.matched;
 
   // Create parser
   flatbuffers::IDLOptions opts;
@@ -338,7 +348,9 @@
                          orig_done);
         TEST_EQ_STR(fix_back.c_str(), orig_back.c_str());
       }
-      if (orig_done) { TEST_EQ_STR(fix_back.c_str(), orig_back.c_str()); }
+      if (orig_done) {
+        TEST_EQ_STR(fix_back.c_str(), orig_back.c_str());
+      }
       TEST_EQ_FUNC(fix_done, orig_done);
     }
 
@@ -357,8 +369,8 @@
       }
       // Compare with print.
       std::string ref_string, def_string;
-      FLATBUFFERS_ASSERT(!GenText(
-          parser, parser.builder_.GetBufferPointer(), &ref_string));
+      FLATBUFFERS_ASSERT(
+          !GenText(parser, parser.builder_.GetBufferPointer(), &ref_string));
       FLATBUFFERS_ASSERT(!GenText(
           def_parser, def_parser.builder_.GetBufferPointer(), &def_string));
       if (ref_string != def_string) {
@@ -369,7 +381,9 @@
     }
 
     // Restore locale.
-    if (use_locale) { FLATBUFFERS_ASSERT(setlocale(LC_ALL, "C")); }
+    if (use_locale) {
+      FLATBUFFERS_ASSERT(setlocale(LC_ALL, "C"));
+    }
   }
   return 0;
 }
diff --git a/tests/fuzzer/flatbuffers_verifier_fuzzer.cc b/tests/fuzzer/flatbuffers_verifier_fuzzer.cc
index cb32a85..f8a7b4c 100644
--- a/tests/fuzzer/flatbuffers_verifier_fuzzer.cc
+++ b/tests/fuzzer/flatbuffers_verifier_fuzzer.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 #include <stddef.h>
 #include <stdint.h>
+
 #include <string>
 
 #include "cpp17/generated_cpp17/monster_test_generated.h"
diff --git a/tests/fuzzer/flexbuffers_verifier_fuzzer.cc b/tests/fuzzer/flexbuffers_verifier_fuzzer.cc
index ad374b3..8018924 100644
--- a/tests/fuzzer/flexbuffers_verifier_fuzzer.cc
+++ b/tests/fuzzer/flexbuffers_verifier_fuzzer.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 #include <stddef.h>
 #include <stdint.h>
+
 #include <string>
 
 #include "flatbuffers/flexbuffers.h"
@@ -14,6 +15,6 @@
   // FIXME: we can't really verify this path, because the fuzzer will
   // construct buffers that time out.
   // Add a simple #define to bound the number of steps just for the fuzzer?
-  //flexbuffers::VerifyBuffer(data, size, nullptr);
+  // flexbuffers::VerifyBuffer(data, size, nullptr);
   return 0;
 }
diff --git a/tests/fuzzer/fuzzer_assert.h b/tests/fuzzer/fuzzer_assert.h
index 41a4164..778087c 100644
--- a/tests/fuzzer/fuzzer_assert.h
+++ b/tests/fuzzer/fuzzer_assert.h
@@ -4,11 +4,11 @@
 #if defined(_MSC_VER)
 extern "C" void __debugbreak();
 #define __builtin_trap __debugbreak
-#else // Clang
+#else  // Clang
 extern "C" void __builtin_trap(void);
 #endif
 
 // Declare Debug/Release independed assert macro.
 #define fuzzer_assert_impl(x) (!!(x) ? static_cast<void>(0) : __builtin_trap())
 
-#endif // !FUZZER_ASSERT_IMPL_H_
+#endif  // !FUZZER_ASSERT_IMPL_H_
diff --git a/tests/fuzzer/test_init.h b/tests/fuzzer/test_init.h
index 6cb58d3..a63c1a8 100644
--- a/tests/fuzzer/test_init.h
+++ b/tests/fuzzer/test_init.h
@@ -9,9 +9,9 @@
 struct OneTimeTestInit {
   // Declare trap for the Flatbuffers test engine.
   // This hook terminate program both in Debug and Release.
-  static bool TestFailListener(const char *expval, const char *val,
-                               const char *exp, const char *file, int line,
-                               const char *func = nullptr) {
+  static bool TestFailListener(const char* expval, const char* val,
+                               const char* exp, const char* file, int line,
+                               const char* func = nullptr) {
     (void)expval;
     (void)val;
     (void)exp;
@@ -39,7 +39,7 @@
     }
   }
 
-  static const char *test_locale() {
+  static const char* test_locale() {
     return one_time_init_.has_locale_ ? nullptr
                                       : one_time_init_.test_locale_.c_str();
   }
diff --git a/tests/is_quiet_nan.h b/tests/is_quiet_nan.h
index 6d31c3d..717ccea 100644
--- a/tests/is_quiet_nan.h
+++ b/tests/is_quiet_nan.h
@@ -10,13 +10,14 @@
 // set to 1. A quiet NaN bit string should be encoded with the first bit d[1]
 // of the trailing significand field T being 1 (d[0] is implicit bit).
 // It is assumed that endianness of floating-point is same as integer.
-template<typename T, typename U, U qnan_base> bool is_quiet_nan_impl(T v) {
+template <typename T, typename U, U qnan_base>
+bool is_quiet_nan_impl(T v) {
   static_assert(sizeof(T) == sizeof(U), "unexpected");
   U b = 0;
   std::memcpy(&b, &v, sizeof(T));
   return ((b & qnan_base) == qnan_base);
 }
-#  if defined(__mips__) || defined(__hppa__)
+#if defined(__mips__) || defined(__hppa__)
 inline bool is_quiet_nan(float v) {
   return is_quiet_nan_impl<float, uint32_t, 0x7FC00000u>(v) ||
          is_quiet_nan_impl<float, uint32_t, 0x7FBFFFFFu>(v);
@@ -25,14 +26,14 @@
   return is_quiet_nan_impl<double, uint64_t, 0x7FF8000000000000ul>(v) ||
          is_quiet_nan_impl<double, uint64_t, 0x7FF7FFFFFFFFFFFFu>(v);
 }
-#  else
+#else
 inline bool is_quiet_nan(float v) {
   return is_quiet_nan_impl<float, uint32_t, 0x7FC00000u>(v);
 }
 inline bool is_quiet_nan(double v) {
   return is_quiet_nan_impl<double, uint64_t, 0x7FF8000000000000ul>(v);
 }
-#  endif
+#endif
 #endif
 
 }  // namespace tests
diff --git a/tests/key_field_test.h b/tests/key_field_test.h
index bfced61..be335a4 100644
--- a/tests/key_field_test.h
+++ b/tests/key_field_test.h
@@ -9,7 +9,6 @@
 void NestedStructKeyInStructTest();
 void FixedSizedStructArrayKeyInStructTest();
 
-
 }  // namespace tests
 }  // namespace flatbuffers
 
diff --git a/tests/minified_enums/enums_generated.h b/tests/minified_enums/enums_generated.h
index cee7317..a308025 100644
--- a/tests/minified_enums/enums_generated.h
+++ b/tests/minified_enums/enums_generated.h
@@ -1,6 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-
 #ifndef FLATBUFFERS_GENERATED_ENUMS_H_
 #define FLATBUFFERS_GENERATED_ENUMS_H_
 
@@ -9,18 +8,10 @@
 // Ensure the included flatbuffers.h is the same version as when this file was
 // generated, otherwise it may not be compatible.
 static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
-              FLATBUFFERS_VERSION_MINOR == 2 &&
-              FLATBUFFERS_VERSION_REVISION == 10,
-             "Non-compatible flatbuffers version included");
+                  FLATBUFFERS_VERSION_MINOR == 2 &&
+                  FLATBUFFERS_VERSION_REVISION == 10,
+              "Non-compatible flatbuffers version included");
 
-enum Color : int32_t {
-  Color_Red = 1,
-  Color_Blue = 2,
-  Color_Orange = 3
-};
-enum Size : int32_t {
-  Size_Small = 10,
-  Size_Large = 100,
-  Size_Medium = 1000
-};
+enum Color : int32_t { Color_Red = 1, Color_Blue = 2, Color_Orange = 3 };
+enum Size : int32_t { Size_Small = 10, Size_Large = 100, Size_Medium = 1000 };
 #endif  // FLATBUFFERS_GENERATED_ENUMS_H_
diff --git a/tests/monster_test.h b/tests/monster_test.h
index 9a2110a..572b8c7 100644
--- a/tests/monster_test.h
+++ b/tests/monster_test.h
@@ -9,16 +9,16 @@
 namespace flatbuffers {
 namespace tests {
 
-flatbuffers::DetachedBuffer CreateFlatBufferTest(std::string &buffer);
+flatbuffers::DetachedBuffer CreateFlatBufferTest(std::string& buffer);
 
-void AccessFlatBufferTest(const uint8_t *flatbuf, size_t length,
-                          bool pooled = true); 
+void AccessFlatBufferTest(const uint8_t* flatbuf, size_t length,
+                          bool pooled = true);
 
-void MutateFlatBuffersTest(uint8_t *flatbuf, std::size_t length);
+void MutateFlatBuffersTest(uint8_t* flatbuf, std::size_t length);
 
-void ObjectFlatBuffersTest(uint8_t *flatbuf);
+void ObjectFlatBuffersTest(uint8_t* flatbuf);
 
-void CheckMonsterObject(MyGame::Example::MonsterT *monster2);
+void CheckMonsterObject(MyGame::Example::MonsterT* monster2);
 
 void SizePrefixedTest();
 
@@ -30,7 +30,7 @@
 
 void ParseAndGenerateTextTest(const std::string& tests_data_path, bool binary);
 
-void UnPackTo(const uint8_t *flatbuf);
+void UnPackTo(const uint8_t* flatbuf);
 
 }  // namespace tests
 }  // namespace flatbuffers
diff --git a/tests/monster_test_generated.grpc.fb.cc b/tests/monster_test_generated.grpc.fb.cc
index 2176b45..bd4953f 100644
--- a/tests/monster_test_generated.grpc.fb.cc
+++ b/tests/monster_test_generated.grpc.fb.cc
@@ -1,9 +1,8 @@
 // Generated by the gRPC C++ plugin.
-// FlatBuffers modified generator: native gRPC callback client API enabled when --grpc-callback-api.
-// source: monster_test
+// FlatBuffers modified generator: native gRPC callback client API enabled when
+// --grpc-callback-api. source: monster_test
 
 #include "monster_test_generated.h"
-#include "monster_test.grpc.fb.h"
 
 #include <grpcpp/impl/codegen/async_stream.h>
 #include <grpcpp/impl/codegen/async_unary_call.h>
@@ -13,119 +12,227 @@
 #include <grpcpp/impl/codegen/rpc_service_method.h>
 #include <grpcpp/impl/codegen/service_type.h>
 #include <grpcpp/impl/codegen/sync_stream.h>
+
+#include "monster_test.grpc.fb.h"
 namespace MyGame {
 namespace Example {
 
 static const char* MonsterStorage_method_names[] = {
-  "/MyGame.Example.MonsterStorage/Store",
-  "/MyGame.Example.MonsterStorage/Retrieve",
-  "/MyGame.Example.MonsterStorage/GetMaxHitPoint",
-  "/MyGame.Example.MonsterStorage/GetMinMaxHitPoints",
+    "/MyGame.Example.MonsterStorage/Store",
+    "/MyGame.Example.MonsterStorage/Retrieve",
+    "/MyGame.Example.MonsterStorage/GetMaxHitPoint",
+    "/MyGame.Example.MonsterStorage/GetMinMaxHitPoints",
 };
 
-std::unique_ptr< MonsterStorage::Stub> MonsterStorage::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& /*options*/) {
-  std::unique_ptr< MonsterStorage::Stub> stub(new MonsterStorage::Stub(channel));
+std::unique_ptr<MonsterStorage::Stub> MonsterStorage::NewStub(
+    const std::shared_ptr<::grpc::ChannelInterface>& channel,
+    const ::grpc::StubOptions& /*options*/) {
+  std::unique_ptr<MonsterStorage::Stub> stub(new MonsterStorage::Stub(channel));
   return stub;
 }
 
-MonsterStorage::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
-  : channel_(channel)  , rpcmethod_Store_(MonsterStorage_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
-  , rpcmethod_Retrieve_(MonsterStorage_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
-  , rpcmethod_GetMaxHitPoint_(MonsterStorage_method_names[2], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel)
-  , rpcmethod_GetMinMaxHitPoints_(MonsterStorage_method_names[3], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
-  {}
-  
-::grpc::Status MonsterStorage::Stub::Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) {
-  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Store_, context, request, response);
+MonsterStorage::Stub::Stub(
+    const std::shared_ptr<::grpc::ChannelInterface>& channel)
+    : channel_(channel),
+      rpcmethod_Store_(MonsterStorage_method_names[0],
+                       ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
+      rpcmethod_Retrieve_(MonsterStorage_method_names[1],
+                          ::grpc::internal::RpcMethod::SERVER_STREAMING,
+                          channel),
+      rpcmethod_GetMaxHitPoint_(MonsterStorage_method_names[2],
+                                ::grpc::internal::RpcMethod::CLIENT_STREAMING,
+                                channel),
+      rpcmethod_GetMinMaxHitPoints_(MonsterStorage_method_names[3],
+                                    ::grpc::internal::RpcMethod::BIDI_STREAMING,
+                                    channel) {}
+
+::grpc::Status MonsterStorage::Stub::Store(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Monster>& request,
+    flatbuffers::grpc::Message<Stat>* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Store_,
+                                             context, request, response);
 }
 
-::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, true);
+::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>*
+MonsterStorage::Stub::AsyncStoreRaw(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Monster>& request,
+    ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory<
+      flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq,
+                                                rpcmethod_Store_, context,
+                                                request, true);
 }
 
-::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, false);
+::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>*
+MonsterStorage::Stub::PrepareAsyncStoreRaw(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Monster>& request,
+    ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory<
+      flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq,
+                                                rpcmethod_Store_, context,
+                                                request, false);
 }
 
-::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) {
-  return ::grpc::internal::ClientReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_Retrieve_, context, request);
+::grpc::ClientReader<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::RetrieveRaw(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Stat>& request) {
+  return ::grpc::internal::ClientReaderFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(),
+                                                   rpcmethod_Retrieve_, context,
+                                                   request);
 }
 
-::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) {
-  return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, true, tag);
+::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::AsyncRetrieveRaw(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Stat>& request,
+    ::grpc::CompletionQueue* cq, void* tag) {
+  return ::grpc::internal::ClientAsyncReaderFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq,
+                                                   rpcmethod_Retrieve_, context,
+                                                   request, true, tag);
 }
 
-::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, false, nullptr);
+::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::PrepareAsyncRetrieveRaw(
+    ::grpc::ClientContext* context,
+    const flatbuffers::grpc::Message<Stat>& request,
+    ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncReaderFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq,
+                                                   rpcmethod_Retrieve_, context,
+                                                   request, false, nullptr);
 }
 
-::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) {
-  return ::grpc::internal::ClientWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_GetMaxHitPoint_, context, response);
+::grpc::ClientWriter<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::GetMaxHitPointRaw(
+    ::grpc::ClientContext* context,
+    flatbuffers::grpc::Message<Stat>* response) {
+  return ::grpc::internal::ClientWriterFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(),
+                                                   rpcmethod_GetMaxHitPoint_,
+                                                   context, response);
 }
 
-::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) {
-  return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, true, tag);
+::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::AsyncGetMaxHitPointRaw(
+    ::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response,
+    ::grpc::CompletionQueue* cq, void* tag) {
+  return ::grpc::internal::ClientAsyncWriterFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq,
+                                                   rpcmethod_GetMaxHitPoint_,
+                                                   context, response, true,
+                                                   tag);
 }
 
-::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, false, nullptr);
+::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>*
+MonsterStorage::Stub::PrepareAsyncGetMaxHitPointRaw(
+    ::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response,
+    ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncWriterFactory<
+      flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq,
+                                                   rpcmethod_GetMaxHitPoint_,
+                                                   context, response, false,
+                                                   nullptr);
 }
 
-::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::GetMinMaxHitPointsRaw(::grpc::ClientContext* context) {
-  return ::grpc::internal::ClientReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), rpcmethod_GetMinMaxHitPoints_, context);
+::grpc::ClientReaderWriter<flatbuffers::grpc::Message<Monster>,
+                           flatbuffers::grpc::Message<Stat>>*
+MonsterStorage::Stub::GetMinMaxHitPointsRaw(::grpc::ClientContext* context) {
+  return ::grpc::internal::ClientReaderWriterFactory<
+      flatbuffers::grpc::Message<Monster>,
+      flatbuffers::grpc::Message<Stat>>::Create(channel_.get(),
+                                                rpcmethod_GetMinMaxHitPoints_,
+                                                context);
 }
 
-::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
-  return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, true, tag);
+::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                flatbuffers::grpc::Message<Stat>>*
+MonsterStorage::Stub::AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context,
+                                                 ::grpc::CompletionQueue* cq,
+                                                 void* tag) {
+  return ::grpc::internal::ClientAsyncReaderWriterFactory<
+      flatbuffers::grpc::Message<Monster>,
+      flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq,
+                                                rpcmethod_GetMinMaxHitPoints_,
+                                                context, true, tag);
 }
 
-::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, false, nullptr);
+::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                flatbuffers::grpc::Message<Stat>>*
+MonsterStorage::Stub::PrepareAsyncGetMinMaxHitPointsRaw(
+    ::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncReaderWriterFactory<
+      flatbuffers::grpc::Message<Monster>,
+      flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq,
+                                                rpcmethod_GetMinMaxHitPoints_,
+                                                context, false, nullptr);
 }
 
 MonsterStorage::Service::Service() {
   AddMethod(new ::grpc::internal::RpcServiceMethod(
-      MonsterStorage_method_names[0],
-      ::grpc::internal::RpcMethod::NORMAL_RPC,
-      new ::grpc::internal::RpcMethodHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>(
+      MonsterStorage_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler<
+          MonsterStorage::Service, flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>(
           std::mem_fn(&MonsterStorage::Service::Store), this)));
   AddMethod(new ::grpc::internal::RpcServiceMethod(
       MonsterStorage_method_names[1],
       ::grpc::internal::RpcMethod::SERVER_STREAMING,
-      new ::grpc::internal::ServerStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>(
+      new ::grpc::internal::ServerStreamingHandler<
+          MonsterStorage::Service, flatbuffers::grpc::Message<Stat>,
+          flatbuffers::grpc::Message<Monster>>(
           std::mem_fn(&MonsterStorage::Service::Retrieve), this)));
   AddMethod(new ::grpc::internal::RpcServiceMethod(
       MonsterStorage_method_names[2],
       ::grpc::internal::RpcMethod::CLIENT_STREAMING,
-      new ::grpc::internal::ClientStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>(
+      new ::grpc::internal::ClientStreamingHandler<
+          MonsterStorage::Service, flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>(
           std::mem_fn(&MonsterStorage::Service::GetMaxHitPoint), this)));
   AddMethod(new ::grpc::internal::RpcServiceMethod(
       MonsterStorage_method_names[3],
       ::grpc::internal::RpcMethod::BIDI_STREAMING,
-      new ::grpc::internal::BidiStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>(
+      new ::grpc::internal::BidiStreamingHandler<
+          MonsterStorage::Service, flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>(
           std::mem_fn(&MonsterStorage::Service::GetMinMaxHitPoints), this)));
 }
 
-MonsterStorage::Service::~Service() {
-}
+MonsterStorage::Service::~Service() {}
 
-::grpc::Status MonsterStorage::Service::Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) {
+::grpc::Status MonsterStorage::Service::Store(
+    ::grpc::ServerContext* /*context*/,
+    const flatbuffers::grpc::Message<Monster>* /*request*/,
+    flatbuffers::grpc::Message<Stat>* /*response*/) {
   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
 }
 
-::grpc::Status MonsterStorage::Service::Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) {
+::grpc::Status MonsterStorage::Service::Retrieve(
+    ::grpc::ServerContext* /*context*/,
+    const flatbuffers::grpc::Message<Stat>* /*request*/,
+    ::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>>* /*writer*/) {
   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
 }
 
-::grpc::Status MonsterStorage::Service::GetMaxHitPoint(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* /*reader*/, flatbuffers::grpc::Message<Stat>* /*response*/) {
+::grpc::Status MonsterStorage::Service::GetMaxHitPoint(
+    ::grpc::ServerContext* /*context*/,
+    ::grpc::ServerReader<flatbuffers::grpc::Message<Monster>>* /*reader*/,
+    flatbuffers::grpc::Message<Stat>* /*response*/) {
   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
 }
 
-::grpc::Status MonsterStorage::Service::GetMinMaxHitPoints(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* /*stream*/) {
+::grpc::Status MonsterStorage::Service::GetMinMaxHitPoints(
+    ::grpc::ServerContext* /*context*/,
+    ::grpc::ServerReaderWriter<
+        flatbuffers::grpc::Message<Stat>,
+        flatbuffers::grpc::Message<Monster>>* /*stream*/) {
   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
 }
 
-
-}  // namespace MyGame
 }  // namespace Example
-
+}  // namespace MyGame
diff --git a/tests/monster_test_generated.grpc.fb.h b/tests/monster_test_generated.grpc.fb.h
index e3f3037..9a68ad9 100644
--- a/tests/monster_test_generated.grpc.fb.h
+++ b/tests/monster_test_generated.grpc.fb.h
@@ -4,9 +4,6 @@
 #ifndef GRPC_monster_5ftest__INCLUDED
 #define GRPC_monster_5ftest__INCLUDED
 
-#include "monster_test_generated.h"
-#include "flatbuffers/grpc.h"
-
 #include <grpcpp/impl/codegen/async_stream.h>
 #include <grpcpp/impl/codegen/async_unary_call.h>
 #include <grpcpp/impl/codegen/method_handler.h>
@@ -17,6 +14,9 @@
 #include <grpcpp/impl/codegen/stub_options.h>
 #include <grpcpp/impl/codegen/sync_stream.h>
 
+#include "flatbuffers/grpc.h"
+#include "monster_test_generated.h"
+
 namespace grpc {
 class CompletionQueue;
 class Channel;
@@ -35,184 +35,421 @@
   class StubInterface {
    public:
     virtual ~StubInterface() {}
-    virtual ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) = 0;
-    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>>(AsyncStoreRaw(context, request, cq));
+    virtual ::grpc::Status Store(
+        ::grpc::ClientContext* context,
+        const flatbuffers::grpc::Message<Monster>& request,
+        flatbuffers::grpc::Message<Stat>* response) = 0;
+    std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
+        flatbuffers::grpc::Message<Stat>>>
+    AsyncStore(::grpc::ClientContext* context,
+               const flatbuffers::grpc::Message<Monster>& request,
+               ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
+          flatbuffers::grpc::Message<Stat>>>(
+          AsyncStoreRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>> PrepareAsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>>(PrepareAsyncStoreRaw(context, request, cq));
+    std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
+        flatbuffers::grpc::Message<Stat>>>
+    PrepareAsyncStore(::grpc::ClientContext* context,
+                      const flatbuffers::grpc::Message<Monster>& request,
+                      ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
+          flatbuffers::grpc::Message<Stat>>>(
+          PrepareAsyncStoreRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) {
-      return std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>>(RetrieveRaw(context, request));
+    std::unique_ptr<
+        ::grpc::ClientReaderInterface<flatbuffers::grpc::Message<Monster>>>
+    Retrieve(::grpc::ClientContext* context,
+             const flatbuffers::grpc::Message<Stat>& request) {
+      return std::unique_ptr<
+          ::grpc::ClientReaderInterface<flatbuffers::grpc::Message<Monster>>>(
+          RetrieveRaw(context, request));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>>(AsyncRetrieveRaw(context, request, cq, tag));
+    std::unique_ptr<
+        ::grpc::ClientAsyncReaderInterface<flatbuffers::grpc::Message<Monster>>>
+    AsyncRetrieve(::grpc::ClientContext* context,
+                  const flatbuffers::grpc::Message<Stat>& request,
+                  ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<::grpc::ClientAsyncReaderInterface<
+          flatbuffers::grpc::Message<Monster>>>(
+          AsyncRetrieveRaw(context, request, cq, tag));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>> PrepareAsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncRetrieveRaw(context, request, cq));
+    std::unique_ptr<
+        ::grpc::ClientAsyncReaderInterface<flatbuffers::grpc::Message<Monster>>>
+    PrepareAsyncRetrieve(::grpc::ClientContext* context,
+                         const flatbuffers::grpc::Message<Stat>& request,
+                         ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<::grpc::ClientAsyncReaderInterface<
+          flatbuffers::grpc::Message<Monster>>>(
+          PrepareAsyncRetrieveRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>> GetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) {
-      return std::unique_ptr< ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>>(GetMaxHitPointRaw(context, response));
+    std::unique_ptr<
+        ::grpc::ClientWriterInterface<flatbuffers::grpc::Message<Monster>>>
+    GetMaxHitPoint(::grpc::ClientContext* context,
+                   flatbuffers::grpc::Message<Stat>* response) {
+      return std::unique_ptr<
+          ::grpc::ClientWriterInterface<flatbuffers::grpc::Message<Monster>>>(
+          GetMaxHitPointRaw(context, response));
     }
-    std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>> AsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>>(AsyncGetMaxHitPointRaw(context, response, cq, tag));
+    std::unique_ptr<
+        ::grpc::ClientAsyncWriterInterface<flatbuffers::grpc::Message<Monster>>>
+    AsyncGetMaxHitPoint(::grpc::ClientContext* context,
+                        flatbuffers::grpc::Message<Stat>* response,
+                        ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<::grpc::ClientAsyncWriterInterface<
+          flatbuffers::grpc::Message<Monster>>>(
+          AsyncGetMaxHitPointRaw(context, response, cq, tag));
     }
-    std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>> PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncGetMaxHitPointRaw(context, response, cq));
+    std::unique_ptr<
+        ::grpc::ClientAsyncWriterInterface<flatbuffers::grpc::Message<Monster>>>
+    PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context,
+                               flatbuffers::grpc::Message<Stat>* response,
+                               ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<::grpc::ClientAsyncWriterInterface<
+          flatbuffers::grpc::Message<Monster>>>(
+          PrepareAsyncGetMaxHitPointRaw(context, response, cq));
     }
-    std::unique_ptr< ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> GetMinMaxHitPoints(::grpc::ClientContext* context) {
-      return std::unique_ptr< ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(GetMinMaxHitPointsRaw(context));
+    std::unique_ptr<::grpc::ClientReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    GetMinMaxHitPoints(::grpc::ClientContext* context) {
+      return std::unique_ptr<::grpc::ClientReaderWriterInterface<
+          flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>>(GetMinMaxHitPointsRaw(context));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> AsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(AsyncGetMinMaxHitPointsRaw(context, cq, tag));
+    std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    AsyncGetMinMaxHitPoints(::grpc::ClientContext* context,
+                            ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
+          flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>>(
+          AsyncGetMinMaxHitPointsRaw(context, cq, tag));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(PrepareAsyncGetMinMaxHitPointsRaw(context, cq));
+    std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context,
+                                   ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
+          flatbuffers::grpc::Message<Monster>,
+          flatbuffers::grpc::Message<Stat>>>(
+          PrepareAsyncGetMinMaxHitPointsRaw(context, cq));
     }
-  private:
-    virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) = 0;
-    virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>* PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) = 0;
-    virtual ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) = 0;
-    virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
-    virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>* PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) = 0;
-    virtual ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>* GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) = 0;
-    virtual ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>* AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
-    virtual ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>* PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) = 0;
-    virtual ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* GetMinMaxHitPointsRaw(::grpc::ClientContext* context) = 0;
-    virtual ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
-    virtual ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
+
+   private:
+    virtual ::grpc::ClientAsyncResponseReaderInterface<
+        flatbuffers::grpc::Message<Stat>>*
+    AsyncStoreRaw(::grpc::ClientContext* context,
+                  const flatbuffers::grpc::Message<Monster>& request,
+                  ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface<
+        flatbuffers::grpc::Message<Stat>>*
+    PrepareAsyncStoreRaw(::grpc::ClientContext* context,
+                         const flatbuffers::grpc::Message<Monster>& request,
+                         ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientReaderInterface<flatbuffers::grpc::Message<Monster>>*
+    RetrieveRaw(::grpc::ClientContext* context,
+                const flatbuffers::grpc::Message<Stat>& request) = 0;
+    virtual ::grpc::ClientAsyncReaderInterface<
+        flatbuffers::grpc::Message<Monster>>*
+    AsyncRetrieveRaw(::grpc::ClientContext* context,
+                     const flatbuffers::grpc::Message<Stat>& request,
+                     ::grpc::CompletionQueue* cq, void* tag) = 0;
+    virtual ::grpc::ClientAsyncReaderInterface<
+        flatbuffers::grpc::Message<Monster>>*
+    PrepareAsyncRetrieveRaw(::grpc::ClientContext* context,
+                            const flatbuffers::grpc::Message<Stat>& request,
+                            ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientWriterInterface<flatbuffers::grpc::Message<Monster>>*
+    GetMaxHitPointRaw(::grpc::ClientContext* context,
+                      flatbuffers::grpc::Message<Stat>* response) = 0;
+    virtual ::grpc::ClientAsyncWriterInterface<
+        flatbuffers::grpc::Message<Monster>>*
+    AsyncGetMaxHitPointRaw(::grpc::ClientContext* context,
+                           flatbuffers::grpc::Message<Stat>* response,
+                           ::grpc::CompletionQueue* cq, void* tag) = 0;
+    virtual ::grpc::ClientAsyncWriterInterface<
+        flatbuffers::grpc::Message<Monster>>*
+    PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context,
+                                  flatbuffers::grpc::Message<Stat>* response,
+                                  ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>*
+    GetMinMaxHitPointsRaw(::grpc::ClientContext* context) = 0;
+    virtual ::grpc::ClientAsyncReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>*
+    AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context,
+                               ::grpc::CompletionQueue* cq, void* tag) = 0;
+    virtual ::grpc::ClientAsyncReaderWriterInterface<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>*
+    PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context,
+                                      ::grpc::CompletionQueue* cq) = 0;
   };
   class Stub final : public StubInterface {
    public:
-    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
-    ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) override;
-    std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>>(AsyncStoreRaw(context, request, cq));
+    Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel);
+    ::grpc::Status Store(::grpc::ClientContext* context,
+                         const flatbuffers::grpc::Message<Monster>& request,
+                         flatbuffers::grpc::Message<Stat>* response) override;
+    std::unique_ptr<
+        ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>>
+    AsyncStore(::grpc::ClientContext* context,
+               const flatbuffers::grpc::Message<Monster>& request,
+               ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>>(
+          AsyncStoreRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>> PrepareAsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>>(PrepareAsyncStoreRaw(context, request, cq));
+    std::unique_ptr<
+        ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>>
+    PrepareAsyncStore(::grpc::ClientContext* context,
+                      const flatbuffers::grpc::Message<Monster>& request,
+                      ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>>(
+          PrepareAsyncStoreRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) {
-      return std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>>(RetrieveRaw(context, request));
+    std::unique_ptr<::grpc::ClientReader<flatbuffers::grpc::Message<Monster>>>
+    Retrieve(::grpc::ClientContext* context,
+             const flatbuffers::grpc::Message<Stat>& request) {
+      return std::unique_ptr<
+          ::grpc::ClientReader<flatbuffers::grpc::Message<Monster>>>(
+          RetrieveRaw(context, request));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>>(AsyncRetrieveRaw(context, request, cq, tag));
+    std::unique_ptr<
+        ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>>
+    AsyncRetrieve(::grpc::ClientContext* context,
+                  const flatbuffers::grpc::Message<Stat>& request,
+                  ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>>(
+          AsyncRetrieveRaw(context, request, cq, tag));
     }
-    std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>> PrepareAsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncRetrieveRaw(context, request, cq));
+    std::unique_ptr<
+        ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>>
+    PrepareAsyncRetrieve(::grpc::ClientContext* context,
+                         const flatbuffers::grpc::Message<Stat>& request,
+                         ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>>(
+          PrepareAsyncRetrieveRaw(context, request, cq));
     }
-    std::unique_ptr< ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>> GetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) {
-      return std::unique_ptr< ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>>(GetMaxHitPointRaw(context, response));
+    std::unique_ptr<::grpc::ClientWriter<flatbuffers::grpc::Message<Monster>>>
+    GetMaxHitPoint(::grpc::ClientContext* context,
+                   flatbuffers::grpc::Message<Stat>* response) {
+      return std::unique_ptr<
+          ::grpc::ClientWriter<flatbuffers::grpc::Message<Monster>>>(
+          GetMaxHitPointRaw(context, response));
     }
-    std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>> AsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>>(AsyncGetMaxHitPointRaw(context, response, cq, tag));
+    std::unique_ptr<
+        ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>>
+    AsyncGetMaxHitPoint(::grpc::ClientContext* context,
+                        flatbuffers::grpc::Message<Stat>* response,
+                        ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>>(
+          AsyncGetMaxHitPointRaw(context, response, cq, tag));
     }
-    std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>> PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncGetMaxHitPointRaw(context, response, cq));
+    std::unique_ptr<
+        ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>>
+    PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context,
+                               flatbuffers::grpc::Message<Stat>* response,
+                               ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>>(
+          PrepareAsyncGetMaxHitPointRaw(context, response, cq));
     }
-    std::unique_ptr< ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> GetMinMaxHitPoints(::grpc::ClientContext* context) {
-      return std::unique_ptr< ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(GetMinMaxHitPointsRaw(context));
+    std::unique_ptr<::grpc::ClientReaderWriter<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    GetMinMaxHitPoints(::grpc::ClientContext* context) {
+      return std::unique_ptr<
+          ::grpc::ClientReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                     flatbuffers::grpc::Message<Stat>>>(
+          GetMinMaxHitPointsRaw(context));
     }
-    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> AsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(AsyncGetMinMaxHitPointsRaw(context, cq, tag));
+    std::unique_ptr<::grpc::ClientAsyncReaderWriter<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    AsyncGetMinMaxHitPoints(::grpc::ClientContext* context,
+                            ::grpc::CompletionQueue* cq, void* tag) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                          flatbuffers::grpc::Message<Stat>>>(
+          AsyncGetMinMaxHitPointsRaw(context, cq, tag));
     }
-    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(PrepareAsyncGetMinMaxHitPointsRaw(context, cq));
+    std::unique_ptr<::grpc::ClientAsyncReaderWriter<
+        flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>
+    PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context,
+                                   ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr<
+          ::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                          flatbuffers::grpc::Message<Stat>>>(
+          PrepareAsyncGetMinMaxHitPointsRaw(context, cq));
     }
-  
+
    private:
-    std::shared_ptr< ::grpc::ChannelInterface> channel_;
-    ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) override;
-    ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) override;
-    ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) override;
-    ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) override;
-    ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) override;
-    ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>* GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) override;
-    ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) override;
-    ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) override;
-    ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* GetMinMaxHitPointsRaw(::grpc::ClientContext* context) override;
-    ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
-    ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
+    std::shared_ptr<::grpc::ChannelInterface> channel_;
+    ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>*
+    AsyncStoreRaw(::grpc::ClientContext* context,
+                  const flatbuffers::grpc::Message<Monster>& request,
+                  ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader<flatbuffers::grpc::Message<Stat>>*
+    PrepareAsyncStoreRaw(::grpc::ClientContext* context,
+                         const flatbuffers::grpc::Message<Monster>& request,
+                         ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientReader<flatbuffers::grpc::Message<Monster>>* RetrieveRaw(
+        ::grpc::ClientContext* context,
+        const flatbuffers::grpc::Message<Stat>& request) override;
+    ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>*
+    AsyncRetrieveRaw(::grpc::ClientContext* context,
+                     const flatbuffers::grpc::Message<Stat>& request,
+                     ::grpc::CompletionQueue* cq, void* tag) override;
+    ::grpc::ClientAsyncReader<flatbuffers::grpc::Message<Monster>>*
+    PrepareAsyncRetrieveRaw(::grpc::ClientContext* context,
+                            const flatbuffers::grpc::Message<Stat>& request,
+                            ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientWriter<flatbuffers::grpc::Message<Monster>>*
+    GetMaxHitPointRaw(::grpc::ClientContext* context,
+                      flatbuffers::grpc::Message<Stat>* response) override;
+    ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>*
+    AsyncGetMaxHitPointRaw(::grpc::ClientContext* context,
+                           flatbuffers::grpc::Message<Stat>* response,
+                           ::grpc::CompletionQueue* cq, void* tag) override;
+    ::grpc::ClientAsyncWriter<flatbuffers::grpc::Message<Monster>>*
+    PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context,
+                                  flatbuffers::grpc::Message<Stat>* response,
+                                  ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientReaderWriter<flatbuffers::grpc::Message<Monster>,
+                               flatbuffers::grpc::Message<Stat>>*
+    GetMinMaxHitPointsRaw(::grpc::ClientContext* context) override;
+    ::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                    flatbuffers::grpc::Message<Stat>>*
+    AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context,
+                               ::grpc::CompletionQueue* cq, void* tag) override;
+    ::grpc::ClientAsyncReaderWriter<flatbuffers::grpc::Message<Monster>,
+                                    flatbuffers::grpc::Message<Stat>>*
+    PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context,
+                                      ::grpc::CompletionQueue* cq) override;
     const ::grpc::internal::RpcMethod rpcmethod_Store_;
     const ::grpc::internal::RpcMethod rpcmethod_Retrieve_;
     const ::grpc::internal::RpcMethod rpcmethod_GetMaxHitPoint_;
     const ::grpc::internal::RpcMethod rpcmethod_GetMinMaxHitPoints_;
   };
-  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
-  
+  static std::unique_ptr<Stub> NewStub(
+      const std::shared_ptr<::grpc::ChannelInterface>& channel,
+      const ::grpc::StubOptions& options = ::grpc::StubOptions());
+
   class Service : public ::grpc::Service {
    public:
     Service();
     virtual ~Service();
-    virtual ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Monster>* request, flatbuffers::grpc::Message<Stat>* response);
-    virtual ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* writer);
-    virtual ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* reader, flatbuffers::grpc::Message<Stat>* response);
-    virtual ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream);
+    virtual ::grpc::Status Store(
+        ::grpc::ServerContext* context,
+        const flatbuffers::grpc::Message<Monster>* request,
+        flatbuffers::grpc::Message<Stat>* response);
+    virtual ::grpc::Status Retrieve(
+        ::grpc::ServerContext* context,
+        const flatbuffers::grpc::Message<Stat>* request,
+        ::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>>* writer);
+    virtual ::grpc::Status GetMaxHitPoint(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerReader<flatbuffers::grpc::Message<Monster>>* reader,
+        flatbuffers::grpc::Message<Stat>* response);
+    virtual ::grpc::Status GetMinMaxHitPoints(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerReaderWriter<flatbuffers::grpc::Message<Stat>,
+                                   flatbuffers::grpc::Message<Monster>>*
+            stream);
   };
   template <class BaseClass>
   class WithAsyncMethod_Store : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
-    WithAsyncMethod_Store() {
-      ::grpc::Service::MarkMethodAsync(0);
-    }
+    WithAsyncMethod_Store() { ::grpc::Service::MarkMethodAsync(0); }
     ~WithAsyncMethod_Store() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) final override {
+    ::grpc::Status Store(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Monster>* /*request*/,
+        flatbuffers::grpc::Message<Stat>* /*response*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
-    void RequestStore(::grpc::ServerContext* context, flatbuffers::grpc::Message<Monster>* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message<Stat>>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
+    void RequestStore(
+        ::grpc::ServerContext* context,
+        flatbuffers::grpc::Message<Monster>* request,
+        ::grpc::ServerAsyncResponseWriter<flatbuffers::grpc::Message<Stat>>*
+            response,
+        ::grpc::CompletionQueue* new_call_cq,
+        ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
+      ::grpc::Service::RequestAsyncUnary(0, context, request, response,
+                                         new_call_cq, notification_cq, tag);
     }
   };
   template <class BaseClass>
   class WithAsyncMethod_Retrieve : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
-    WithAsyncMethod_Retrieve() {
-      ::grpc::Service::MarkMethodAsync(1);
-    }
+    WithAsyncMethod_Retrieve() { ::grpc::Service::MarkMethodAsync(1); }
     ~WithAsyncMethod_Retrieve() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) final override {
+    ::grpc::Status Retrieve(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Stat>* /*request*/,
+        ::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>>* /*writer*/)
+        final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
-    void RequestRetrieve(::grpc::ServerContext* context, flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerAsyncWriter< flatbuffers::grpc::Message<Monster>>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag);
+    void RequestRetrieve(
+        ::grpc::ServerContext* context,
+        flatbuffers::grpc::Message<Stat>* request,
+        ::grpc::ServerAsyncWriter<flatbuffers::grpc::Message<Monster>>* writer,
+        ::grpc::CompletionQueue* new_call_cq,
+        ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
+      ::grpc::Service::RequestAsyncServerStreaming(
+          1, context, request, writer, new_call_cq, notification_cq, tag);
     }
   };
   template <class BaseClass>
   class WithAsyncMethod_GetMaxHitPoint : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
-    WithAsyncMethod_GetMaxHitPoint() {
-      ::grpc::Service::MarkMethodAsync(2);
-    }
+    WithAsyncMethod_GetMaxHitPoint() { ::grpc::Service::MarkMethodAsync(2); }
     ~WithAsyncMethod_GetMaxHitPoint() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* /*reader*/, flatbuffers::grpc::Message<Stat>* /*response*/) final override {
+    ::grpc::Status GetMaxHitPoint(
+        ::grpc::ServerContext* /*context*/,
+        ::grpc::ServerReader<flatbuffers::grpc::Message<Monster>>* /*reader*/,
+        flatbuffers::grpc::Message<Stat>* /*response*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
-    void RequestGetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag);
+    void RequestGetMaxHitPoint(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerAsyncReader<flatbuffers::grpc::Message<Stat>,
+                                  flatbuffers::grpc::Message<Monster>>* reader,
+        ::grpc::CompletionQueue* new_call_cq,
+        ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
+      ::grpc::Service::RequestAsyncClientStreaming(
+          2, context, reader, new_call_cq, notification_cq, tag);
     }
   };
   template <class BaseClass>
   class WithAsyncMethod_GetMinMaxHitPoints : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
     WithAsyncMethod_GetMinMaxHitPoints() {
       ::grpc::Service::MarkMethodAsync(3);
@@ -221,28 +458,44 @@
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* /*stream*/) final override {
+    ::grpc::Status GetMinMaxHitPoints(
+        ::grpc::ServerContext* /*context*/,
+        ::grpc::ServerReaderWriter<
+            flatbuffers::grpc::Message<Stat>,
+            flatbuffers::grpc::Message<Monster>>* /*stream*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
-    void RequestGetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
+    void RequestGetMinMaxHitPoints(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerAsyncReaderWriter<flatbuffers::grpc::Message<Stat>,
+                                        flatbuffers::grpc::Message<Monster>>*
+            stream,
+        ::grpc::CompletionQueue* new_call_cq,
+        ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
+      ::grpc::Service::RequestAsyncBidiStreaming(
+          3, context, stream, new_call_cq, notification_cq, tag);
     }
   };
-  typedef   WithAsyncMethod_Store<  WithAsyncMethod_Retrieve<  WithAsyncMethod_GetMaxHitPoint<  WithAsyncMethod_GetMinMaxHitPoints<  Service   >   >   >   >   AsyncService;
+  typedef WithAsyncMethod_Store<
+      WithAsyncMethod_Retrieve<WithAsyncMethod_GetMaxHitPoint<
+          WithAsyncMethod_GetMinMaxHitPoints<Service>>>>
+      AsyncService;
   template <class BaseClass>
   class WithGenericMethod_Store : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
-    WithGenericMethod_Store() {
-      ::grpc::Service::MarkMethodGeneric(0);
-    }
+    WithGenericMethod_Store() { ::grpc::Service::MarkMethodGeneric(0); }
     ~WithGenericMethod_Store() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) final override {
+    ::grpc::Status Store(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Monster>* /*request*/,
+        flatbuffers::grpc::Message<Stat>* /*response*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
@@ -250,16 +503,19 @@
   template <class BaseClass>
   class WithGenericMethod_Retrieve : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
-    WithGenericMethod_Retrieve() {
-      ::grpc::Service::MarkMethodGeneric(1);
-    }
+    WithGenericMethod_Retrieve() { ::grpc::Service::MarkMethodGeneric(1); }
     ~WithGenericMethod_Retrieve() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) final override {
+    ::grpc::Status Retrieve(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Stat>* /*request*/,
+        ::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>>* /*writer*/)
+        final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
@@ -267,7 +523,8 @@
   template <class BaseClass>
   class WithGenericMethod_GetMaxHitPoint : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
     WithGenericMethod_GetMaxHitPoint() {
       ::grpc::Service::MarkMethodGeneric(2);
@@ -276,7 +533,10 @@
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* /*reader*/, flatbuffers::grpc::Message<Stat>* /*response*/) final override {
+    ::grpc::Status GetMaxHitPoint(
+        ::grpc::ServerContext* /*context*/,
+        ::grpc::ServerReader<flatbuffers::grpc::Message<Monster>>* /*reader*/,
+        flatbuffers::grpc::Message<Stat>* /*response*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
@@ -284,7 +544,8 @@
   template <class BaseClass>
   class WithGenericMethod_GetMinMaxHitPoints : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
     WithGenericMethod_GetMinMaxHitPoints() {
       ::grpc::Service::MarkMethodGeneric(3);
@@ -293,7 +554,11 @@
       BaseClassMustBeDerivedFromService(this);
     }
     // disable synchronous version of this method
-    ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* /*stream*/) final override {
+    ::grpc::Status GetMinMaxHitPoints(
+        ::grpc::ServerContext* /*context*/,
+        ::grpc::ServerReaderWriter<
+            flatbuffers::grpc::Message<Stat>,
+            flatbuffers::grpc::Message<Monster>>* /*stream*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
@@ -301,50 +566,77 @@
   template <class BaseClass>
   class WithStreamedUnaryMethod_Store : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) {}
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
     WithStreamedUnaryMethod_Store() {
-      ::grpc::Service::MarkMethodStreamed(0,
-        new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>(std::bind(&WithStreamedUnaryMethod_Store<BaseClass>::StreamedStore, this, std::placeholders::_1, std::placeholders::_2)));
+      ::grpc::Service::MarkMethodStreamed(
+          0, new ::grpc::internal::StreamedUnaryHandler<
+                 flatbuffers::grpc::Message<Monster>,
+                 flatbuffers::grpc::Message<Stat>>(std::bind(
+                 &WithStreamedUnaryMethod_Store<BaseClass>::StreamedStore, this,
+                 std::placeholders::_1, std::placeholders::_2)));
     }
     ~WithStreamedUnaryMethod_Store() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable regular version of this method
-    ::grpc::Status Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) final override {
+    ::grpc::Status Store(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Monster>* /*request*/,
+        flatbuffers::grpc::Message<Stat>* /*response*/) final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
     // replace default version of method with streamed unary
-    virtual ::grpc::Status StreamedStore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message<Monster>,flatbuffers::grpc::Message<Stat>>* server_unary_streamer) = 0;
+    virtual ::grpc::Status StreamedStore(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerUnaryStreamer<flatbuffers::grpc::Message<Monster>,
+                                    flatbuffers::grpc::Message<Stat>>*
+            server_unary_streamer) = 0;
   };
-  typedef   WithStreamedUnaryMethod_Store<  Service   >   StreamedUnaryService;
+  typedef WithStreamedUnaryMethod_Store<Service> StreamedUnaryService;
   template <class BaseClass>
   class WithSplitStreamingMethod_Retrieve : public BaseClass {
    private:
-    void BaseClassMustBeDerivedFromService(const Service */*service*/) { }
+    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+
    public:
     WithSplitStreamingMethod_Retrieve() {
-      ::grpc::Service::MarkMethodStreamed(1,
-        new ::grpc::internal::SplitServerStreamingHandler< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>(std::bind(&WithSplitStreamingMethod_Retrieve<BaseClass>::StreamedRetrieve, this, std::placeholders::_1, std::placeholders::_2)));
+      ::grpc::Service::MarkMethodStreamed(
+          1,
+          new ::grpc::internal::SplitServerStreamingHandler<
+              flatbuffers::grpc::Message<Stat>,
+              flatbuffers::grpc::Message<Monster>>(std::bind(
+              &WithSplitStreamingMethod_Retrieve<BaseClass>::StreamedRetrieve,
+              this, std::placeholders::_1, std::placeholders::_2)));
     }
     ~WithSplitStreamingMethod_Retrieve() override {
       BaseClassMustBeDerivedFromService(this);
     }
     // disable regular version of this method
-    ::grpc::Status Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) final override {
+    ::grpc::Status Retrieve(
+        ::grpc::ServerContext* /*context*/,
+        const flatbuffers::grpc::Message<Stat>* /*request*/,
+        ::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>>* /*writer*/)
+        final override {
       abort();
       return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     }
     // replace default version of method with split streamed
-    virtual ::grpc::Status StreamedRetrieve(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>>* server_split_streamer) = 0;
+    virtual ::grpc::Status StreamedRetrieve(
+        ::grpc::ServerContext* context,
+        ::grpc::ServerSplitStreamer<flatbuffers::grpc::Message<Stat>,
+                                    flatbuffers::grpc::Message<Monster>>*
+            server_split_streamer) = 0;
   };
-  typedef   WithSplitStreamingMethod_Retrieve<  Service   >   SplitStreamedService;
-  typedef   WithStreamedUnaryMethod_Store<  WithSplitStreamingMethod_Retrieve<  Service   >   >   StreamedService;
+  typedef WithSplitStreamingMethod_Retrieve<Service> SplitStreamedService;
+  typedef WithStreamedUnaryMethod_Store<
+      WithSplitStreamingMethod_Retrieve<Service>>
+      StreamedService;
 };
 
 }  // namespace Example
 }  // namespace MyGame
 
-
 #endif  // GRPC_monster_5ftest__INCLUDED
diff --git a/tests/monster_test_generated.ts b/tests/monster_test_generated.ts
index 5fd080e..e66b82c 100644
--- a/tests/monster_test_generated.ts
+++ b/tests/monster_test_generated.ts
@@ -1,19 +1,42 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-export { Monster as MyGame_Example2_Monster, MonsterT as MyGame_Example2_MonsterT } from './my-game/example2/monster';
-export { Ability, AbilityT } from './my-game/example/ability';
-export { Any, unionToAny, unionListToAny } from './my-game/example/any';
-export { AnyAmbiguousAliases, unionToAnyAmbiguousAliases, unionListToAnyAmbiguousAliases } from './my-game/example/any-ambiguous-aliases';
-export { AnyUniqueAliases, unionToAnyUniqueAliases, unionListToAnyUniqueAliases } from './my-game/example/any-unique-aliases';
-export { Color } from './my-game/example/color';
-export { Monster, MonsterT } from './my-game/example/monster';
-export { Race } from './my-game/example/race';
-export { Referrable, ReferrableT } from './my-game/example/referrable';
-export { Stat, StatT } from './my-game/example/stat';
-export { StructOfStructs, StructOfStructsT } from './my-game/example/struct-of-structs';
-export { StructOfStructsOfStructs, StructOfStructsOfStructsT } from './my-game/example/struct-of-structs-of-structs';
-export { Test, TestT } from './my-game/example/test';
-export { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from './my-game/example/test-simple-table-with-enum';
-export { TypeAliases, TypeAliasesT } from './my-game/example/type-aliases';
-export { Vec3, Vec3T } from './my-game/example/vec3';
-export { InParentNamespace, InParentNamespaceT } from './my-game/in-parent-namespace';
+export {Ability, AbilityT} from './my-game/example/ability';
+export {Any, unionListToAny, unionToAny} from './my-game/example/any';
+export {
+  AnyAmbiguousAliases,
+  unionListToAnyAmbiguousAliases,
+  unionToAnyAmbiguousAliases,
+} from './my-game/example/any-ambiguous-aliases';
+export {
+  AnyUniqueAliases,
+  unionListToAnyUniqueAliases,
+  unionToAnyUniqueAliases,
+} from './my-game/example/any-unique-aliases';
+export {Color} from './my-game/example/color';
+export {Monster, MonsterT} from './my-game/example/monster';
+export {Race} from './my-game/example/race';
+export {Referrable, ReferrableT} from './my-game/example/referrable';
+export {Stat, StatT} from './my-game/example/stat';
+export {
+  StructOfStructs,
+  StructOfStructsT,
+} from './my-game/example/struct-of-structs';
+export {
+  StructOfStructsOfStructs,
+  StructOfStructsOfStructsT,
+} from './my-game/example/struct-of-structs-of-structs';
+export {Test, TestT} from './my-game/example/test';
+export {
+  TestSimpleTableWithEnum,
+  TestSimpleTableWithEnumT,
+} from './my-game/example/test-simple-table-with-enum';
+export {TypeAliases, TypeAliasesT} from './my-game/example/type-aliases';
+export {Vec3, Vec3T} from './my-game/example/vec3';
+export {
+  Monster as MyGame_Example2_Monster,
+  MonsterT as MyGame_Example2_MonsterT,
+} from './my-game/example2/monster';
+export {
+  InParentNamespace,
+  InParentNamespaceT,
+} from './my-game/in-parent-namespace';
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.java b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.java
index 949c204..4b3c57c 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.java
@@ -4,13 +4,17 @@
 
 @SuppressWarnings("unused")
 public final class EnumInNestedNS {
-  private EnumInNestedNS() { }
+  private EnumInNestedNS() {}
+
   public static final byte A = 0;
   public static final byte B = 1;
   public static final byte C = 2;
 
-  public static final String[] names = { "A", "B", "C", };
+  public static final String[] names = {
+    "A", "B", "C",
+  };
 
-  public static String name(int e) { return names[e]; }
+  public static String name(int e) {
+    return names[e];
+  }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.kt b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.kt
index 0ede58c..d3ca4a2 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.kt
+++ b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.kt
@@ -5,11 +5,12 @@
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class EnumInNestedNS private constructor() {
-    companion object {
-        const val A: Byte = 0
-        const val B: Byte = 1
-        const val C: Byte = 2
-        val names : Array<String> = arrayOf("A", "B", "C")
-        fun name(e: Int) : String = names[e]
-    }
+  companion object {
+    const val A: Byte = 0
+    const val B: Byte = 1
+    const val C: Byte = 2
+    val names: Array<String> = arrayOf("A", "B", "C")
+
+    fun name(e: Int): String = names[e]
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.py b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.py
index ae74c54..da4d77a 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.py
+++ b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.py
@@ -2,7 +2,8 @@
 
 # namespace: NamespaceB
 
+
 class EnumInNestedNS(object):
-    A = 0
-    B = 1
-    C = 2
+  A = 0
+  B = 1
+  C = 2
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
index 854403f..105e3c3 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
@@ -12,7 +12,9 @@
 }
 
 func (t *StructInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	return CreateStructInNestedNS(builder, t.A, t.B)
 }
 func (rcv *StructInNestedNS) UnPackTo(t *StructInNestedNST) {
@@ -21,7 +23,9 @@
 }
 
 func (rcv *StructInNestedNS) UnPack() *StructInNestedNST {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &StructInNestedNST{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.java b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.java
index 7184f03..8ed8afa 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.java
@@ -2,20 +2,36 @@
 
 package NamespaceA.NamespaceB;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 @SuppressWarnings("unused")
 public final class StructInNestedNS extends Struct {
-  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
-  public StructInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+  public void __init(int _i, ByteBuffer _bb) {
+    __reset(_i, _bb);
+  }
 
-  public int a() { return bb.getInt(bb_pos + 0); }
-  public void mutateA(int a) { bb.putInt(bb_pos + 0, a); }
-  public int b() { return bb.getInt(bb_pos + 4); }
-  public void mutateB(int b) { bb.putInt(bb_pos + 4, b); }
+  public StructInNestedNS __assign(int _i, ByteBuffer _bb) {
+    __init(_i, _bb);
+    return this;
+  }
+
+  public int a() {
+    return bb.getInt(bb_pos + 0);
+  }
+
+  public void mutateA(int a) {
+    bb.putInt(bb_pos + 0, a);
+  }
+
+  public int b() {
+    return bb.getInt(bb_pos + 4);
+  }
+
+  public void mutateB(int b) {
+    bb.putInt(bb_pos + 4, b);
+  }
 
   public static int createStructInNestedNS(FlatBufferBuilder builder, int a, int b) {
     builder.prep(4, 8);
@@ -25,28 +41,35 @@
   }
 
   public static final class Vector extends BaseVector {
-    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
+    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
+      __reset(_vector, _element_size, _bb);
+      return this;
+    }
 
-    public StructInNestedNS get(int j) { return get(new StructInNestedNS(), j); }
-    public StructInNestedNS get(StructInNestedNS obj, int j) {  return obj.__assign(__element(j), bb); }
+    public StructInNestedNS get(int j) {
+      return get(new StructInNestedNS(), j);
+    }
+
+    public StructInNestedNS get(StructInNestedNS obj, int j) {
+      return obj.__assign(__element(j), bb);
+    }
   }
+
   public StructInNestedNST unpack() {
     StructInNestedNST _o = new StructInNestedNST();
     unpackTo(_o);
     return _o;
   }
+
   public void unpackTo(StructInNestedNST _o) {
     int _oA = a();
     _o.setA(_oA);
     int _oB = b();
     _o.setB(_oB);
   }
+
   public static int pack(FlatBufferBuilder builder, StructInNestedNST _o) {
     if (_o == null) return 0;
-    return createStructInNestedNS(
-      builder,
-      _o.getA(),
-      _o.getB());
+    return createStructInNestedNS(builder, _o.getA(), _o.getB());
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.kt b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.kt
index 7aad3c4..486fd3e 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.kt
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.kt
@@ -2,43 +2,39 @@
 
 package NamespaceA.NamespaceB
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
-import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
 import com.google.flatbuffers.Struct
-import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
-import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class StructInNestedNS : Struct() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): StructInNestedNS {
+    __init(_i, _bb)
+    return this
+  }
+
+  val a: Int
+    get() = bb.getInt(bb_pos + 0)
+
+  fun mutateA(a: Int): ByteBuffer = bb.putInt(bb_pos + 0, a)
+
+  val b: Int
+    get() = bb.getInt(bb_pos + 4)
+
+  fun mutateB(b: Int): ByteBuffer = bb.putInt(bb_pos + 4, b)
+
+  companion object {
+    fun createStructInNestedNS(builder: FlatBufferBuilder, a: Int, b: Int): Int {
+      builder.prep(4, 8)
+      builder.putInt(b)
+      builder.putInt(a)
+      return builder.offset()
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : StructInNestedNS {
-        __init(_i, _bb)
-        return this
-    }
-    val a : Int get() = bb.getInt(bb_pos + 0)
-    fun mutateA(a: Int) : ByteBuffer = bb.putInt(bb_pos + 0, a)
-    val b : Int get() = bb.getInt(bb_pos + 4)
-    fun mutateB(b: Int) : ByteBuffer = bb.putInt(bb_pos + 4, b)
-    companion object {
-        fun createStructInNestedNS(builder: FlatBufferBuilder, a: Int, b: Int) : Int {
-            builder.prep(4, 8)
-            builder.putInt(b)
-            builder.putInt(a)
-            return builder.offset()
-        }
-    }
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.py b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.py
index f49495b..4cd6162 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.py
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.py
@@ -4,57 +4,69 @@
 
 import flatbuffers
 from flatbuffers.compat import import_numpy
+
 np = import_numpy()
 
+
 class StructInNestedNS(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def SizeOf(cls):
-        return 8
+  @classmethod
+  def SizeOf(cls):
+    return 8
 
-    # StructInNestedNS
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  # StructInNestedNS
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-    # StructInNestedNS
-    def A(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
-    # StructInNestedNS
-    def B(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))
+  # StructInNestedNS
+  def A(self):
+    return self._tab.Get(
+        flatbuffers.number_types.Int32Flags,
+        self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0),
+    )
+
+  # StructInNestedNS
+  def B(self):
+    return self._tab.Get(
+        flatbuffers.number_types.Int32Flags,
+        self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4),
+    )
+
 
 def CreateStructInNestedNS(builder, a, b):
-    builder.Prep(4, 8)
-    builder.PrependInt32(b)
-    builder.PrependInt32(a)
-    return builder.Offset()
+  builder.Prep(4, 8)
+  builder.PrependInt32(b)
+  builder.PrependInt32(a)
+  return builder.Offset()
 
 
 class StructInNestedNST(object):
 
-    # StructInNestedNST
-    def __init__(self):
-        self.a = 0  # type: int
-        self.b = 0  # type: int
+  # StructInNestedNST
+  def __init__(self):
+    self.a = 0  # type: int
+    self.b = 0  # type: int
 
-    @classmethod
-    def InitFromBuf(cls, buf, pos):
-        structInNestedNS = StructInNestedNS()
-        structInNestedNS.Init(buf, pos)
-        return cls.InitFromObj(structInNestedNS)
+  @classmethod
+  def InitFromBuf(cls, buf, pos):
+    structInNestedNS = StructInNestedNS()
+    structInNestedNS.Init(buf, pos)
+    return cls.InitFromObj(structInNestedNS)
 
-    @classmethod
-    def InitFromObj(cls, structInNestedNS):
-        x = StructInNestedNST()
-        x._UnPack(structInNestedNS)
-        return x
+  @classmethod
+  def InitFromObj(cls, structInNestedNS):
+    x = StructInNestedNST()
+    x._UnPack(structInNestedNS)
+    return x
 
-    # StructInNestedNST
-    def _UnPack(self, structInNestedNS):
-        if structInNestedNS is None:
-            return
-        self.a = structInNestedNS.A()
-        self.b = structInNestedNS.B()
+  # StructInNestedNST
+  def _UnPack(self, structInNestedNS):
+    if structInNestedNS is None:
+      return
+    self.a = structInNestedNS.A()
+    self.b = structInNestedNS.B()
 
-    # StructInNestedNST
-    def Pack(self, builder):
-        return CreateStructInNestedNS(builder, self.a, self.b)
+  # StructInNestedNST
+  def Pack(self, builder):
+    return CreateStructInNestedNS(builder, self.a, self.b)
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNST.java b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNST.java
index 0e6963c..ce2e55e 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNST.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNST.java
@@ -2,27 +2,32 @@
 
 package NamespaceA.NamespaceB;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class StructInNestedNST {
   private int a;
   private int b;
 
-  public int getA() { return a; }
+  public int getA() {
+    return a;
+  }
 
-  public void setA(int a) { this.a = a; }
+  public void setA(int a) {
+    this.a = a;
+  }
 
-  public int getB() { return b; }
+  public int getB() {
+    return b;
+  }
 
-  public void setB(int b) { this.b = b; }
-
+  public void setB(int b) {
+    this.b = b;
+  }
 
   public StructInNestedNST() {
     this.a = 0;
     this.b = 0;
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go
index 3782645..d162b71 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go
+++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go
@@ -11,7 +11,9 @@
 }
 
 func (t *TableInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	TableInNestedNSStart(builder)
 	TableInNestedNSAddFoo(builder, t.Foo)
 	return TableInNestedNSEnd(builder)
@@ -22,7 +24,9 @@
 }
 
 func (rcv *TableInNestedNS) UnPack() *TableInNestedNST {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &TableInNestedNST{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java
index de27412..60ba579 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java
@@ -2,56 +2,96 @@
 
 package NamespaceA.NamespaceB;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 @SuppressWarnings("unused")
 public final class TableInNestedNS extends Table {
-  public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
-  public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb) { return getRootAsTableInNestedNS(_bb, new TableInNestedNS()); }
-  public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
-  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
-  public TableInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+  public static void ValidateVersion() {
+    Constants.FLATBUFFERS_25_2_10();
+  }
 
-  public int foo() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
-  public boolean mutateFoo(int foo) { int o = __offset(4); if (o != 0) { bb.putInt(o + bb_pos, foo); return true; } else { return false; } }
+  public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb) {
+    return getRootAsTableInNestedNS(_bb, new TableInNestedNS());
+  }
 
-  public static int createTableInNestedNS(FlatBufferBuilder builder,
-      int foo) {
+  public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) {
+    _bb.order(ByteOrder.LITTLE_ENDIAN);
+    return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb));
+  }
+
+  public void __init(int _i, ByteBuffer _bb) {
+    __reset(_i, _bb);
+  }
+
+  public TableInNestedNS __assign(int _i, ByteBuffer _bb) {
+    __init(_i, _bb);
+    return this;
+  }
+
+  public int foo() {
+    int o = __offset(4);
+    return o != 0 ? bb.getInt(o + bb_pos) : 0;
+  }
+
+  public boolean mutateFoo(int foo) {
+    int o = __offset(4);
+    if (o != 0) {
+      bb.putInt(o + bb_pos, foo);
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  public static int createTableInNestedNS(FlatBufferBuilder builder, int foo) {
     builder.startTable(1);
     TableInNestedNS.addFoo(builder, foo);
     return TableInNestedNS.endTableInNestedNS(builder);
   }
 
-  public static void startTableInNestedNS(FlatBufferBuilder builder) { builder.startTable(1); }
-  public static void addFoo(FlatBufferBuilder builder, int foo) { builder.addInt(0, foo, 0); }
+  public static void startTableInNestedNS(FlatBufferBuilder builder) {
+    builder.startTable(1);
+  }
+
+  public static void addFoo(FlatBufferBuilder builder, int foo) {
+    builder.addInt(0, foo, 0);
+  }
+
   public static int endTableInNestedNS(FlatBufferBuilder builder) {
     int o = builder.endTable();
     return o;
   }
 
   public static final class Vector extends BaseVector {
-    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
+    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
+      __reset(_vector, _element_size, _bb);
+      return this;
+    }
 
-    public TableInNestedNS get(int j) { return get(new TableInNestedNS(), j); }
-    public TableInNestedNS get(TableInNestedNS obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
+    public TableInNestedNS get(int j) {
+      return get(new TableInNestedNS(), j);
+    }
+
+    public TableInNestedNS get(TableInNestedNS obj, int j) {
+      return obj.__assign(__indirect(__element(j), bb), bb);
+    }
   }
+
   public TableInNestedNST unpack() {
     TableInNestedNST _o = new TableInNestedNST();
     unpackTo(_o);
     return _o;
   }
+
   public void unpackTo(TableInNestedNST _o) {
     int _oFoo = foo();
     _o.setFoo(_oFoo);
   }
+
   public static int pack(FlatBufferBuilder builder, TableInNestedNST _o) {
     if (_o == null) return 0;
-    return createTableInNestedNS(
-      builder,
-      _o.getFoo());
+    return createTableInNestedNS(builder, _o.getFoo());
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt
index 4190131..9ebd7ae 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt
+++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt
@@ -2,64 +2,65 @@
 
 package NamespaceA.NamespaceB
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
 import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
-import com.google.flatbuffers.Struct
 import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class TableInNestedNS : Table() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): TableInNestedNS {
+    __init(_i, _bb)
+    return this
+  }
+
+  val foo: Int
+    get() {
+      val o = __offset(4)
+      return if (o != 0) bb.getInt(o + bb_pos) else 0
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : TableInNestedNS {
-        __init(_i, _bb)
-        return this
+
+  fun mutateFoo(foo: Int): Boolean {
+    val o = __offset(4)
+    return if (o != 0) {
+      bb.putInt(o + bb_pos, foo)
+      true
+    } else {
+      false
     }
-    val foo : Int
-        get() {
-            val o = __offset(4)
-            return if(o != 0) bb.getInt(o + bb_pos) else 0
-        }
-    fun mutateFoo(foo: Int) : Boolean {
-        val o = __offset(4)
-        return if (o != 0) {
-            bb.putInt(o + bb_pos, foo)
-            true
-        } else {
-            false
-        }
+  }
+
+  companion object {
+    fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
+
+    fun getRootAsTableInNestedNS(_bb: ByteBuffer): TableInNestedNS =
+      getRootAsTableInNestedNS(_bb, TableInNestedNS())
+
+    fun getRootAsTableInNestedNS(_bb: ByteBuffer, obj: TableInNestedNS): TableInNestedNS {
+      _bb.order(ByteOrder.LITTLE_ENDIAN)
+      return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
     }
-    companion object {
-        fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
-        fun getRootAsTableInNestedNS(_bb: ByteBuffer): TableInNestedNS = getRootAsTableInNestedNS(_bb, TableInNestedNS())
-        fun getRootAsTableInNestedNS(_bb: ByteBuffer, obj: TableInNestedNS): TableInNestedNS {
-            _bb.order(ByteOrder.LITTLE_ENDIAN)
-            return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
-        }
-        fun createTableInNestedNS(builder: FlatBufferBuilder, foo: Int) : Int {
-            builder.startTable(1)
-            addFoo(builder, foo)
-            return endTableInNestedNS(builder)
-        }
-        fun startTableInNestedNS(builder: FlatBufferBuilder) = builder.startTable(1)
-        fun addFoo(builder: FlatBufferBuilder, foo: Int) = builder.addInt(0, foo, 0)
-        fun endTableInNestedNS(builder: FlatBufferBuilder) : Int {
-            val o = builder.endTable()
-            return o
-        }
+
+    fun createTableInNestedNS(builder: FlatBufferBuilder, foo: Int): Int {
+      builder.startTable(1)
+      addFoo(builder, foo)
+      return endTableInNestedNS(builder)
     }
+
+    fun startTableInNestedNS(builder: FlatBufferBuilder) = builder.startTable(1)
+
+    fun addFoo(builder: FlatBufferBuilder, foo: Int) = builder.addInt(0, foo, 0)
+
+    fun endTableInNestedNS(builder: FlatBufferBuilder): Int {
+      val o = builder.endTable()
+      return o
+    }
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py
index a9848d8..2e1692a 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py
+++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py
@@ -4,70 +4,90 @@
 
 import flatbuffers
 from flatbuffers.compat import import_numpy
+
 np = import_numpy()
 
+
 class TableInNestedNS(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset=0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = TableInNestedNS()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset=0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = TableInNestedNS()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsTableInNestedNS(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # TableInNestedNS
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsTableInNestedNS(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
 
-    # TableInNestedNS
-    def Foo(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
-        if o != 0:
-            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
-        return 0
+  # TableInNestedNS
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-def TableInNestedNSStart(builder): builder.StartObject(1)
+  # TableInNestedNS
+  def Foo(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+    if o != 0:
+      return self._tab.Get(
+          flatbuffers.number_types.Int32Flags, o + self._tab.Pos
+      )
+    return 0
+
+
+def TableInNestedNSStart(builder):
+  builder.StartObject(1)
+
+
 def Start(builder):
-    return TableInNestedNSStart(builder)
-def TableInNestedNSAddFoo(builder, foo): builder.PrependInt32Slot(0, foo, 0)
+  return TableInNestedNSStart(builder)
+
+
+def TableInNestedNSAddFoo(builder, foo):
+  builder.PrependInt32Slot(0, foo, 0)
+
+
 def AddFoo(builder, foo):
-    return TableInNestedNSAddFoo(builder, foo)
-def TableInNestedNSEnd(builder): return builder.EndObject()
+  return TableInNestedNSAddFoo(builder, foo)
+
+
+def TableInNestedNSEnd(builder):
+  return builder.EndObject()
+
+
 def End(builder):
-    return TableInNestedNSEnd(builder)
+  return TableInNestedNSEnd(builder)
+
 
 class TableInNestedNST(object):
 
-    # TableInNestedNST
-    def __init__(self):
-        self.foo = 0  # type: int
+  # TableInNestedNST
+  def __init__(self):
+    self.foo = 0  # type: int
 
-    @classmethod
-    def InitFromBuf(cls, buf, pos):
-        tableInNestedNS = TableInNestedNS()
-        tableInNestedNS.Init(buf, pos)
-        return cls.InitFromObj(tableInNestedNS)
+  @classmethod
+  def InitFromBuf(cls, buf, pos):
+    tableInNestedNS = TableInNestedNS()
+    tableInNestedNS.Init(buf, pos)
+    return cls.InitFromObj(tableInNestedNS)
 
-    @classmethod
-    def InitFromObj(cls, tableInNestedNS):
-        x = TableInNestedNST()
-        x._UnPack(tableInNestedNS)
-        return x
+  @classmethod
+  def InitFromObj(cls, tableInNestedNS):
+    x = TableInNestedNST()
+    x._UnPack(tableInNestedNS)
+    return x
 
-    # TableInNestedNST
-    def _UnPack(self, tableInNestedNS):
-        if tableInNestedNS is None:
-            return
-        self.foo = tableInNestedNS.Foo()
+  # TableInNestedNST
+  def _UnPack(self, tableInNestedNS):
+    if tableInNestedNS is None:
+      return
+    self.foo = tableInNestedNS.Foo()
 
-    # TableInNestedNST
-    def Pack(self, builder):
-        TableInNestedNSStart(builder)
-        TableInNestedNSAddFoo(builder, self.foo)
-        tableInNestedNS = TableInNestedNSEnd(builder)
-        return tableInNestedNS
+  # TableInNestedNST
+  def Pack(self, builder):
+    TableInNestedNSStart(builder)
+    TableInNestedNSAddFoo(builder, self.foo)
+    tableInNestedNS = TableInNestedNSEnd(builder)
+    return tableInNestedNS
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNST.java b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNST.java
index 1968a96..351a1e4 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNST.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNST.java
@@ -2,21 +2,22 @@
 
 package NamespaceA.NamespaceB;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class TableInNestedNST {
   private int foo;
 
-  public int getFoo() { return foo; }
+  public int getFoo() {
+    return foo;
+  }
 
-  public void setFoo(int foo) { this.foo = foo; }
-
+  public void setFoo(int foo) {
+    this.foo = foo;
+  }
 
   public TableInNestedNST() {
     this.foo = 0;
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.go
index f7b1d1c..78b9de9 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.go
+++ b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.go
@@ -11,7 +11,7 @@
 )
 
 type UnionInNestedNST struct {
-	Type UnionInNestedNS
+	Type  UnionInNestedNS
 	Value interface{}
 }
 
@@ -30,7 +30,7 @@
 	switch rcv {
 	case UnionInNestedNSTableInNestedNS:
 		x := TableInNestedNS{_tab: table}
-		return &NamespaceA__NamespaceB.UnionInNestedNST{ Type: UnionInNestedNSTableInNestedNS, Value: x.UnPack() }
+		return &NamespaceA__NamespaceB.UnionInNestedNST{Type: UnionInNestedNSTableInNestedNS, Value: x.UnPack()}
 	}
 	return nil
 }
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.java b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.java
index 27f24e3..b425aa4 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.java
@@ -4,12 +4,16 @@
 
 @SuppressWarnings("unused")
 public final class UnionInNestedNS {
-  private UnionInNestedNS() { }
+  private UnionInNestedNS() {}
+
   public static final byte NONE = 0;
   public static final byte TableInNestedNS = 1;
 
-  public static final String[] names = { "NONE", "TableInNestedNS", };
+  public static final String[] names = {
+    "NONE", "TableInNestedNS",
+  };
 
-  public static String name(int e) { return names[e]; }
+  public static String name(int e) {
+    return names[e];
+  }
 }
-
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.kt b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.kt
index 1c52f95..58e63a3 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.kt
+++ b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.kt
@@ -5,10 +5,11 @@
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class UnionInNestedNS private constructor() {
-    companion object {
-        const val NONE: UByte = 0u
-        const val TableInNestedNS: UByte = 1u
-        val names : Array<String> = arrayOf("NONE", "TableInNestedNS")
-        fun name(e: Int) : String = names[e]
-    }
+  companion object {
+    const val NONE: UByte = 0u
+    const val TableInNestedNS: UByte = 1u
+    val names: Array<String> = arrayOf("NONE", "TableInNestedNS")
+
+    fun name(e: Int): String = names[e]
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.py b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.py
index af601c7..334029a 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.py
+++ b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.py
@@ -2,14 +2,17 @@
 
 # namespace: NamespaceB
 
+
 class UnionInNestedNS(object):
-    NONE = 0
-    TableInNestedNS = 1
+  NONE = 0
+  TableInNestedNS = 1
+
 
 def UnionInNestedNSCreator(unionType, table):
-    from flatbuffers.table import Table
-    if not isinstance(table, Table):
-        return None
-    if unionType == UnionInNestedNS().TableInNestedNS:
-        return TableInNestedNST.InitFromBuf(table.Bytes, table.Pos)
+  from flatbuffers.table import Table
+
+  if not isinstance(table, Table):
     return None
+  if unionType == UnionInNestedNS().TableInNestedNS:
+    return TableInNestedNST.InitFromBuf(table.Bytes, table.Pos)
+  return None
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNSUnion.java b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNSUnion.java
index 5b89938..0e0ca82 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNSUnion.java
+++ b/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNSUnion.java
@@ -8,26 +8,37 @@
   private byte type;
   private Object value;
 
-  public byte getType() { return type; }
+  public byte getType() {
+    return type;
+  }
 
-  public void setType(byte type) { this.type = type; }
+  public void setType(byte type) {
+    this.type = type;
+  }
 
-  public Object getValue() { return value; }
+  public Object getValue() {
+    return value;
+  }
 
-  public void setValue(Object value) { this.value = value; }
+  public void setValue(Object value) {
+    this.value = value;
+  }
 
   public UnionInNestedNSUnion() {
     this.type = UnionInNestedNS.NONE;
     this.value = null;
   }
 
-  public NamespaceA.NamespaceB.TableInNestedNST asTableInNestedNS() { return (NamespaceA.NamespaceB.TableInNestedNST) value; }
+  public NamespaceA.NamespaceB.TableInNestedNST asTableInNestedNS() {
+    return (NamespaceA.NamespaceB.TableInNestedNST) value;
+  }
 
   public static int pack(FlatBufferBuilder builder, UnionInNestedNSUnion _o) {
     switch (_o.type) {
-      case UnionInNestedNS.TableInNestedNS: return NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.asTableInNestedNS());
-      default: return 0;
+      case UnionInNestedNS.TableInNestedNS:
+        return NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.asTableInNestedNS());
+      default:
+        return 0;
     }
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.go b/tests/namespace_test/NamespaceA/SecondTableInA.go
index f88a682..5c3584f 100644
--- a/tests/namespace_test/NamespaceA/SecondTableInA.go
+++ b/tests/namespace_test/NamespaceA/SecondTableInA.go
@@ -13,7 +13,9 @@
 }
 
 func (t *SecondTableInAT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	referToCOffset := t.ReferToC.Pack(builder)
 	SecondTableInAStart(builder)
 	SecondTableInAAddReferToC(builder, referToCOffset)
@@ -25,7 +27,9 @@
 }
 
 func (rcv *SecondTableInA) UnPack() *SecondTableInAT {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &SecondTableInAT{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.java b/tests/namespace_test/NamespaceA/SecondTableInA.java
index 72348d8..30a49ba 100644
--- a/tests/namespace_test/NamespaceA/SecondTableInA.java
+++ b/tests/namespace_test/NamespaceA/SecondTableInA.java
@@ -2,57 +2,92 @@
 
 package NamespaceA;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 @SuppressWarnings("unused")
 public final class SecondTableInA extends Table {
-  public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
-  public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb) { return getRootAsSecondTableInA(_bb, new SecondTableInA()); }
-  public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb, SecondTableInA obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
-  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
-  public SecondTableInA __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+  public static void ValidateVersion() {
+    Constants.FLATBUFFERS_25_2_10();
+  }
 
-  public NamespaceC.TableInC referToC() { return referToC(new NamespaceC.TableInC()); }
-  public NamespaceC.TableInC referToC(NamespaceC.TableInC obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
+  public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb) {
+    return getRootAsSecondTableInA(_bb, new SecondTableInA());
+  }
 
-  public static int createSecondTableInA(FlatBufferBuilder builder,
-      int referToCOffset) {
+  public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb, SecondTableInA obj) {
+    _bb.order(ByteOrder.LITTLE_ENDIAN);
+    return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb));
+  }
+
+  public void __init(int _i, ByteBuffer _bb) {
+    __reset(_i, _bb);
+  }
+
+  public SecondTableInA __assign(int _i, ByteBuffer _bb) {
+    __init(_i, _bb);
+    return this;
+  }
+
+  public NamespaceC.TableInC referToC() {
+    return referToC(new NamespaceC.TableInC());
+  }
+
+  public NamespaceC.TableInC referToC(NamespaceC.TableInC obj) {
+    int o = __offset(4);
+    return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null;
+  }
+
+  public static int createSecondTableInA(FlatBufferBuilder builder, int referToCOffset) {
     builder.startTable(1);
     SecondTableInA.addReferToC(builder, referToCOffset);
     return SecondTableInA.endSecondTableInA(builder);
   }
 
-  public static void startSecondTableInA(FlatBufferBuilder builder) { builder.startTable(1); }
-  public static void addReferToC(FlatBufferBuilder builder, int referToCOffset) { builder.addOffset(0, referToCOffset, 0); }
+  public static void startSecondTableInA(FlatBufferBuilder builder) {
+    builder.startTable(1);
+  }
+
+  public static void addReferToC(FlatBufferBuilder builder, int referToCOffset) {
+    builder.addOffset(0, referToCOffset, 0);
+  }
+
   public static int endSecondTableInA(FlatBufferBuilder builder) {
     int o = builder.endTable();
     return o;
   }
 
   public static final class Vector extends BaseVector {
-    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
+    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
+      __reset(_vector, _element_size, _bb);
+      return this;
+    }
 
-    public SecondTableInA get(int j) { return get(new SecondTableInA(), j); }
-    public SecondTableInA get(SecondTableInA obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
+    public SecondTableInA get(int j) {
+      return get(new SecondTableInA(), j);
+    }
+
+    public SecondTableInA get(SecondTableInA obj, int j) {
+      return obj.__assign(__indirect(__element(j), bb), bb);
+    }
   }
+
   public SecondTableInAT unpack() {
     SecondTableInAT _o = new SecondTableInAT();
     unpackTo(_o);
     return _o;
   }
+
   public void unpackTo(SecondTableInAT _o) {
     if (referToC() != null) _o.setReferToC(referToC().unpack());
     else _o.setReferToC(null);
   }
+
   public static int pack(FlatBufferBuilder builder, SecondTableInAT _o) {
     if (_o == null) return 0;
-    int _refer_to_c = _o.getReferToC() == null ? 0 : NamespaceC.TableInC.pack(builder, _o.getReferToC());
-    return createSecondTableInA(
-      builder,
-      _refer_to_c);
+    int _refer_to_c =
+        _o.getReferToC() == null ? 0 : NamespaceC.TableInC.pack(builder, _o.getReferToC());
+    return createSecondTableInA(builder, _refer_to_c);
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.kt b/tests/namespace_test/NamespaceA/SecondTableInA.kt
index 1bef898..0b4cbca 100644
--- a/tests/namespace_test/NamespaceA/SecondTableInA.kt
+++ b/tests/namespace_test/NamespaceA/SecondTableInA.kt
@@ -2,59 +2,61 @@
 
 package NamespaceA
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
 import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
-import com.google.flatbuffers.Struct
 import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class SecondTableInA : Table() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): SecondTableInA {
+    __init(_i, _bb)
+    return this
+  }
+
+  val referToC: NamespaceC.TableInC?
+    get() = referToC(NamespaceC.TableInC())
+
+  fun referToC(obj: NamespaceC.TableInC): NamespaceC.TableInC? {
+    val o = __offset(4)
+    return if (o != 0) {
+      obj.__assign(__indirect(o + bb_pos), bb)
+    } else {
+      null
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : SecondTableInA {
-        __init(_i, _bb)
-        return this
+  }
+
+  companion object {
+    fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
+
+    fun getRootAsSecondTableInA(_bb: ByteBuffer): SecondTableInA =
+      getRootAsSecondTableInA(_bb, SecondTableInA())
+
+    fun getRootAsSecondTableInA(_bb: ByteBuffer, obj: SecondTableInA): SecondTableInA {
+      _bb.order(ByteOrder.LITTLE_ENDIAN)
+      return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
     }
-    val referToC : NamespaceC.TableInC? get() = referToC(NamespaceC.TableInC())
-    fun referToC(obj: NamespaceC.TableInC) : NamespaceC.TableInC? {
-        val o = __offset(4)
-        return if (o != 0) {
-            obj.__assign(__indirect(o + bb_pos), bb)
-        } else {
-            null
-        }
+
+    fun createSecondTableInA(builder: FlatBufferBuilder, referToCOffset: Int): Int {
+      builder.startTable(1)
+      addReferToC(builder, referToCOffset)
+      return endSecondTableInA(builder)
     }
-    companion object {
-        fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
-        fun getRootAsSecondTableInA(_bb: ByteBuffer): SecondTableInA = getRootAsSecondTableInA(_bb, SecondTableInA())
-        fun getRootAsSecondTableInA(_bb: ByteBuffer, obj: SecondTableInA): SecondTableInA {
-            _bb.order(ByteOrder.LITTLE_ENDIAN)
-            return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
-        }
-        fun createSecondTableInA(builder: FlatBufferBuilder, referToCOffset: Int) : Int {
-            builder.startTable(1)
-            addReferToC(builder, referToCOffset)
-            return endSecondTableInA(builder)
-        }
-        fun startSecondTableInA(builder: FlatBufferBuilder) = builder.startTable(1)
-        fun addReferToC(builder: FlatBufferBuilder, referToC: Int) = builder.addOffset(0, referToC, 0)
-        fun endSecondTableInA(builder: FlatBufferBuilder) : Int {
-            val o = builder.endTable()
-            return o
-        }
+
+    fun startSecondTableInA(builder: FlatBufferBuilder) = builder.startTable(1)
+
+    fun addReferToC(builder: FlatBufferBuilder, referToC: Int) = builder.addOffset(0, referToC, 0)
+
+    fun endSecondTableInA(builder: FlatBufferBuilder): Int {
+      val o = builder.endTable()
+      return o
     }
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.py b/tests/namespace_test/NamespaceA/SecondTableInA.py
index 474f44d..47ad4c5 100644
--- a/tests/namespace_test/NamespaceA/SecondTableInA.py
+++ b/tests/namespace_test/NamespaceA/SecondTableInA.py
@@ -4,81 +4,103 @@
 
 import flatbuffers
 from flatbuffers.compat import import_numpy
+
 np = import_numpy()
 
+
 class SecondTableInA(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset=0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = SecondTableInA()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset=0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = SecondTableInA()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsSecondTableInA(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # SecondTableInA
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsSecondTableInA(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
 
-    # SecondTableInA
-    def ReferToC(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            obj = TableInC()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # SecondTableInA
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-def SecondTableInAStart(builder): builder.StartObject(1)
+  # SecondTableInA
+  def ReferToC(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      obj = TableInC()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
+
+
+def SecondTableInAStart(builder):
+  builder.StartObject(1)
+
+
 def Start(builder):
-    return SecondTableInAStart(builder)
-def SecondTableInAAddReferToC(builder, referToC): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(referToC), 0)
+  return SecondTableInAStart(builder)
+
+
+def SecondTableInAAddReferToC(builder, referToC):
+  builder.PrependUOffsetTRelativeSlot(
+      0, flatbuffers.number_types.UOffsetTFlags.py_type(referToC), 0
+  )
+
+
 def AddReferToC(builder, referToC):
-    return SecondTableInAAddReferToC(builder, referToC)
-def SecondTableInAEnd(builder): return builder.EndObject()
+  return SecondTableInAAddReferToC(builder, referToC)
+
+
+def SecondTableInAEnd(builder):
+  return builder.EndObject()
+
+
 def End(builder):
-    return SecondTableInAEnd(builder)
+  return SecondTableInAEnd(builder)
+
+
 try:
-    from typing import Optional
+  from typing import Optional
 except:
-    pass
+  pass
+
 
 class SecondTableInAT(object):
 
-    # SecondTableInAT
-    def __init__(self):
-        self.referToC = None  # type: Optional[TableInCT]
+  # SecondTableInAT
+  def __init__(self):
+    self.referToC = None  # type: Optional[TableInCT]
 
-    @classmethod
-    def InitFromBuf(cls, buf, pos):
-        secondTableInA = SecondTableInA()
-        secondTableInA.Init(buf, pos)
-        return cls.InitFromObj(secondTableInA)
+  @classmethod
+  def InitFromBuf(cls, buf, pos):
+    secondTableInA = SecondTableInA()
+    secondTableInA.Init(buf, pos)
+    return cls.InitFromObj(secondTableInA)
 
-    @classmethod
-    def InitFromObj(cls, secondTableInA):
-        x = SecondTableInAT()
-        x._UnPack(secondTableInA)
-        return x
+  @classmethod
+  def InitFromObj(cls, secondTableInA):
+    x = SecondTableInAT()
+    x._UnPack(secondTableInA)
+    return x
 
-    # SecondTableInAT
-    def _UnPack(self, secondTableInA):
-        if secondTableInA is None:
-            return
-        if secondTableInA.ReferToC() is not None:
-            self.referToC = TableInCT.InitFromObj(secondTableInA.ReferToC())
+  # SecondTableInAT
+  def _UnPack(self, secondTableInA):
+    if secondTableInA is None:
+      return
+    if secondTableInA.ReferToC() is not None:
+      self.referToC = TableInCT.InitFromObj(secondTableInA.ReferToC())
 
-    # SecondTableInAT
-    def Pack(self, builder):
-        if self.referToC is not None:
-            referToC = self.referToC.Pack(builder)
-        SecondTableInAStart(builder)
-        if self.referToC is not None:
-            SecondTableInAAddReferToC(builder, referToC)
-        secondTableInA = SecondTableInAEnd(builder)
-        return secondTableInA
+  # SecondTableInAT
+  def Pack(self, builder):
+    if self.referToC is not None:
+      referToC = self.referToC.Pack(builder)
+    SecondTableInAStart(builder)
+    if self.referToC is not None:
+      SecondTableInAAddReferToC(builder, referToC)
+    secondTableInA = SecondTableInAEnd(builder)
+    return secondTableInA
diff --git a/tests/namespace_test/NamespaceA/SecondTableInAT.java b/tests/namespace_test/NamespaceA/SecondTableInAT.java
index 98fe21c..27241b9 100644
--- a/tests/namespace_test/NamespaceA/SecondTableInAT.java
+++ b/tests/namespace_test/NamespaceA/SecondTableInAT.java
@@ -2,21 +2,22 @@
 
 package NamespaceA;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class SecondTableInAT {
   private NamespaceC.TableInCT referToC;
 
-  public NamespaceC.TableInCT getReferToC() { return referToC; }
+  public NamespaceC.TableInCT getReferToC() {
+    return referToC;
+  }
 
-  public void setReferToC(NamespaceC.TableInCT referToC) { this.referToC = referToC; }
-
+  public void setReferToC(NamespaceC.TableInCT referToC) {
+    this.referToC = referToC;
+  }
 
   public SecondTableInAT() {
     this.referToC = null;
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/TableInC.go b/tests/namespace_test/NamespaceA/TableInC.go
index 6f3d3f2..c588773 100644
--- a/tests/namespace_test/NamespaceA/TableInC.go
+++ b/tests/namespace_test/NamespaceA/TableInC.go
@@ -5,6 +5,7 @@
 import (
 	flatbuffers "github.com/google/flatbuffers/go"
 )
+
 type TableInC struct {
 	_tab flatbuffers.Table
 }
@@ -41,6 +42,10 @@
 }
 
 func TableInCStart(builder *flatbuffers.Builder) { builder.StartObject(2) }
-func TableInCAddReferToA1(builder *flatbuffers.Builder, referToA1 flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(referToA1), 0) }
-func TableInCAddReferToA2(builder *flatbuffers.Builder, referToA2 flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(referToA2), 0) }
+func TableInCAddReferToA1(builder *flatbuffers.Builder, referToA1 flatbuffers.UOffsetT) {
+	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(referToA1), 0)
+}
+func TableInCAddReferToA2(builder *flatbuffers.Builder, referToA2 flatbuffers.UOffsetT) {
+	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(referToA2), 0)
+}
 func TableInCEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() }
diff --git a/tests/namespace_test/NamespaceA/TableInC.py b/tests/namespace_test/NamespaceA/TableInC.py
index 4afea1a..01a27cc 100644
--- a/tests/namespace_test/NamespaceA/TableInC.py
+++ b/tests/namespace_test/NamespaceA/TableInC.py
@@ -4,36 +4,54 @@
 
 import flatbuffers
 
+
 class TableInC(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    # TableInC
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  # TableInC
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-    # TableInC
-    def ReferToA1(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            from .TableInFirstNS import TableInFirstNS
-            obj = TableInFirstNS()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # TableInC
+  def ReferToA1(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      from .TableInFirstNS import TableInFirstNS
 
-    # TableInC
-    def ReferToA2(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            from .SecondTableInA import SecondTableInA
-            obj = SecondTableInA()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+      obj = TableInFirstNS()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
 
-def TableInCStart(builder): builder.StartObject(2)
-def TableInCAddReferToA1(builder, referToA1): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(referToA1), 0)
-def TableInCAddReferToA2(builder, referToA2): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(referToA2), 0)
-def TableInCEnd(builder): return builder.EndObject()
+  # TableInC
+  def ReferToA2(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      from .SecondTableInA import SecondTableInA
+
+      obj = SecondTableInA()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
+
+
+def TableInCStart(builder):
+  builder.StartObject(2)
+
+
+def TableInCAddReferToA1(builder, referToA1):
+  builder.PrependUOffsetTRelativeSlot(
+      0, flatbuffers.number_types.UOffsetTFlags.py_type(referToA1), 0
+  )
+
+
+def TableInCAddReferToA2(builder, referToA2):
+  builder.PrependUOffsetTRelativeSlot(
+      1, flatbuffers.number_types.UOffsetTFlags.py_type(referToA2), 0
+  )
+
+
+def TableInCEnd(builder):
+  return builder.EndObject()
diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.go b/tests/namespace_test/NamespaceA/TableInFirstNS.go
index 3feaaaa..79a9151 100644
--- a/tests/namespace_test/NamespaceA/TableInFirstNS.go
+++ b/tests/namespace_test/NamespaceA/TableInFirstNS.go
@@ -9,17 +9,19 @@
 )
 
 type TableInFirstNST struct {
-	FooTable *NamespaceA__NamespaceB.TableInNestedNST
-	FooEnum NamespaceA__NamespaceB.EnumInNestedNS
-	FooUnion *NamespaceA__NamespaceB.UnionInNestedNST
+	FooTable  *NamespaceA__NamespaceB.TableInNestedNST
+	FooEnum   NamespaceA__NamespaceB.EnumInNestedNS
+	FooUnion  *NamespaceA__NamespaceB.UnionInNestedNST
 	FooStruct *NamespaceA__NamespaceB.StructInNestedNST
 }
 
 func (t *TableInFirstNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	fooTableOffset := t.FooTable.Pack(builder)
 	fooUnionOffset := t.FooUnion.Pack(builder)
-	
+
 	TableInFirstNSStart(builder)
 	TableInFirstNSAddFooTable(builder, fooTableOffset)
 	TableInFirstNSAddFooEnum(builder, t.FooEnum)
@@ -43,7 +45,9 @@
 }
 
 func (rcv *TableInFirstNS) UnPack() *TableInFirstNST {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &TableInFirstNST{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.java b/tests/namespace_test/NamespaceA/TableInFirstNS.java
index 71c3214..a3207c5 100644
--- a/tests/namespace_test/NamespaceA/TableInFirstNS.java
+++ b/tests/namespace_test/NamespaceA/TableInFirstNS.java
@@ -2,75 +2,168 @@
 
 package NamespaceA;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 @SuppressWarnings("unused")
 public final class TableInFirstNS extends Table {
-  public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
-  public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb) { return getRootAsTableInFirstNS(_bb, new TableInFirstNS()); }
-  public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
-  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
-  public TableInFirstNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+  public static void ValidateVersion() {
+    Constants.FLATBUFFERS_25_2_10();
+  }
 
-  public NamespaceA.NamespaceB.TableInNestedNS fooTable() { return fooTable(new NamespaceA.NamespaceB.TableInNestedNS()); }
-  public NamespaceA.NamespaceB.TableInNestedNS fooTable(NamespaceA.NamespaceB.TableInNestedNS obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
-  public byte fooEnum() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; }
-  public boolean mutateFooEnum(byte foo_enum) { int o = __offset(6); if (o != 0) { bb.put(o + bb_pos, foo_enum); return true; } else { return false; } }
-  public byte fooUnionType() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; }
-  public Table fooUnion(Table obj) { int o = __offset(10); return o != 0 ? __union(obj, o + bb_pos) : null; }
-  public NamespaceA.NamespaceB.StructInNestedNS fooStruct() { return fooStruct(new NamespaceA.NamespaceB.StructInNestedNS()); }
-  public NamespaceA.NamespaceB.StructInNestedNS fooStruct(NamespaceA.NamespaceB.StructInNestedNS obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }
+  public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb) {
+    return getRootAsTableInFirstNS(_bb, new TableInFirstNS());
+  }
 
-  public static void startTableInFirstNS(FlatBufferBuilder builder) { builder.startTable(5); }
-  public static void addFooTable(FlatBufferBuilder builder, int fooTableOffset) { builder.addOffset(0, fooTableOffset, 0); }
-  public static void addFooEnum(FlatBufferBuilder builder, byte fooEnum) { builder.addByte(1, fooEnum, 0); }
-  public static void addFooUnionType(FlatBufferBuilder builder, byte fooUnionType) { builder.addByte(2, fooUnionType, 0); }
-  public static void addFooUnion(FlatBufferBuilder builder, int fooUnionOffset) { builder.addOffset(3, fooUnionOffset, 0); }
-  public static void addFooStruct(FlatBufferBuilder builder, int fooStructOffset) { builder.addStruct(4, fooStructOffset, 0); }
+  public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) {
+    _bb.order(ByteOrder.LITTLE_ENDIAN);
+    return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb));
+  }
+
+  public void __init(int _i, ByteBuffer _bb) {
+    __reset(_i, _bb);
+  }
+
+  public TableInFirstNS __assign(int _i, ByteBuffer _bb) {
+    __init(_i, _bb);
+    return this;
+  }
+
+  public NamespaceA.NamespaceB.TableInNestedNS fooTable() {
+    return fooTable(new NamespaceA.NamespaceB.TableInNestedNS());
+  }
+
+  public NamespaceA.NamespaceB.TableInNestedNS fooTable(NamespaceA.NamespaceB.TableInNestedNS obj) {
+    int o = __offset(4);
+    return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null;
+  }
+
+  public byte fooEnum() {
+    int o = __offset(6);
+    return o != 0 ? bb.get(o + bb_pos) : 0;
+  }
+
+  public boolean mutateFooEnum(byte foo_enum) {
+    int o = __offset(6);
+    if (o != 0) {
+      bb.put(o + bb_pos, foo_enum);
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  public byte fooUnionType() {
+    int o = __offset(8);
+    return o != 0 ? bb.get(o + bb_pos) : 0;
+  }
+
+  public Table fooUnion(Table obj) {
+    int o = __offset(10);
+    return o != 0 ? __union(obj, o + bb_pos) : null;
+  }
+
+  public NamespaceA.NamespaceB.StructInNestedNS fooStruct() {
+    return fooStruct(new NamespaceA.NamespaceB.StructInNestedNS());
+  }
+
+  public NamespaceA.NamespaceB.StructInNestedNS fooStruct(
+      NamespaceA.NamespaceB.StructInNestedNS obj) {
+    int o = __offset(12);
+    return o != 0 ? obj.__assign(o + bb_pos, bb) : null;
+  }
+
+  public static void startTableInFirstNS(FlatBufferBuilder builder) {
+    builder.startTable(5);
+  }
+
+  public static void addFooTable(FlatBufferBuilder builder, int fooTableOffset) {
+    builder.addOffset(0, fooTableOffset, 0);
+  }
+
+  public static void addFooEnum(FlatBufferBuilder builder, byte fooEnum) {
+    builder.addByte(1, fooEnum, 0);
+  }
+
+  public static void addFooUnionType(FlatBufferBuilder builder, byte fooUnionType) {
+    builder.addByte(2, fooUnionType, 0);
+  }
+
+  public static void addFooUnion(FlatBufferBuilder builder, int fooUnionOffset) {
+    builder.addOffset(3, fooUnionOffset, 0);
+  }
+
+  public static void addFooStruct(FlatBufferBuilder builder, int fooStructOffset) {
+    builder.addStruct(4, fooStructOffset, 0);
+  }
+
   public static int endTableInFirstNS(FlatBufferBuilder builder) {
     int o = builder.endTable();
     return o;
   }
 
   public static final class Vector extends BaseVector {
-    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
+    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
+      __reset(_vector, _element_size, _bb);
+      return this;
+    }
 
-    public TableInFirstNS get(int j) { return get(new TableInFirstNS(), j); }
-    public TableInFirstNS get(TableInFirstNS obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
+    public TableInFirstNS get(int j) {
+      return get(new TableInFirstNS(), j);
+    }
+
+    public TableInFirstNS get(TableInFirstNS obj, int j) {
+      return obj.__assign(__indirect(__element(j), bb), bb);
+    }
   }
+
   public TableInFirstNST unpack() {
     TableInFirstNST _o = new TableInFirstNST();
     unpackTo(_o);
     return _o;
   }
+
   public void unpackTo(TableInFirstNST _o) {
     if (fooTable() != null) _o.setFooTable(fooTable().unpack());
     else _o.setFooTable(null);
     byte _oFooEnum = fooEnum();
     _o.setFooEnum(_oFooEnum);
-    NamespaceA.NamespaceB.UnionInNestedNSUnion _oFooUnion = new NamespaceA.NamespaceB.UnionInNestedNSUnion();
+    NamespaceA.NamespaceB.UnionInNestedNSUnion _oFooUnion =
+        new NamespaceA.NamespaceB.UnionInNestedNSUnion();
     byte _oFooUnionType = fooUnionType();
     _oFooUnion.setType(_oFooUnionType);
     Table _oFooUnionValue;
     switch (_oFooUnionType) {
       case NamespaceA.NamespaceB.UnionInNestedNS.TableInNestedNS:
         _oFooUnionValue = fooUnion(new NamespaceA.NamespaceB.TableInNestedNS());
-        _oFooUnion.setValue(_oFooUnionValue != null ? ((NamespaceA.NamespaceB.TableInNestedNS) _oFooUnionValue).unpack() : null);
+        _oFooUnion.setValue(
+            _oFooUnionValue != null
+                ? ((NamespaceA.NamespaceB.TableInNestedNS) _oFooUnionValue).unpack()
+                : null);
         break;
-      default: break;
+      default:
+        break;
     }
     _o.setFooUnion(_oFooUnion);
     if (fooStruct() != null) fooStruct().unpackTo(_o.getFooStruct());
     else _o.setFooStruct(null);
   }
+
   public static int pack(FlatBufferBuilder builder, TableInFirstNST _o) {
     if (_o == null) return 0;
-    int _foo_table = _o.getFooTable() == null ? 0 : NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.getFooTable());
-    byte _fooUnionType = _o.getFooUnion() == null ? NamespaceA.NamespaceB.UnionInNestedNS.NONE : _o.getFooUnion().getType();
-    int _fooUnion = _o.getFooUnion() == null ? 0 : NamespaceA.NamespaceB.UnionInNestedNSUnion.pack(builder, _o.getFooUnion());
+    int _foo_table =
+        _o.getFooTable() == null
+            ? 0
+            : NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.getFooTable());
+    byte _fooUnionType =
+        _o.getFooUnion() == null
+            ? NamespaceA.NamespaceB.UnionInNestedNS.NONE
+            : _o.getFooUnion().getType();
+    int _fooUnion =
+        _o.getFooUnion() == null
+            ? 0
+            : NamespaceA.NamespaceB.UnionInNestedNSUnion.pack(builder, _o.getFooUnion());
     startTableInFirstNS(builder);
     addFooTable(builder, _foo_table);
     addFooEnum(builder, _o.getFooEnum());
@@ -80,4 +173,3 @@
     return endTableInFirstNS(builder);
   }
 }
-
diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.kt b/tests/namespace_test/NamespaceA/TableInFirstNS.kt
index 17d0c16..ebbffa5 100644
--- a/tests/namespace_test/NamespaceA/TableInFirstNS.kt
+++ b/tests/namespace_test/NamespaceA/TableInFirstNS.kt
@@ -2,98 +2,116 @@
 
 package NamespaceA
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
 import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
-import com.google.flatbuffers.Struct
 import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class TableInFirstNS : Table() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): TableInFirstNS {
+    __init(_i, _bb)
+    return this
+  }
+
+  val fooTable: NamespaceA.NamespaceB.TableInNestedNS?
+    get() = fooTable(NamespaceA.NamespaceB.TableInNestedNS())
+
+  fun fooTable(obj: NamespaceA.NamespaceB.TableInNestedNS): NamespaceA.NamespaceB.TableInNestedNS? {
+    val o = __offset(4)
+    return if (o != 0) {
+      obj.__assign(__indirect(o + bb_pos), bb)
+    } else {
+      null
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : TableInFirstNS {
-        __init(_i, _bb)
-        return this
+  }
+
+  val fooEnum: Byte
+    get() {
+      val o = __offset(6)
+      return if (o != 0) bb.get(o + bb_pos) else 0
     }
-    val fooTable : NamespaceA.NamespaceB.TableInNestedNS? get() = fooTable(NamespaceA.NamespaceB.TableInNestedNS())
-    fun fooTable(obj: NamespaceA.NamespaceB.TableInNestedNS) : NamespaceA.NamespaceB.TableInNestedNS? {
-        val o = __offset(4)
-        return if (o != 0) {
-            obj.__assign(__indirect(o + bb_pos), bb)
-        } else {
-            null
-        }
+
+  fun mutateFooEnum(fooEnum: Byte): Boolean {
+    val o = __offset(6)
+    return if (o != 0) {
+      bb.put(o + bb_pos, fooEnum)
+      true
+    } else {
+      false
     }
-    val fooEnum : Byte
-        get() {
-            val o = __offset(6)
-            return if(o != 0) bb.get(o + bb_pos) else 0
-        }
-    fun mutateFooEnum(fooEnum: Byte) : Boolean {
-        val o = __offset(6)
-        return if (o != 0) {
-            bb.put(o + bb_pos, fooEnum)
-            true
-        } else {
-            false
-        }
+  }
+
+  val fooUnionType: UByte
+    get() {
+      val o = __offset(8)
+      return if (o != 0) bb.get(o + bb_pos).toUByte() else 0u
     }
-    val fooUnionType : UByte
-        get() {
-            val o = __offset(8)
-            return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u
-        }
-    fun mutateFooUnionType(fooUnionType: UByte) : Boolean {
-        val o = __offset(8)
-        return if (o != 0) {
-            bb.put(o + bb_pos, fooUnionType.toByte())
-            true
-        } else {
-            false
-        }
+
+  fun mutateFooUnionType(fooUnionType: UByte): Boolean {
+    val o = __offset(8)
+    return if (o != 0) {
+      bb.put(o + bb_pos, fooUnionType.toByte())
+      true
+    } else {
+      false
     }
-    fun fooUnion(obj: Table) : Table? {
-        val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null
+  }
+
+  fun fooUnion(obj: Table): Table? {
+    val o = __offset(10)
+    return if (o != 0) __union(obj, o + bb_pos) else null
+  }
+
+  val fooStruct: NamespaceA.NamespaceB.StructInNestedNS?
+    get() = fooStruct(NamespaceA.NamespaceB.StructInNestedNS())
+
+  fun fooStruct(
+    obj: NamespaceA.NamespaceB.StructInNestedNS
+  ): NamespaceA.NamespaceB.StructInNestedNS? {
+    val o = __offset(12)
+    return if (o != 0) {
+      obj.__assign(o + bb_pos, bb)
+    } else {
+      null
     }
-    val fooStruct : NamespaceA.NamespaceB.StructInNestedNS? get() = fooStruct(NamespaceA.NamespaceB.StructInNestedNS())
-    fun fooStruct(obj: NamespaceA.NamespaceB.StructInNestedNS) : NamespaceA.NamespaceB.StructInNestedNS? {
-        val o = __offset(12)
-        return if (o != 0) {
-            obj.__assign(o + bb_pos, bb)
-        } else {
-            null
-        }
+  }
+
+  companion object {
+    fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
+
+    fun getRootAsTableInFirstNS(_bb: ByteBuffer): TableInFirstNS =
+      getRootAsTableInFirstNS(_bb, TableInFirstNS())
+
+    fun getRootAsTableInFirstNS(_bb: ByteBuffer, obj: TableInFirstNS): TableInFirstNS {
+      _bb.order(ByteOrder.LITTLE_ENDIAN)
+      return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
     }
-    companion object {
-        fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
-        fun getRootAsTableInFirstNS(_bb: ByteBuffer): TableInFirstNS = getRootAsTableInFirstNS(_bb, TableInFirstNS())
-        fun getRootAsTableInFirstNS(_bb: ByteBuffer, obj: TableInFirstNS): TableInFirstNS {
-            _bb.order(ByteOrder.LITTLE_ENDIAN)
-            return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
-        }
-        fun startTableInFirstNS(builder: FlatBufferBuilder) = builder.startTable(5)
-        fun addFooTable(builder: FlatBufferBuilder, fooTable: Int) = builder.addOffset(0, fooTable, 0)
-        fun addFooEnum(builder: FlatBufferBuilder, fooEnum: Byte) = builder.addByte(1, fooEnum, 0)
-        fun addFooUnionType(builder: FlatBufferBuilder, fooUnionType: UByte) = builder.addByte(2, fooUnionType.toByte(), 0)
-        fun addFooUnion(builder: FlatBufferBuilder, fooUnion: Int) = builder.addOffset(3, fooUnion, 0)
-        fun addFooStruct(builder: FlatBufferBuilder, fooStruct: Int) = builder.addStruct(4, fooStruct, 0)
-        fun endTableInFirstNS(builder: FlatBufferBuilder) : Int {
-            val o = builder.endTable()
-            return o
-        }
+
+    fun startTableInFirstNS(builder: FlatBufferBuilder) = builder.startTable(5)
+
+    fun addFooTable(builder: FlatBufferBuilder, fooTable: Int) = builder.addOffset(0, fooTable, 0)
+
+    fun addFooEnum(builder: FlatBufferBuilder, fooEnum: Byte) = builder.addByte(1, fooEnum, 0)
+
+    fun addFooUnionType(builder: FlatBufferBuilder, fooUnionType: UByte) =
+      builder.addByte(2, fooUnionType.toByte(), 0)
+
+    fun addFooUnion(builder: FlatBufferBuilder, fooUnion: Int) = builder.addOffset(3, fooUnion, 0)
+
+    fun addFooStruct(builder: FlatBufferBuilder, fooStruct: Int) =
+      builder.addStruct(4, fooStruct, 0)
+
+    fun endTableInFirstNS(builder: FlatBufferBuilder): Int {
+      val o = builder.endTable()
+      return o
     }
+  }
 }
diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.py b/tests/namespace_test/NamespaceA/TableInFirstNS.py
index 8f191f8..b1c31a3 100644
--- a/tests/namespace_test/NamespaceA/TableInFirstNS.py
+++ b/tests/namespace_test/NamespaceA/TableInFirstNS.py
@@ -4,145 +4,198 @@
 
 import flatbuffers
 from flatbuffers.compat import import_numpy
+
 np = import_numpy()
 
+
 class TableInFirstNS(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset=0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = TableInFirstNS()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset=0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = TableInFirstNS()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsTableInFirstNS(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # TableInFirstNS
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsTableInFirstNS(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
 
-    # TableInFirstNS
-    def FooTable(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            obj = TableInNestedNS()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # TableInFirstNS
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-    # TableInFirstNS
-    def FooEnum(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
-        if o != 0:
-            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
-        return 0
+  # TableInFirstNS
+  def FooTable(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      obj = TableInNestedNS()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
 
-    # TableInFirstNS
-    def FooUnionType(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
-        if o != 0:
-            return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
-        return 0
+  # TableInFirstNS
+  def FooEnum(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+    if o != 0:
+      return self._tab.Get(
+          flatbuffers.number_types.Int8Flags, o + self._tab.Pos
+      )
+    return 0
 
-    # TableInFirstNS
-    def FooUnion(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
-        if o != 0:
-            from flatbuffers.table import Table
-            obj = Table(bytearray(), 0)
-            self._tab.Union(obj, o)
-            return obj
-        return None
+  # TableInFirstNS
+  def FooUnionType(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+    if o != 0:
+      return self._tab.Get(
+          flatbuffers.number_types.Uint8Flags, o + self._tab.Pos
+      )
+    return 0
 
-    # TableInFirstNS
-    def FooStruct(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
-        if o != 0:
-            x = o + self._tab.Pos
-            obj = StructInNestedNS()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # TableInFirstNS
+  def FooUnion(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+    if o != 0:
+      from flatbuffers.table import Table
 
-def TableInFirstNSStart(builder): builder.StartObject(5)
+      obj = Table(bytearray(), 0)
+      self._tab.Union(obj, o)
+      return obj
+    return None
+
+  # TableInFirstNS
+  def FooStruct(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+    if o != 0:
+      x = o + self._tab.Pos
+      obj = StructInNestedNS()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
+
+
+def TableInFirstNSStart(builder):
+  builder.StartObject(5)
+
+
 def Start(builder):
-    return TableInFirstNSStart(builder)
-def TableInFirstNSAddFooTable(builder, fooTable): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(fooTable), 0)
+  return TableInFirstNSStart(builder)
+
+
+def TableInFirstNSAddFooTable(builder, fooTable):
+  builder.PrependUOffsetTRelativeSlot(
+      0, flatbuffers.number_types.UOffsetTFlags.py_type(fooTable), 0
+  )
+
+
 def AddFooTable(builder, fooTable):
-    return TableInFirstNSAddFooTable(builder, fooTable)
-def TableInFirstNSAddFooEnum(builder, fooEnum): builder.PrependInt8Slot(1, fooEnum, 0)
+  return TableInFirstNSAddFooTable(builder, fooTable)
+
+
+def TableInFirstNSAddFooEnum(builder, fooEnum):
+  builder.PrependInt8Slot(1, fooEnum, 0)
+
+
 def AddFooEnum(builder, fooEnum):
-    return TableInFirstNSAddFooEnum(builder, fooEnum)
-def TableInFirstNSAddFooUnionType(builder, fooUnionType): builder.PrependUint8Slot(2, fooUnionType, 0)
+  return TableInFirstNSAddFooEnum(builder, fooEnum)
+
+
+def TableInFirstNSAddFooUnionType(builder, fooUnionType):
+  builder.PrependUint8Slot(2, fooUnionType, 0)
+
+
 def AddFooUnionType(builder, fooUnionType):
-    return TableInFirstNSAddFooUnionType(builder, fooUnionType)
-def TableInFirstNSAddFooUnion(builder, fooUnion): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(fooUnion), 0)
+  return TableInFirstNSAddFooUnionType(builder, fooUnionType)
+
+
+def TableInFirstNSAddFooUnion(builder, fooUnion):
+  builder.PrependUOffsetTRelativeSlot(
+      3, flatbuffers.number_types.UOffsetTFlags.py_type(fooUnion), 0
+  )
+
+
 def AddFooUnion(builder, fooUnion):
-    return TableInFirstNSAddFooUnion(builder, fooUnion)
-def TableInFirstNSAddFooStruct(builder, fooStruct): builder.PrependStructSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(fooStruct), 0)
+  return TableInFirstNSAddFooUnion(builder, fooUnion)
+
+
+def TableInFirstNSAddFooStruct(builder, fooStruct):
+  builder.PrependStructSlot(
+      4, flatbuffers.number_types.UOffsetTFlags.py_type(fooStruct), 0
+  )
+
+
 def AddFooStruct(builder, fooStruct):
-    return TableInFirstNSAddFooStruct(builder, fooStruct)
-def TableInFirstNSEnd(builder): return builder.EndObject()
+  return TableInFirstNSAddFooStruct(builder, fooStruct)
+
+
+def TableInFirstNSEnd(builder):
+  return builder.EndObject()
+
+
 def End(builder):
-    return TableInFirstNSEnd(builder)
+  return TableInFirstNSEnd(builder)
+
+
 try:
-    from typing import Optional, Union
+  from typing import Optional, Union
 except:
-    pass
+  pass
+
 
 class TableInFirstNST(object):
 
-    # TableInFirstNST
-    def __init__(self):
-        self.fooTable = None  # type: Optional[TableInNestedNST]
-        self.fooEnum = 0  # type: int
-        self.fooUnionType = 0  # type: int
-        self.fooUnion = None  # type: Union[None, TableInNestedNST]
-        self.fooStruct = None  # type: Optional[StructInNestedNST]
+  # TableInFirstNST
+  def __init__(self):
+    self.fooTable = None  # type: Optional[TableInNestedNST]
+    self.fooEnum = 0  # type: int
+    self.fooUnionType = 0  # type: int
+    self.fooUnion = None  # type: Union[None, TableInNestedNST]
+    self.fooStruct = None  # type: Optional[StructInNestedNST]
 
-    @classmethod
-    def InitFromBuf(cls, buf, pos):
-        tableInFirstNS = TableInFirstNS()
-        tableInFirstNS.Init(buf, pos)
-        return cls.InitFromObj(tableInFirstNS)
+  @classmethod
+  def InitFromBuf(cls, buf, pos):
+    tableInFirstNS = TableInFirstNS()
+    tableInFirstNS.Init(buf, pos)
+    return cls.InitFromObj(tableInFirstNS)
 
-    @classmethod
-    def InitFromObj(cls, tableInFirstNS):
-        x = TableInFirstNST()
-        x._UnPack(tableInFirstNS)
-        return x
+  @classmethod
+  def InitFromObj(cls, tableInFirstNS):
+    x = TableInFirstNST()
+    x._UnPack(tableInFirstNS)
+    return x
 
-    # TableInFirstNST
-    def _UnPack(self, tableInFirstNS):
-        if tableInFirstNS is None:
-            return
-        if tableInFirstNS.FooTable() is not None:
-            self.fooTable = TableInNestedNST.InitFromObj(tableInFirstNS.FooTable())
-        self.fooEnum = tableInFirstNS.FooEnum()
-        self.fooUnionType = tableInFirstNS.FooUnionType()
-        self.fooUnion = UnionInNestedNSCreator(self.fooUnionType, tableInFirstNS.FooUnion())
-        if tableInFirstNS.FooStruct() is not None:
-            self.fooStruct = StructInNestedNST.InitFromObj(tableInFirstNS.FooStruct())
+  # TableInFirstNST
+  def _UnPack(self, tableInFirstNS):
+    if tableInFirstNS is None:
+      return
+    if tableInFirstNS.FooTable() is not None:
+      self.fooTable = TableInNestedNST.InitFromObj(tableInFirstNS.FooTable())
+    self.fooEnum = tableInFirstNS.FooEnum()
+    self.fooUnionType = tableInFirstNS.FooUnionType()
+    self.fooUnion = UnionInNestedNSCreator(
+        self.fooUnionType, tableInFirstNS.FooUnion()
+    )
+    if tableInFirstNS.FooStruct() is not None:
+      self.fooStruct = StructInNestedNST.InitFromObj(tableInFirstNS.FooStruct())
 
-    # TableInFirstNST
-    def Pack(self, builder):
-        if self.fooTable is not None:
-            fooTable = self.fooTable.Pack(builder)
-        if self.fooUnion is not None:
-            fooUnion = self.fooUnion.Pack(builder)
-        TableInFirstNSStart(builder)
-        if self.fooTable is not None:
-            TableInFirstNSAddFooTable(builder, fooTable)
-        TableInFirstNSAddFooEnum(builder, self.fooEnum)
-        TableInFirstNSAddFooUnionType(builder, self.fooUnionType)
-        if self.fooUnion is not None:
-            TableInFirstNSAddFooUnion(builder, fooUnion)
-        if self.fooStruct is not None:
-            fooStruct = self.fooStruct.Pack(builder)
-            TableInFirstNSAddFooStruct(builder, fooStruct)
-        tableInFirstNS = TableInFirstNSEnd(builder)
-        return tableInFirstNS
+  # TableInFirstNST
+  def Pack(self, builder):
+    if self.fooTable is not None:
+      fooTable = self.fooTable.Pack(builder)
+    if self.fooUnion is not None:
+      fooUnion = self.fooUnion.Pack(builder)
+    TableInFirstNSStart(builder)
+    if self.fooTable is not None:
+      TableInFirstNSAddFooTable(builder, fooTable)
+    TableInFirstNSAddFooEnum(builder, self.fooEnum)
+    TableInFirstNSAddFooUnionType(builder, self.fooUnionType)
+    if self.fooUnion is not None:
+      TableInFirstNSAddFooUnion(builder, fooUnion)
+    if self.fooStruct is not None:
+      fooStruct = self.fooStruct.Pack(builder)
+      TableInFirstNSAddFooStruct(builder, fooStruct)
+    tableInFirstNS = TableInFirstNSEnd(builder)
+    return tableInFirstNS
diff --git a/tests/namespace_test/NamespaceA/TableInFirstNST.java b/tests/namespace_test/NamespaceA/TableInFirstNST.java
index ee439d4..de3d047 100644
--- a/tests/namespace_test/NamespaceA/TableInFirstNST.java
+++ b/tests/namespace_test/NamespaceA/TableInFirstNST.java
@@ -2,10 +2,9 @@
 
 package NamespaceA;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class TableInFirstNST {
   private NamespaceA.NamespaceB.TableInNestedNST fooTable;
@@ -13,22 +12,37 @@
   private NamespaceA.NamespaceB.UnionInNestedNSUnion fooUnion;
   private NamespaceA.NamespaceB.StructInNestedNST fooStruct;
 
-  public NamespaceA.NamespaceB.TableInNestedNST getFooTable() { return fooTable; }
+  public NamespaceA.NamespaceB.TableInNestedNST getFooTable() {
+    return fooTable;
+  }
 
-  public void setFooTable(NamespaceA.NamespaceB.TableInNestedNST fooTable) { this.fooTable = fooTable; }
+  public void setFooTable(NamespaceA.NamespaceB.TableInNestedNST fooTable) {
+    this.fooTable = fooTable;
+  }
 
-  public byte getFooEnum() { return fooEnum; }
+  public byte getFooEnum() {
+    return fooEnum;
+  }
 
-  public void setFooEnum(byte fooEnum) { this.fooEnum = fooEnum; }
+  public void setFooEnum(byte fooEnum) {
+    this.fooEnum = fooEnum;
+  }
 
-  public NamespaceA.NamespaceB.UnionInNestedNSUnion getFooUnion() { return fooUnion; }
+  public NamespaceA.NamespaceB.UnionInNestedNSUnion getFooUnion() {
+    return fooUnion;
+  }
 
-  public void setFooUnion(NamespaceA.NamespaceB.UnionInNestedNSUnion fooUnion) { this.fooUnion = fooUnion; }
+  public void setFooUnion(NamespaceA.NamespaceB.UnionInNestedNSUnion fooUnion) {
+    this.fooUnion = fooUnion;
+  }
 
-  public NamespaceA.NamespaceB.StructInNestedNST getFooStruct() { return fooStruct; }
+  public NamespaceA.NamespaceB.StructInNestedNST getFooStruct() {
+    return fooStruct;
+  }
 
-  public void setFooStruct(NamespaceA.NamespaceB.StructInNestedNST fooStruct) { this.fooStruct = fooStruct; }
-
+  public void setFooStruct(NamespaceA.NamespaceB.StructInNestedNST fooStruct) {
+    this.fooStruct = fooStruct;
+  }
 
   public TableInFirstNST() {
     this.fooTable = null;
@@ -37,4 +51,3 @@
     this.fooStruct = new NamespaceA.NamespaceB.StructInNestedNST();
   }
 }
-
diff --git a/tests/namespace_test/NamespaceC/TableInC.go b/tests/namespace_test/NamespaceC/TableInC.go
index f171634..1979789 100644
--- a/tests/namespace_test/NamespaceC/TableInC.go
+++ b/tests/namespace_test/NamespaceC/TableInC.go
@@ -14,7 +14,9 @@
 }
 
 func (t *TableInCT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	referToA1Offset := t.ReferToA1.Pack(builder)
 	referToA2Offset := t.ReferToA2.Pack(builder)
 	TableInCStart(builder)
@@ -29,7 +31,9 @@
 }
 
 func (rcv *TableInC) UnPack() *TableInCT {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &TableInCT{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/namespace_test/NamespaceC/TableInC.java b/tests/namespace_test/NamespaceC/TableInC.java
index cb442ac..c20a4c4 100644
--- a/tests/namespace_test/NamespaceC/TableInC.java
+++ b/tests/namespace_test/NamespaceC/TableInC.java
@@ -2,66 +2,111 @@
 
 package NamespaceC;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 @SuppressWarnings("unused")
 public final class TableInC extends Table {
-  public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
-  public static TableInC getRootAsTableInC(ByteBuffer _bb) { return getRootAsTableInC(_bb, new TableInC()); }
-  public static TableInC getRootAsTableInC(ByteBuffer _bb, TableInC obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
-  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
-  public TableInC __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+  public static void ValidateVersion() {
+    Constants.FLATBUFFERS_25_2_10();
+  }
 
-  public NamespaceA.TableInFirstNS referToA1() { return referToA1(new NamespaceA.TableInFirstNS()); }
-  public NamespaceA.TableInFirstNS referToA1(NamespaceA.TableInFirstNS obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
-  public NamespaceA.SecondTableInA referToA2() { return referToA2(new NamespaceA.SecondTableInA()); }
-  public NamespaceA.SecondTableInA referToA2(NamespaceA.SecondTableInA obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
+  public static TableInC getRootAsTableInC(ByteBuffer _bb) {
+    return getRootAsTableInC(_bb, new TableInC());
+  }
 
-  public static int createTableInC(FlatBufferBuilder builder,
-      int referToA1Offset,
-      int referToA2Offset) {
+  public static TableInC getRootAsTableInC(ByteBuffer _bb, TableInC obj) {
+    _bb.order(ByteOrder.LITTLE_ENDIAN);
+    return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb));
+  }
+
+  public void __init(int _i, ByteBuffer _bb) {
+    __reset(_i, _bb);
+  }
+
+  public TableInC __assign(int _i, ByteBuffer _bb) {
+    __init(_i, _bb);
+    return this;
+  }
+
+  public NamespaceA.TableInFirstNS referToA1() {
+    return referToA1(new NamespaceA.TableInFirstNS());
+  }
+
+  public NamespaceA.TableInFirstNS referToA1(NamespaceA.TableInFirstNS obj) {
+    int o = __offset(4);
+    return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null;
+  }
+
+  public NamespaceA.SecondTableInA referToA2() {
+    return referToA2(new NamespaceA.SecondTableInA());
+  }
+
+  public NamespaceA.SecondTableInA referToA2(NamespaceA.SecondTableInA obj) {
+    int o = __offset(6);
+    return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null;
+  }
+
+  public static int createTableInC(
+      FlatBufferBuilder builder, int referToA1Offset, int referToA2Offset) {
     builder.startTable(2);
     TableInC.addReferToA2(builder, referToA2Offset);
     TableInC.addReferToA1(builder, referToA1Offset);
     return TableInC.endTableInC(builder);
   }
 
-  public static void startTableInC(FlatBufferBuilder builder) { builder.startTable(2); }
-  public static void addReferToA1(FlatBufferBuilder builder, int referToA1Offset) { builder.addOffset(0, referToA1Offset, 0); }
-  public static void addReferToA2(FlatBufferBuilder builder, int referToA2Offset) { builder.addOffset(1, referToA2Offset, 0); }
+  public static void startTableInC(FlatBufferBuilder builder) {
+    builder.startTable(2);
+  }
+
+  public static void addReferToA1(FlatBufferBuilder builder, int referToA1Offset) {
+    builder.addOffset(0, referToA1Offset, 0);
+  }
+
+  public static void addReferToA2(FlatBufferBuilder builder, int referToA2Offset) {
+    builder.addOffset(1, referToA2Offset, 0);
+  }
+
   public static int endTableInC(FlatBufferBuilder builder) {
     int o = builder.endTable();
     return o;
   }
 
   public static final class Vector extends BaseVector {
-    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
+    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
+      __reset(_vector, _element_size, _bb);
+      return this;
+    }
 
-    public TableInC get(int j) { return get(new TableInC(), j); }
-    public TableInC get(TableInC obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
+    public TableInC get(int j) {
+      return get(new TableInC(), j);
+    }
+
+    public TableInC get(TableInC obj, int j) {
+      return obj.__assign(__indirect(__element(j), bb), bb);
+    }
   }
+
   public TableInCT unpack() {
     TableInCT _o = new TableInCT();
     unpackTo(_o);
     return _o;
   }
+
   public void unpackTo(TableInCT _o) {
     if (referToA1() != null) _o.setReferToA1(referToA1().unpack());
     else _o.setReferToA1(null);
     if (referToA2() != null) _o.setReferToA2(referToA2().unpack());
     else _o.setReferToA2(null);
   }
+
   public static int pack(FlatBufferBuilder builder, TableInCT _o) {
     if (_o == null) return 0;
-    int _refer_to_a1 = _o.getReferToA1() == null ? 0 : NamespaceA.TableInFirstNS.pack(builder, _o.getReferToA1());
-    int _refer_to_a2 = _o.getReferToA2() == null ? 0 : NamespaceA.SecondTableInA.pack(builder, _o.getReferToA2());
-    return createTableInC(
-      builder,
-      _refer_to_a1,
-      _refer_to_a2);
+    int _refer_to_a1 =
+        _o.getReferToA1() == null ? 0 : NamespaceA.TableInFirstNS.pack(builder, _o.getReferToA1());
+    int _refer_to_a2 =
+        _o.getReferToA2() == null ? 0 : NamespaceA.SecondTableInA.pack(builder, _o.getReferToA2());
+    return createTableInC(builder, _refer_to_a1, _refer_to_a2);
   }
 }
-
diff --git a/tests/namespace_test/NamespaceC/TableInC.kt b/tests/namespace_test/NamespaceC/TableInC.kt
index 27b57f0..b539661 100644
--- a/tests/namespace_test/NamespaceC/TableInC.kt
+++ b/tests/namespace_test/NamespaceC/TableInC.kt
@@ -2,70 +2,81 @@
 
 package NamespaceC
 
-import com.google.flatbuffers.BaseVector
-import com.google.flatbuffers.BooleanVector
-import com.google.flatbuffers.ByteVector
 import com.google.flatbuffers.Constants
-import com.google.flatbuffers.DoubleVector
 import com.google.flatbuffers.FlatBufferBuilder
-import com.google.flatbuffers.FloatVector
-import com.google.flatbuffers.LongVector
-import com.google.flatbuffers.StringVector
-import com.google.flatbuffers.Struct
 import com.google.flatbuffers.Table
-import com.google.flatbuffers.UnionVector
 import java.nio.ByteBuffer
 import java.nio.ByteOrder
-import kotlin.math.sign
 
 @Suppress("unused")
 @ExperimentalUnsignedTypes
 class TableInC : Table() {
 
-    fun __init(_i: Int, _bb: ByteBuffer)  {
-        __reset(_i, _bb)
+  fun __init(_i: Int, _bb: ByteBuffer) {
+    __reset(_i, _bb)
+  }
+
+  fun __assign(_i: Int, _bb: ByteBuffer): TableInC {
+    __init(_i, _bb)
+    return this
+  }
+
+  val referToA1: NamespaceA.TableInFirstNS?
+    get() = referToA1(NamespaceA.TableInFirstNS())
+
+  fun referToA1(obj: NamespaceA.TableInFirstNS): NamespaceA.TableInFirstNS? {
+    val o = __offset(4)
+    return if (o != 0) {
+      obj.__assign(__indirect(o + bb_pos), bb)
+    } else {
+      null
     }
-    fun __assign(_i: Int, _bb: ByteBuffer) : TableInC {
-        __init(_i, _bb)
-        return this
+  }
+
+  val referToA2: NamespaceA.SecondTableInA?
+    get() = referToA2(NamespaceA.SecondTableInA())
+
+  fun referToA2(obj: NamespaceA.SecondTableInA): NamespaceA.SecondTableInA? {
+    val o = __offset(6)
+    return if (o != 0) {
+      obj.__assign(__indirect(o + bb_pos), bb)
+    } else {
+      null
     }
-    val referToA1 : NamespaceA.TableInFirstNS? get() = referToA1(NamespaceA.TableInFirstNS())
-    fun referToA1(obj: NamespaceA.TableInFirstNS) : NamespaceA.TableInFirstNS? {
-        val o = __offset(4)
-        return if (o != 0) {
-            obj.__assign(__indirect(o + bb_pos), bb)
-        } else {
-            null
-        }
+  }
+
+  companion object {
+    fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
+
+    fun getRootAsTableInC(_bb: ByteBuffer): TableInC = getRootAsTableInC(_bb, TableInC())
+
+    fun getRootAsTableInC(_bb: ByteBuffer, obj: TableInC): TableInC {
+      _bb.order(ByteOrder.LITTLE_ENDIAN)
+      return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
     }
-    val referToA2 : NamespaceA.SecondTableInA? get() = referToA2(NamespaceA.SecondTableInA())
-    fun referToA2(obj: NamespaceA.SecondTableInA) : NamespaceA.SecondTableInA? {
-        val o = __offset(6)
-        return if (o != 0) {
-            obj.__assign(__indirect(o + bb_pos), bb)
-        } else {
-            null
-        }
+
+    fun createTableInC(
+      builder: FlatBufferBuilder,
+      referToA1Offset: Int,
+      referToA2Offset: Int,
+    ): Int {
+      builder.startTable(2)
+      addReferToA2(builder, referToA2Offset)
+      addReferToA1(builder, referToA1Offset)
+      return endTableInC(builder)
     }
-    companion object {
-        fun validateVersion() = Constants.FLATBUFFERS_25_2_10()
-        fun getRootAsTableInC(_bb: ByteBuffer): TableInC = getRootAsTableInC(_bb, TableInC())
-        fun getRootAsTableInC(_bb: ByteBuffer, obj: TableInC): TableInC {
-            _bb.order(ByteOrder.LITTLE_ENDIAN)
-            return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
-        }
-        fun createTableInC(builder: FlatBufferBuilder, referToA1Offset: Int, referToA2Offset: Int) : Int {
-            builder.startTable(2)
-            addReferToA2(builder, referToA2Offset)
-            addReferToA1(builder, referToA1Offset)
-            return endTableInC(builder)
-        }
-        fun startTableInC(builder: FlatBufferBuilder) = builder.startTable(2)
-        fun addReferToA1(builder: FlatBufferBuilder, referToA1: Int) = builder.addOffset(0, referToA1, 0)
-        fun addReferToA2(builder: FlatBufferBuilder, referToA2: Int) = builder.addOffset(1, referToA2, 0)
-        fun endTableInC(builder: FlatBufferBuilder) : Int {
-            val o = builder.endTable()
-            return o
-        }
+
+    fun startTableInC(builder: FlatBufferBuilder) = builder.startTable(2)
+
+    fun addReferToA1(builder: FlatBufferBuilder, referToA1: Int) =
+      builder.addOffset(0, referToA1, 0)
+
+    fun addReferToA2(builder: FlatBufferBuilder, referToA2: Int) =
+      builder.addOffset(1, referToA2, 0)
+
+    fun endTableInC(builder: FlatBufferBuilder): Int {
+      val o = builder.endTable()
+      return o
     }
+  }
 }
diff --git a/tests/namespace_test/NamespaceC/TableInC.py b/tests/namespace_test/NamespaceC/TableInC.py
index 762e1a1..18d7b02 100644
--- a/tests/namespace_test/NamespaceC/TableInC.py
+++ b/tests/namespace_test/NamespaceC/TableInC.py
@@ -4,101 +4,130 @@
 
 import flatbuffers
 from flatbuffers.compat import import_numpy
+
 np = import_numpy()
 
+
 class TableInC(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset=0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = TableInC()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset=0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = TableInC()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsTableInC(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # TableInC
-    def Init(self, buf, pos):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsTableInC(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
 
-    # TableInC
-    def ReferToA1(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            obj = TableInFirstNS()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # TableInC
+  def Init(self, buf, pos):
+    self._tab = flatbuffers.table.Table(buf, pos)
 
-    # TableInC
-    def ReferToA2(self):
-        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
-        if o != 0:
-            x = self._tab.Indirect(o + self._tab.Pos)
-            obj = SecondTableInA()
-            obj.Init(self._tab.Bytes, x)
-            return obj
-        return None
+  # TableInC
+  def ReferToA1(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      obj = TableInFirstNS()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
 
-def TableInCStart(builder): builder.StartObject(2)
+  # TableInC
+  def ReferToA2(self):
+    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+    if o != 0:
+      x = self._tab.Indirect(o + self._tab.Pos)
+      obj = SecondTableInA()
+      obj.Init(self._tab.Bytes, x)
+      return obj
+    return None
+
+
+def TableInCStart(builder):
+  builder.StartObject(2)
+
+
 def Start(builder):
-    return TableInCStart(builder)
-def TableInCAddReferToA1(builder, referToA1): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(referToA1), 0)
+  return TableInCStart(builder)
+
+
+def TableInCAddReferToA1(builder, referToA1):
+  builder.PrependUOffsetTRelativeSlot(
+      0, flatbuffers.number_types.UOffsetTFlags.py_type(referToA1), 0
+  )
+
+
 def AddReferToA1(builder, referToA1):
-    return TableInCAddReferToA1(builder, referToA1)
-def TableInCAddReferToA2(builder, referToA2): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(referToA2), 0)
+  return TableInCAddReferToA1(builder, referToA1)
+
+
+def TableInCAddReferToA2(builder, referToA2):
+  builder.PrependUOffsetTRelativeSlot(
+      1, flatbuffers.number_types.UOffsetTFlags.py_type(referToA2), 0
+  )
+
+
 def AddReferToA2(builder, referToA2):
-    return TableInCAddReferToA2(builder, referToA2)
-def TableInCEnd(builder): return builder.EndObject()
+  return TableInCAddReferToA2(builder, referToA2)
+
+
+def TableInCEnd(builder):
+  return builder.EndObject()
+
+
 def End(builder):
-    return TableInCEnd(builder)
+  return TableInCEnd(builder)
+
+
 try:
-    from typing import Optional
+  from typing import Optional
 except:
-    pass
+  pass
+
 
 class TableInCT(object):
 
-    # TableInCT
-    def __init__(self):
-        self.referToA1 = None  # type: Optional[TableInFirstNST]
-        self.referToA2 = None  # type: Optional[SecondTableInAT]
+  # TableInCT
+  def __init__(self):
+    self.referToA1 = None  # type: Optional[TableInFirstNST]
+    self.referToA2 = None  # type: Optional[SecondTableInAT]
 
-    @classmethod
-    def InitFromBuf(cls, buf, pos):
-        tableInC = TableInC()
-        tableInC.Init(buf, pos)
-        return cls.InitFromObj(tableInC)
+  @classmethod
+  def InitFromBuf(cls, buf, pos):
+    tableInC = TableInC()
+    tableInC.Init(buf, pos)
+    return cls.InitFromObj(tableInC)
 
-    @classmethod
-    def InitFromObj(cls, tableInC):
-        x = TableInCT()
-        x._UnPack(tableInC)
-        return x
+  @classmethod
+  def InitFromObj(cls, tableInC):
+    x = TableInCT()
+    x._UnPack(tableInC)
+    return x
 
-    # TableInCT
-    def _UnPack(self, tableInC):
-        if tableInC is None:
-            return
-        if tableInC.ReferToA1() is not None:
-            self.referToA1 = TableInFirstNST.InitFromObj(tableInC.ReferToA1())
-        if tableInC.ReferToA2() is not None:
-            self.referToA2 = SecondTableInAT.InitFromObj(tableInC.ReferToA2())
+  # TableInCT
+  def _UnPack(self, tableInC):
+    if tableInC is None:
+      return
+    if tableInC.ReferToA1() is not None:
+      self.referToA1 = TableInFirstNST.InitFromObj(tableInC.ReferToA1())
+    if tableInC.ReferToA2() is not None:
+      self.referToA2 = SecondTableInAT.InitFromObj(tableInC.ReferToA2())
 
-    # TableInCT
-    def Pack(self, builder):
-        if self.referToA1 is not None:
-            referToA1 = self.referToA1.Pack(builder)
-        if self.referToA2 is not None:
-            referToA2 = self.referToA2.Pack(builder)
-        TableInCStart(builder)
-        if self.referToA1 is not None:
-            TableInCAddReferToA1(builder, referToA1)
-        if self.referToA2 is not None:
-            TableInCAddReferToA2(builder, referToA2)
-        tableInC = TableInCEnd(builder)
-        return tableInC
+  # TableInCT
+  def Pack(self, builder):
+    if self.referToA1 is not None:
+      referToA1 = self.referToA1.Pack(builder)
+    if self.referToA2 is not None:
+      referToA2 = self.referToA2.Pack(builder)
+    TableInCStart(builder)
+    if self.referToA1 is not None:
+      TableInCAddReferToA1(builder, referToA1)
+    if self.referToA2 is not None:
+      TableInCAddReferToA2(builder, referToA2)
+    tableInC = TableInCEnd(builder)
+    return tableInC
diff --git a/tests/namespace_test/NamespaceC/TableInCT.java b/tests/namespace_test/NamespaceC/TableInCT.java
index d265091..1fa46d8 100644
--- a/tests/namespace_test/NamespaceC/TableInCT.java
+++ b/tests/namespace_test/NamespaceC/TableInCT.java
@@ -2,27 +2,32 @@
 
 package NamespaceC;
 
-import java.nio.*;
-import java.lang.*;
-import java.util.*;
 import com.google.flatbuffers.*;
+import java.nio.*;
+import java.util.*;
 
 public class TableInCT {
   private NamespaceA.TableInFirstNST referToA1;
   private NamespaceA.SecondTableInAT referToA2;
 
-  public NamespaceA.TableInFirstNST getReferToA1() { return referToA1; }
+  public NamespaceA.TableInFirstNST getReferToA1() {
+    return referToA1;
+  }
 
-  public void setReferToA1(NamespaceA.TableInFirstNST referToA1) { this.referToA1 = referToA1; }
+  public void setReferToA1(NamespaceA.TableInFirstNST referToA1) {
+    this.referToA1 = referToA1;
+  }
 
-  public NamespaceA.SecondTableInAT getReferToA2() { return referToA2; }
+  public NamespaceA.SecondTableInAT getReferToA2() {
+    return referToA2;
+  }
 
-  public void setReferToA2(NamespaceA.SecondTableInAT referToA2) { this.referToA2 = referToA2; }
-
+  public void setReferToA2(NamespaceA.SecondTableInAT referToA2) {
+    this.referToA2 = referToA2;
+  }
 
   public TableInCT() {
     this.referToA1 = null;
     this.referToA2 = null;
   }
 }
-
diff --git a/tests/namespace_test/namespace_test1_namespace_a.namespace_b_generated.dart b/tests/namespace_test/namespace_test1_namespace_a.namespace_b_generated.dart
index 5e0fb1d..8c95712 100644
--- a/tests/namespace_test/namespace_test1_namespace_a.namespace_b_generated.dart
+++ b/tests/namespace_test/namespace_test1_namespace_a.namespace_b_generated.dart
@@ -4,8 +4,8 @@
 library namespace_a.namespace_b;
 
 import 'dart:typed_data' show Uint8List;
-import 'package:flat_buffers/flat_buffers.dart' as fb;
 
+import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 class UnionInNestedNSTypeId {
   final int value;
@@ -14,12 +14,14 @@
   factory UnionInNestedNSTypeId.fromValue(int value) {
     final result = values[value];
     if (result == null) {
-      throw StateError('Invalid value $value for bit flag enum UnionInNestedNSTypeId');
+      throw StateError(
+        'Invalid value $value for bit flag enum UnionInNestedNSTypeId',
+      );
     }
     return result;
   }
 
-  static UnionInNestedNSTypeId? _createOrNull(int? value) => 
+  static UnionInNestedNSTypeId? _createOrNull(int? value) =>
       value == null ? null : UnionInNestedNSTypeId.fromValue(value);
 
   static const int minValue = 0;
@@ -27,12 +29,16 @@
   static bool containsValue(int value) => values.containsKey(value);
 
   static const UnionInNestedNSTypeId NONE = UnionInNestedNSTypeId._(0);
-  static const UnionInNestedNSTypeId TableInNestedNS = UnionInNestedNSTypeId._(1);
+  static const UnionInNestedNSTypeId TableInNestedNS = UnionInNestedNSTypeId._(
+    1,
+  );
   static const Map<int, UnionInNestedNSTypeId> values = {
     0: NONE,
-    1: TableInNestedNS};
+    1: TableInNestedNS,
+  };
 
-  static const fb.Reader<UnionInNestedNSTypeId> reader = _UnionInNestedNSTypeIdReader();
+  static const fb.Reader<UnionInNestedNSTypeId> reader =
+      _UnionInNestedNSTypeIdReader();
 
   @override
   String toString() {
@@ -63,7 +69,7 @@
     return result;
   }
 
-  static EnumInNestedNS? _createOrNull(int? value) => 
+  static EnumInNestedNS? _createOrNull(int? value) =>
       value == null ? null : EnumInNestedNS.fromValue(value);
 
   static const int minValue = 0;
@@ -73,10 +79,7 @@
   static const EnumInNestedNS A = EnumInNestedNS._(0);
   static const EnumInNestedNS B = EnumInNestedNS._(1);
   static const EnumInNestedNS C = EnumInNestedNS._(2);
-  static const Map<int, EnumInNestedNS> values = {
-    0: A,
-    1: B,
-    2: C};
+  static const Map<int, EnumInNestedNS> values = {0: A, 1: B, 2: C};
 
   static const fb.Reader<EnumInNestedNS> reader = _EnumInNestedNSReader();
 
@@ -116,8 +119,7 @@
     return 'TableInNestedNS{foo: $foo}';
   }
 
-  TableInNestedNST unpack() => TableInNestedNST(
-      foo: foo);
+  TableInNestedNST unpack() => TableInNestedNST(foo: foo);
 
   static int pack(fb.Builder fbBuilder, TableInNestedNST? object) {
     if (object == null) return 0;
@@ -128,8 +130,7 @@
 class TableInNestedNST implements fb.Packable {
   int foo;
 
-  TableInNestedNST({
-      this.foo = 0});
+  TableInNestedNST({this.foo = 0});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -148,8 +149,8 @@
   const _TableInNestedNSReader();
 
   @override
-  TableInNestedNS createObject(fb.BufferContext bc, int offset) => 
-    TableInNestedNS._(bc, offset);
+  TableInNestedNS createObject(fb.BufferContext bc, int offset) =>
+      TableInNestedNS._(bc, offset);
 }
 
 class TableInNestedNSBuilder {
@@ -174,10 +175,7 @@
 class TableInNestedNSObjectBuilder extends fb.ObjectBuilder {
   final int? _foo;
 
-  TableInNestedNSObjectBuilder({
-    int? foo,
-  })
-      : _foo = foo;
+  TableInNestedNSObjectBuilder({int? foo}) : _foo = foo;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -195,6 +193,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class StructInNestedNS {
   StructInNestedNS._(this._bc, this._bcOffset);
 
@@ -211,9 +210,7 @@
     return 'StructInNestedNS{a: $a, b: $b}';
   }
 
-  StructInNestedNST unpack() => StructInNestedNST(
-      a: a,
-      b: b);
+  StructInNestedNST unpack() => StructInNestedNST(a: a, b: b);
 
   static int pack(fb.Builder fbBuilder, StructInNestedNST? object) {
     if (object == null) return 0;
@@ -225,9 +222,7 @@
   int a;
   int b;
 
-  StructInNestedNST({
-      required this.a,
-      required this.b});
+  StructInNestedNST({required this.a, required this.b});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -249,8 +244,8 @@
   int get size => 8;
 
   @override
-  StructInNestedNS createObject(fb.BufferContext bc, int offset) => 
-    StructInNestedNS._(bc, offset);
+  StructInNestedNS createObject(fb.BufferContext bc, int offset) =>
+      StructInNestedNS._(bc, offset);
 }
 
 class StructInNestedNSBuilder {
@@ -263,19 +258,15 @@
     fbBuilder.putInt32(a);
     return fbBuilder.offset;
   }
-
 }
 
 class StructInNestedNSObjectBuilder extends fb.ObjectBuilder {
   final int _a;
   final int _b;
 
-  StructInNestedNSObjectBuilder({
-    required int a,
-    required int b,
-  })
-      : _a = a,
-        _b = b;
+  StructInNestedNSObjectBuilder({required int a, required int b})
+    : _a = a,
+      _b = b;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/tests/namespace_test/namespace_test2_namespace_a_generated.dart b/tests/namespace_test/namespace_test2_namespace_a_generated.dart
index 070cb5f..5acb545 100644
--- a/tests/namespace_test/namespace_test2_namespace_a_generated.dart
+++ b/tests/namespace_test/namespace_test2_namespace_a_generated.dart
@@ -4,6 +4,7 @@
 library namespace_a;
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 import './namespace_test2_namespace_c_generated.dart' as namespace_c;
@@ -20,16 +21,34 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  namespace_a_namespace_b.TableInNestedNS? get fooTable => namespace_a_namespace_b.TableInNestedNS.reader.vTableGetNullable(_bc, _bcOffset, 4);
-  EnumInNestedNS get fooEnum => EnumInNestedNS.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 6, 0));
-  UnionInNestedNSTypeId? get fooUnionType => UnionInNestedNSTypeId._createOrNull(const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 8));
+  namespace_a_namespace_b.TableInNestedNS? get fooTable =>
+      namespace_a_namespace_b.TableInNestedNS.reader.vTableGetNullable(
+        _bc,
+        _bcOffset,
+        4,
+      );
+  EnumInNestedNS get fooEnum => EnumInNestedNS.fromValue(
+    const fb.Int8Reader().vTableGet(_bc, _bcOffset, 6, 0),
+  );
+  UnionInNestedNSTypeId? get fooUnionType =>
+      UnionInNestedNSTypeId._createOrNull(
+        const fb.Uint8Reader().vTableGetNullable(_bc, _bcOffset, 8),
+      );
   dynamic get fooUnion {
     switch (fooUnionType?.value) {
-      case 1: return TableInNestedNS.reader.vTableGetNullable(_bc, _bcOffset, 10);
-      default: return null;
+      case 1:
+        return TableInNestedNS.reader.vTableGetNullable(_bc, _bcOffset, 10);
+      default:
+        return null;
     }
   }
-  namespace_a_namespace_b.StructInNestedNS? get fooStruct => namespace_a_namespace_b.StructInNestedNS.reader.vTableGetNullable(_bc, _bcOffset, 12);
+
+  namespace_a_namespace_b.StructInNestedNS? get fooStruct =>
+      namespace_a_namespace_b.StructInNestedNS.reader.vTableGetNullable(
+        _bc,
+        _bcOffset,
+        12,
+      );
 
   @override
   String toString() {
@@ -37,11 +56,12 @@
   }
 
   TableInFirstNST unpack() => TableInFirstNST(
-      fooTable: fooTable?.unpack(),
-      fooEnum: fooEnum,
-      fooUnionType: fooUnionType,
-      fooUnion: fooUnion,
-      fooStruct: fooStruct?.unpack());
+    fooTable: fooTable?.unpack(),
+    fooEnum: fooEnum,
+    fooUnionType: fooUnionType,
+    fooUnion: fooUnion,
+    fooStruct: fooStruct?.unpack(),
+  );
 
   static int pack(fb.Builder fbBuilder, TableInFirstNST? object) {
     if (object == null) return 0;
@@ -57,11 +77,12 @@
   namespace_a_namespace_b.StructInNestedNST? fooStruct;
 
   TableInFirstNST({
-      this.fooTable,
-      this.fooEnum = EnumInNestedNS.A,
-      this.fooUnionType,
-      this.fooUnion,
-      this.fooStruct});
+    this.fooTable,
+    this.fooEnum = EnumInNestedNS.A,
+    this.fooUnionType,
+    this.fooUnion,
+    this.fooStruct,
+  });
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -88,8 +109,8 @@
   const _TableInFirstNSReader();
 
   @override
-  TableInFirstNS createObject(fb.BufferContext bc, int offset) => 
-    TableInFirstNS._(bc, offset);
+  TableInFirstNS createObject(fb.BufferContext bc, int offset) =>
+      TableInFirstNS._(bc, offset);
 }
 
 class TableInFirstNSBuilder {
@@ -105,18 +126,22 @@
     fbBuilder.addOffset(0, offset);
     return fbBuilder.offset;
   }
+
   int addFooEnum(EnumInNestedNS? fooEnum) {
     fbBuilder.addInt8(1, fooEnum?.value);
     return fbBuilder.offset;
   }
+
   int addFooUnionType(UnionInNestedNSTypeId? fooUnionType) {
     fbBuilder.addUint8(2, fooUnionType?.value);
     return fbBuilder.offset;
   }
+
   int addFooUnionOffset(int? offset) {
     fbBuilder.addOffset(3, offset);
     return fbBuilder.offset;
   }
+
   int addFooStruct(int offset) {
     fbBuilder.addStruct(4, offset);
     return fbBuilder.offset;
@@ -140,12 +165,11 @@
     UnionInNestedNSTypeId? fooUnionType,
     dynamic fooUnion,
     namespace_a_namespace_b.StructInNestedNSObjectBuilder? fooStruct,
-  })
-      : _fooTable = fooTable,
-        _fooEnum = fooEnum,
-        _fooUnionType = fooUnionType,
-        _fooUnion = fooUnion,
-        _fooStruct = fooStruct;
+  }) : _fooTable = fooTable,
+       _fooEnum = fooEnum,
+       _fooUnionType = fooUnionType,
+       _fooUnion = fooUnion,
+       _fooStruct = fooStruct;
 
   /// Finish building, and store into the [fbBuilder].
   @override
@@ -171,6 +195,7 @@
     return fbBuilder.buffer;
   }
 }
+
 class SecondTableInA {
   SecondTableInA._(this._bc, this._bcOffset);
   factory SecondTableInA(List<int> bytes) {
@@ -183,15 +208,15 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  namespace_c.TableInC? get referToC => namespace_c.TableInC.reader.vTableGetNullable(_bc, _bcOffset, 4);
+  namespace_c.TableInC? get referToC =>
+      namespace_c.TableInC.reader.vTableGetNullable(_bc, _bcOffset, 4);
 
   @override
   String toString() {
     return 'SecondTableInA{referToC: $referToC}';
   }
 
-  SecondTableInAT unpack() => SecondTableInAT(
-      referToC: referToC?.unpack());
+  SecondTableInAT unpack() => SecondTableInAT(referToC: referToC?.unpack());
 
   static int pack(fb.Builder fbBuilder, SecondTableInAT? object) {
     if (object == null) return 0;
@@ -202,8 +227,7 @@
 class SecondTableInAT implements fb.Packable {
   namespace_c.TableInCT? referToC;
 
-  SecondTableInAT({
-      this.referToC});
+  SecondTableInAT({this.referToC});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -223,8 +247,8 @@
   const _SecondTableInAReader();
 
   @override
-  SecondTableInA createObject(fb.BufferContext bc, int offset) => 
-    SecondTableInA._(bc, offset);
+  SecondTableInA createObject(fb.BufferContext bc, int offset) =>
+      SecondTableInA._(bc, offset);
 }
 
 class SecondTableInABuilder {
@@ -249,10 +273,8 @@
 class SecondTableInAObjectBuilder extends fb.ObjectBuilder {
   final namespace_c.TableInCObjectBuilder? _referToC;
 
-  SecondTableInAObjectBuilder({
-    namespace_c.TableInCObjectBuilder? referToC,
-  })
-      : _referToC = referToC;
+  SecondTableInAObjectBuilder({namespace_c.TableInCObjectBuilder? referToC})
+    : _referToC = referToC;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/tests/namespace_test/namespace_test2_namespace_c_generated.dart b/tests/namespace_test/namespace_test2_namespace_c_generated.dart
index 1c30bb4..32c038a 100644
--- a/tests/namespace_test/namespace_test2_namespace_c_generated.dart
+++ b/tests/namespace_test/namespace_test2_namespace_c_generated.dart
@@ -4,6 +4,7 @@
 library namespace_c;
 
 import 'dart:typed_data' show Uint8List;
+
 import 'package:flat_buffers/flat_buffers.dart' as fb;
 
 import './namespace_test2_namespace_a_generated.dart' as namespace_a;
@@ -20,17 +21,18 @@
   final fb.BufferContext _bc;
   final int _bcOffset;
 
-  namespace_a.TableInFirstNS? get referToA1 => namespace_a.TableInFirstNS.reader.vTableGetNullable(_bc, _bcOffset, 4);
-  namespace_a.SecondTableInA? get referToA2 => namespace_a.SecondTableInA.reader.vTableGetNullable(_bc, _bcOffset, 6);
+  namespace_a.TableInFirstNS? get referToA1 =>
+      namespace_a.TableInFirstNS.reader.vTableGetNullable(_bc, _bcOffset, 4);
+  namespace_a.SecondTableInA? get referToA2 =>
+      namespace_a.SecondTableInA.reader.vTableGetNullable(_bc, _bcOffset, 6);
 
   @override
   String toString() {
     return 'TableInC{referToA1: $referToA1, referToA2: $referToA2}';
   }
 
-  TableInCT unpack() => TableInCT(
-      referToA1: referToA1?.unpack(),
-      referToA2: referToA2?.unpack());
+  TableInCT unpack() =>
+      TableInCT(referToA1: referToA1?.unpack(), referToA2: referToA2?.unpack());
 
   static int pack(fb.Builder fbBuilder, TableInCT? object) {
     if (object == null) return 0;
@@ -42,9 +44,7 @@
   namespace_a.TableInFirstNST? referToA1;
   namespace_a.SecondTableInAT? referToA2;
 
-  TableInCT({
-      this.referToA1,
-      this.referToA2});
+  TableInCT({this.referToA1, this.referToA2});
 
   @override
   int pack(fb.Builder fbBuilder) {
@@ -66,8 +66,8 @@
   const _TableInCReader();
 
   @override
-  TableInC createObject(fb.BufferContext bc, int offset) => 
-    TableInC._(bc, offset);
+  TableInC createObject(fb.BufferContext bc, int offset) =>
+      TableInC._(bc, offset);
 }
 
 class TableInCBuilder {
@@ -83,6 +83,7 @@
     fbBuilder.addOffset(0, offset);
     return fbBuilder.offset;
   }
+
   int addReferToA2Offset(int? offset) {
     fbBuilder.addOffset(1, offset);
     return fbBuilder.offset;
@@ -100,9 +101,8 @@
   TableInCObjectBuilder({
     namespace_a.TableInFirstNSObjectBuilder? referToA1,
     namespace_a.SecondTableInAObjectBuilder? referToA2,
-  })
-      : _referToA1 = referToA1,
-        _referToA2 = referToA2;
+  }) : _referToA1 = referToA1,
+       _referToA2 = referToA2;
 
   /// Finish building, and store into the [fbBuilder].
   @override
diff --git a/tests/native_type_test_impl.h b/tests/native_type_test_impl.h
index bc8f385..578a58a 100644
--- a/tests/native_type_test_impl.h
+++ b/tests/native_type_test_impl.h
@@ -26,10 +26,10 @@
 }  // namespace Geometry
 
 namespace flatbuffers {
-Geometry::Vector3D Pack(const Native::Vector3D &obj);
-const Native::Vector3D UnPack(const Geometry::Vector3D &obj);
-Geometry::Vector3DAlt PackVector3DAlt(const Native::Vector3D &obj);
-const Native::Vector3D UnPackVector3DAlt(const Geometry::Vector3DAlt &obj);
+Geometry::Vector3D Pack(const Native::Vector3D& obj);
+const Native::Vector3D UnPack(const Geometry::Vector3D& obj);
+Geometry::Vector3DAlt PackVector3DAlt(const Native::Vector3D& obj);
+const Native::Vector3D UnPackVector3DAlt(const Geometry::Vector3DAlt& obj);
 }  // namespace flatbuffers
 
 #endif  // VECTOR3D_PACK_H
diff --git a/tests/nim/testnim.py b/tests/nim/testnim.py
index 2a54cf3..4244aa3 100644
--- a/tests/nim/testnim.py
+++ b/tests/nim/testnim.py
@@ -1,22 +1,22 @@
 import glob
 import os
+from pathlib import Path
 import shutil
 import subprocess
-from pathlib import Path
 
 test_nim_dir = Path(__file__).absolute().parent
 test_dir = test_nim_dir.parent
 
 
 def main():
-    try:
-        subprocess.check_call("testament --megatest:off all".split())
-    finally:
-        shutil.rmtree(test_nim_dir / "nimcache")
-        shutil.rmtree(test_nim_dir / "testresults")
-        for f in glob.glob(str(test_nim_dir / "tests" / "*" / "test")):
-            os.remove(f)
+  try:
+    subprocess.check_call("testament --megatest:off all".split())
+  finally:
+    shutil.rmtree(test_nim_dir / "nimcache")
+    shutil.rmtree(test_nim_dir / "testresults")
+    for f in glob.glob(str(test_nim_dir / "tests" / "*" / "test")):
+      os.remove(f)
 
 
 if __name__ == "__main__":
-    main()
+  main()
diff --git a/tests/optional_scalars/ScalarStuff.go b/tests/optional_scalars/ScalarStuff.go
index 8b56567..62c8183 100644
--- a/tests/optional_scalars/ScalarStuff.go
+++ b/tests/optional_scalars/ScalarStuff.go
@@ -7,46 +7,48 @@
 )
 
 type ScalarStuffT struct {
-	JustI8 int8 `json:"just_i8"`
-	MaybeI8 *int8 `json:"maybe_i8"`
-	DefaultI8 int8 `json:"default_i8"`
-	JustU8 byte `json:"just_u8"`
-	MaybeU8 *byte `json:"maybe_u8"`
-	DefaultU8 byte `json:"default_u8"`
-	JustI16 int16 `json:"just_i16"`
-	MaybeI16 *int16 `json:"maybe_i16"`
-	DefaultI16 int16 `json:"default_i16"`
-	JustU16 uint16 `json:"just_u16"`
-	MaybeU16 *uint16 `json:"maybe_u16"`
-	DefaultU16 uint16 `json:"default_u16"`
-	JustI32 int32 `json:"just_i32"`
-	MaybeI32 *int32 `json:"maybe_i32"`
-	DefaultI32 int32 `json:"default_i32"`
-	JustU32 uint32 `json:"just_u32"`
-	MaybeU32 *uint32 `json:"maybe_u32"`
-	DefaultU32 uint32 `json:"default_u32"`
-	JustI64 int64 `json:"just_i64"`
-	MaybeI64 *int64 `json:"maybe_i64"`
-	DefaultI64 int64 `json:"default_i64"`
-	JustU64 uint64 `json:"just_u64"`
-	MaybeU64 *uint64 `json:"maybe_u64"`
-	DefaultU64 uint64 `json:"default_u64"`
-	JustF32 float32 `json:"just_f32"`
-	MaybeF32 *float32 `json:"maybe_f32"`
-	DefaultF32 float32 `json:"default_f32"`
-	JustF64 float64 `json:"just_f64"`
-	MaybeF64 *float64 `json:"maybe_f64"`
-	DefaultF64 float64 `json:"default_f64"`
-	JustBool bool `json:"just_bool"`
-	MaybeBool *bool `json:"maybe_bool"`
-	DefaultBool bool `json:"default_bool"`
-	JustEnum OptionalByte `json:"just_enum"`
-	MaybeEnum *OptionalByte `json:"maybe_enum"`
-	DefaultEnum OptionalByte `json:"default_enum"`
+	JustI8      int8          `json:"just_i8"`
+	MaybeI8     *int8         `json:"maybe_i8"`
+	DefaultI8   int8          `json:"default_i8"`
+	JustU8      byte          `json:"just_u8"`
+	MaybeU8     *byte         `json:"maybe_u8"`
+	DefaultU8   byte          `json:"default_u8"`
+	JustI16     int16         `json:"just_i16"`
+	MaybeI16    *int16        `json:"maybe_i16"`
+	DefaultI16  int16         `json:"default_i16"`
+	JustU16     uint16        `json:"just_u16"`
+	MaybeU16    *uint16       `json:"maybe_u16"`
+	DefaultU16  uint16        `json:"default_u16"`
+	JustI32     int32         `json:"just_i32"`
+	MaybeI32    *int32        `json:"maybe_i32"`
+	DefaultI32  int32         `json:"default_i32"`
+	JustU32     uint32        `json:"just_u32"`
+	MaybeU32    *uint32       `json:"maybe_u32"`
+	DefaultU32  uint32        `json:"default_u32"`
+	JustI64     int64         `json:"just_i64"`
+	MaybeI64    *int64        `json:"maybe_i64"`
+	DefaultI64  int64         `json:"default_i64"`
+	JustU64     uint64        `json:"just_u64"`
+	MaybeU64    *uint64       `json:"maybe_u64"`
+	DefaultU64  uint64        `json:"default_u64"`
+	JustF32     float32       `json:"just_f32"`
+	MaybeF32    *float32      `json:"maybe_f32"`
+	DefaultF32  float32       `json:"default_f32"`
+	JustF64     float64       `json:"just_f64"`
+	MaybeF64    *float64      `json:"maybe_f64"`
+	DefaultF64  float64       `json:"default_f64"`
+	JustBool    bool          `json:"just_bool"`
+	MaybeBool   *bool         `json:"maybe_bool"`
+	DefaultBool bool          `json:"default_bool"`
+	JustEnum    OptionalByte  `json:"just_enum"`
+	MaybeEnum   *OptionalByte `json:"maybe_enum"`
+	DefaultEnum OptionalByte  `json:"default_enum"`
 }
 
 func (t *ScalarStuffT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	ScalarStuffStart(builder)
 	ScalarStuffAddJustI8(builder, t.JustI8)
 	if t.MaybeI8 != nil {
@@ -151,7 +153,9 @@
 }
 
 func (rcv *ScalarStuff) UnPack() *ScalarStuffT {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &ScalarStuffT{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/optional_scalars_generated.ts b/tests/optional_scalars_generated.ts
index 4a83c43..522f7ff 100644
--- a/tests/optional_scalars_generated.ts
+++ b/tests/optional_scalars_generated.ts
@@ -1,4 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 
-export { OptionalByte } from './optional-scalars/optional-byte';
-export { ScalarStuff } from './optional-scalars/scalar-stuff';
+export {OptionalByte} from './optional-scalars/optional-byte';
+export {ScalarStuff} from './optional-scalars/scalar-stuff';
diff --git a/tests/optional_scalars_test.h b/tests/optional_scalars_test.h
index 922e52c..8a460fd 100644
--- a/tests/optional_scalars_test.h
+++ b/tests/optional_scalars_test.h
@@ -1,7 +1,6 @@
 #ifndef TESTS_OPTIONAL_SCALARS_TEST_H
 #define TESTS_OPTIONAL_SCALARS_TEST_H
 
-
 namespace flatbuffers {
 namespace tests {
 
diff --git a/tests/order/Food.go b/tests/order/Food.go
index 298d631..5c7d399 100644
--- a/tests/order/Food.go
+++ b/tests/order/Food.go
@@ -9,12 +9,14 @@
 )
 
 type FoodT struct {
-	Pizza *Pizza.PizzaT `json:"pizza"`
+	Pizza     *Pizza.PizzaT `json:"pizza"`
 	PizzaTest *Pizza.PizzaT `json:"pizza_test"`
 }
 
 func (t *FoodT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
-	if t == nil { return 0 }
+	if t == nil {
+		return 0
+	}
 	pizzaOffset := t.Pizza.Pack(builder)
 	pizzaTestOffset := t.PizzaTest.Pack(builder)
 	FoodStart(builder)
@@ -29,7 +31,9 @@
 }
 
 func (rcv *Food) UnPack() *FoodT {
-	if rcv == nil { return nil }
+	if rcv == nil {
+		return nil
+	}
 	t := &FoodT{}
 	rcv.UnPackTo(t)
 	return t
diff --git a/tests/proto_test.h b/tests/proto_test.h
index fd6b111..e6b8ed0 100644
--- a/tests/proto_test.h
+++ b/tests/proto_test.h
@@ -1,28 +1,42 @@
 #ifndef TESTS_PROTO_TEST_H
 #define TESTS_PROTO_TEST_H
 
-#include "flatbuffers/idl.h"
-
 #include <string>
 
+#include "flatbuffers/idl.h"
+
 namespace flatbuffers {
 namespace tests {
 
-void RunTest(const flatbuffers::IDLOptions &opts, const std::string &proto_path, const std::string &proto_file,
-        const std::string &golden_file, const std::string import_proto_file = {});
-void proto_test(const std::string &proto_path, const std::string &proto_file);
-void proto_test_union(const std::string &proto_path, const std::string &proto_file);
-void proto_test_union_suffix(const std::string &proto_path, const std::string &proto_file);
-void proto_test_include(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
-void proto_test_include_union(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
+void RunTest(const flatbuffers::IDLOptions& opts, const std::string& proto_path,
+             const std::string& proto_file, const std::string& golden_file,
+             const std::string import_proto_file = {});
+void proto_test(const std::string& proto_path, const std::string& proto_file);
+void proto_test_union(const std::string& proto_path,
+                      const std::string& proto_file);
+void proto_test_union_suffix(const std::string& proto_path,
+                             const std::string& proto_file);
+void proto_test_include(const std::string& proto_path,
+                        const std::string& proto_file,
+                        const std::string& import_proto_file);
+void proto_test_include_union(const std::string& proto_path,
+                              const std::string& proto_file,
+                              const std::string& import_proto_file);
 
-void proto_test_id(const std::string &proto_path, const std::string &proto_file);
-void proto_test_union_id(const std::string &proto_path, const std::string &proto_file);
-void proto_test_union_suffix_id(const std::string &proto_path, const std::string &proto_file);
-void proto_test_include_id(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
-void proto_test_include_union_id(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
+void proto_test_id(const std::string& proto_path,
+                   const std::string& proto_file);
+void proto_test_union_id(const std::string& proto_path,
+                         const std::string& proto_file);
+void proto_test_union_suffix_id(const std::string& proto_path,
+                                const std::string& proto_file);
+void proto_test_include_id(const std::string& proto_path,
+                           const std::string& proto_file,
+                           const std::string& import_proto_file);
+void proto_test_include_union_id(const std::string& proto_path,
+                                 const std::string& proto_file,
+                                 const std::string& import_proto_file);
 
-void ParseCorruptedProto(const std::string &proto_path);
+void ParseCorruptedProto(const std::string& proto_path);
 void ParseProtoTest(const std::string& tests_data_path);
 void ParseProtoBufAsciiTest();
 
diff --git a/tests/py_flexbuffers_test.py b/tests/py_flexbuffers_test.py
index fcd17fa..d899f55 100644
--- a/tests/py_flexbuffers_test.py
+++ b/tests/py_flexbuffers_test.py
@@ -32,7 +32,7 @@
     'bools': [True, False, True, False],
     'foo': 100.0,
     'mymap': {'foo': 'Fred'},
-    'vec': [-100, 'Fred', 4.0, b'M', False, 4.0]
+    'vec': [-100, 'Fred', 4.0, b'M', False, 4.0],
 }
 
 GOLD_FLEXBUFFER_FILE = 'gold_flexbuffer_example.bin'
@@ -74,11 +74,15 @@
 
 
 def int_bytes(value, byte_width):
-  return struct.pack('<%s' % {1: 'b', 2: 'h', 4: 'i', 8: 'q'}[byte_width], value)
+  return struct.pack(
+      '<%s' % {1: 'b', 2: 'h', 4: 'i', 8: 'q'}[byte_width], value
+  )
 
 
 def uint_bytes(value, byte_width):
-  return struct.pack('<%s' % {1: 'B', 2: 'H', 4: 'I', 8: 'Q'}[byte_width], value)
+  return struct.pack(
+      '<%s' % {1: 'B', 2: 'H', 4: 'I', 8: 'Q'}[byte_width], value
+  )
 
 
 def float_bytes(value, byte_width):
@@ -126,13 +130,24 @@
   return fbb.Finish()
 
 
-INT_MIN_MAX_VALUES = (min_value(Type.INT, 1), max_value(Type.INT, 1),
-                      min_value(Type.INT, 2), max_value(Type.INT, 2),
-                      min_value(Type.INT, 4), max_value(Type.INT, 4),
-                      min_value(Type.INT, 8), max_value(Type.INT, 8))
+INT_MIN_MAX_VALUES = (
+    min_value(Type.INT, 1),
+    max_value(Type.INT, 1),
+    min_value(Type.INT, 2),
+    max_value(Type.INT, 2),
+    min_value(Type.INT, 4),
+    max_value(Type.INT, 4),
+    min_value(Type.INT, 8),
+    max_value(Type.INT, 8),
+)
 
-UINT_MIN_MAX_VALUES = (0, max_value(Type.UINT, 1), max_value(Type.UINT, 2),
-                       max_value(Type.UINT, 4), max_value(Type.UINT, 8))
+UINT_MIN_MAX_VALUES = (
+    0,
+    max_value(Type.UINT, 1),
+    max_value(Type.UINT, 2),
+    max_value(Type.UINT, 4),
+    max_value(Type.UINT, 8),
+)
 
 
 class UtilTest(unittest.TestCase):
@@ -149,17 +164,26 @@
 
   def test_inline_types(self):
     self._test_type_predicate(
-        Type.IsInline, (Type.NULL, Type.INT, Type.UINT, Type.FLOAT, Type.BOOL))
+        Type.IsInline, (Type.NULL, Type.INT, Type.UINT, Type.FLOAT, Type.BOOL)
+    )
 
   def test_typed_vector(self):
     self._test_type_predicate(
         Type.IsTypedVector,
-        (Type.VECTOR_INT, Type.VECTOR_UINT, Type.VECTOR_FLOAT, Type.VECTOR_KEY,
-         Type.VECTOR_STRING_DEPRECATED, Type.VECTOR_BOOL))
+        (
+            Type.VECTOR_INT,
+            Type.VECTOR_UINT,
+            Type.VECTOR_FLOAT,
+            Type.VECTOR_KEY,
+            Type.VECTOR_STRING_DEPRECATED,
+            Type.VECTOR_BOOL,
+        ),
+    )
 
     self._test_type_predicate(
         Type.IsTypedVectorElementType,
-        (Type.INT, Type.UINT, Type.FLOAT, Type.KEY, Type.STRING, Type.BOOL))
+        (Type.INT, Type.UINT, Type.FLOAT, Type.KEY, Type.STRING, Type.BOOL),
+    )
 
     with self.assertRaises(ValueError):
       Type.ToTypedVectorElementType(Type.VECTOR)
@@ -169,7 +193,8 @@
     self.assertIs(Type.ToTypedVectorElementType(Type.VECTOR_KEY), Type.KEY)
     self.assertIs(
         Type.ToTypedVectorElementType(Type.VECTOR_STRING_DEPRECATED),
-        Type.STRING)
+        Type.STRING,
+    )
     self.assertIs(Type.ToTypedVectorElementType(Type.VECTOR_BOOL), Type.BOOL)
 
     with self.assertRaises(ValueError):
@@ -179,37 +204,57 @@
     self.assertIs(Type.ToTypedVector(Type.FLOAT), Type.VECTOR_FLOAT)
     self.assertIs(Type.ToTypedVector(Type.KEY), Type.VECTOR_KEY)
     self.assertIs(
-        Type.ToTypedVector(Type.STRING), Type.VECTOR_STRING_DEPRECATED)
+        Type.ToTypedVector(Type.STRING), Type.VECTOR_STRING_DEPRECATED
+    )
     self.assertIs(Type.ToTypedVector(Type.BOOL), Type.VECTOR_BOOL)
 
   def test_fixed_typed_vector(self):
     self._test_type_predicate(
         Type.IsFixedTypedVector,
-        (Type.VECTOR_INT2, Type.VECTOR_UINT2, Type.VECTOR_FLOAT2,
-         Type.VECTOR_INT3, Type.VECTOR_UINT3, Type.VECTOR_FLOAT3,
-         Type.VECTOR_INT4, Type.VECTOR_UINT4, Type.VECTOR_FLOAT4))
+        (
+            Type.VECTOR_INT2,
+            Type.VECTOR_UINT2,
+            Type.VECTOR_FLOAT2,
+            Type.VECTOR_INT3,
+            Type.VECTOR_UINT3,
+            Type.VECTOR_FLOAT3,
+            Type.VECTOR_INT4,
+            Type.VECTOR_UINT4,
+            Type.VECTOR_FLOAT4,
+        ),
+    )
 
-    self._test_type_predicate(Type.IsFixedTypedVectorElementType,
-                              (Type.INT, Type.UINT, Type.FLOAT))
+    self._test_type_predicate(
+        Type.IsFixedTypedVectorElementType, (Type.INT, Type.UINT, Type.FLOAT)
+    )
 
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT2), (Type.INT, 2))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT2), (Type.INT, 2)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT2), (Type.UINT, 2))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT2), (Type.UINT, 2)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT2), (Type.FLOAT, 2))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT2), (Type.FLOAT, 2)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT3), (Type.INT, 3))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT3), (Type.INT, 3)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT3), (Type.UINT, 3))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT3), (Type.UINT, 3)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT3), (Type.FLOAT, 3))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT3), (Type.FLOAT, 3)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT4), (Type.INT, 4))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_INT4), (Type.INT, 4)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT4), (Type.UINT, 4))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_UINT4), (Type.UINT, 4)
+    )
     self.assertEqual(
-        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT4), (Type.FLOAT, 4))
+        Type.ToFixedTypedVectorElementType(Type.VECTOR_FLOAT4), (Type.FLOAT, 4)
+    )
 
     # Invalid size
     for type_ in Type.INT, Type.UINT, Type.FLOAT:
@@ -283,9 +328,15 @@
           self.assertEqual(root.AsInt, 0)
           self.assertEqual(root.AsFloat, 0.0)
 
-          for prop in (type(root).AsKey, type(root).AsString, type(root).AsBlob,
-                       type(root).AsVector, type(root).AsTypedVector,
-                       type(root).AsFixedTypedVector, type(root).AsMap):
+          for prop in (
+              type(root).AsKey,
+              type(root).AsString,
+              type(root).AsBlob,
+              type(root).AsVector,
+              type(root).AsTypedVector,
+              type(root).AsFixedTypedVector,
+              type(root).AsMap,
+          ):
             with self.assertRaises(TypeError):
               prop.fget(root)
 
@@ -310,10 +361,15 @@
             self.assertEqual(root.AsInt, int(value))
             self.assertEqual(root.AsFloat, float(value))
 
-            for prop in (type(root).AsKey, type(root).AsString,
-                         type(root).AsBlob,
-                         type(root).AsVector, type(root).AsTypedVector,
-                         type(root).AsFixedTypedVector, type(root).AsMap):
+            for prop in (
+                type(root).AsKey,
+                type(root).AsString,
+                type(root).AsBlob,
+                type(root).AsVector,
+                type(root).AsTypedVector,
+                type(root).AsFixedTypedVector,
+                type(root).AsMap,
+            ):
               with self.assertRaises(TypeError):
                 prop.fget(root)
 
@@ -341,9 +397,15 @@
     self.assertEqual(root.AsBool, bool(value))
     self.assertEqual(root.AsFloat, float(value))
 
-    for prop in (type(root).AsKey, type(root).AsString, type(root).AsBlob,
-                 type(root).AsVector, type(root).AsTypedVector,
-                 type(root).AsFixedTypedVector, type(root).AsMap):
+    for prop in (
+        type(root).AsKey,
+        type(root).AsString,
+        type(root).AsBlob,
+        type(root).AsVector,
+        type(root).AsTypedVector,
+        type(root).AsFixedTypedVector,
+        type(root).AsMap,
+    ):
       with self.assertRaises(TypeError):
         prop.fget(root)
 
@@ -460,9 +522,15 @@
     self.assertTrue(root.IsFloat)
     self.assertAlmostEqual(root.AsFloat, value)
 
-    for prop in (type(root).AsKey, type(root).AsString, type(root).AsBlob,
-                 type(root).AsVector, type(root).AsTypedVector,
-                 type(root).AsFixedTypedVector, type(root).AsMap):
+    for prop in (
+        type(root).AsKey,
+        type(root).AsString,
+        type(root).AsBlob,
+        type(root).AsVector,
+        type(root).AsTypedVector,
+        type(root).AsFixedTypedVector,
+        type(root).AsMap,
+    ):
       with self.assertRaises(TypeError):
         prop.fget(root)
 
@@ -640,9 +708,11 @@
     self.assertEqual(root.AsInt, len(vector))
 
   def test_fixed_typed_vector_float(self):
-    for type_, vector in ((Type.VECTOR_FLOAT2, [-75.0, 34.89]),
-                          (Type.VECTOR_FLOAT3, [-75.0, 34.89, 12.0]),
-                          (Type.VECTOR_FLOAT4, [-75.0, 34.89, -1.0, 1.0])):
+    for type_, vector in (
+        (Type.VECTOR_FLOAT2, [-75.0, 34.89]),
+        (Type.VECTOR_FLOAT3, [-75.0, 34.89, 12.0]),
+        (Type.VECTOR_FLOAT4, [-75.0, 34.89, -1.0, 1.0]),
+    ):
       for bw in 1, 2, 4, 8:
         for ebw in 4, 8:
           with self.subTest(type=type_, vector=vector, bw=bw, ebw=ebw):
@@ -659,9 +729,11 @@
               self.assertAlmostEqual(a, b, places=2)
 
   def test_fixed_typed_vector_int(self):
-    for type_, vector in ((Type.VECTOR_INT2, [0, -13]), (Type.VECTOR_INT3,
-                                                         [127, 0, -13]),
-                          (Type.VECTOR_INT4, [127, 0, -13, 0])):
+    for type_, vector in (
+        (Type.VECTOR_INT2, [0, -13]),
+        (Type.VECTOR_INT3, [127, 0, -13]),
+        (Type.VECTOR_INT4, [127, 0, -13, 0]),
+    ):
       for bw in 1, 2, 4, 8:
         for ebw in 1, 2, 4, 8:
           with self.subTest(type=type_, vector=vector, bw=bw, ebw=ebw):
@@ -677,9 +749,11 @@
             self._check_fixed_typed_vector(data, vector, Type.INT)
 
   def test_fixed_typed_vector_uint(self):
-    for type_, vector in ((Type.VECTOR_UINT2, [0, 13]),
-                          (Type.VECTOR_UINT3, [127, 0, 13]), (Type.VECTOR_UINT4,
-                                                              [127, 0, 13, 0])):
+    for type_, vector in (
+        (Type.VECTOR_UINT2, [0, 13]),
+        (Type.VECTOR_UINT3, [127, 0, 13]),
+        (Type.VECTOR_UINT4, [127, 0, 13, 0]),
+    ):
       for bw in 1, 2, 4, 8:
         for ebw in 1, 2, 4, 8:
           with self.subTest(type=type_, vector=vector, bw=bw, ebw=ebw):
@@ -709,9 +783,14 @@
     self.assertEqual(root.AsInt, len(vector))
 
   def test_empty_typed_vector(self):
-    for type_ in (Type.VECTOR_BOOL, Type.VECTOR_INT, Type.VECTOR_UINT,
-                  Type.VECTOR_FLOAT, Type.VECTOR_KEY,
-                  Type.VECTOR_STRING_DEPRECATED):
+    for type_ in (
+        Type.VECTOR_BOOL,
+        Type.VECTOR_INT,
+        Type.VECTOR_UINT,
+        Type.VECTOR_FLOAT,
+        Type.VECTOR_KEY,
+        Type.VECTOR_STRING_DEPRECATED,
+    ):
       for bw in 1, 2, 4, 8:
         for ebw in 1, 2, 4, 8:
           with self.subTest(type=type_, bw=bw, ebw=ebw):
@@ -721,7 +800,7 @@
                 # Root
                 *uint_bytes(0, bw),
                 packed_type(type_, ebw),
-                bw
+                bw,
             ])
 
             element_type = Type.ToTypedVectorElementType(type_)
@@ -1018,8 +1097,9 @@
                 packed_type(Type.INT, vbw),
                 packed_type(Type.INT, vbw),
                 # Root
-                *uint_bytes(vbw * len(value) + len(value),
-                            bw),  # offset to values
+                *uint_bytes(
+                    vbw * len(value) + len(value), bw
+                ),  # offset to values
                 packed_type(Type.MAP, vbw),
                 bw,
             ])
@@ -1196,7 +1276,8 @@
     data = fbb.Finish()
 
     self.assertEqual(
-        flexbuffers.Loads(data), ['begin', 42, [0, 1, 2, 3, 4], 'end'])
+        flexbuffers.Loads(data), ['begin', 42, [0, 1, 2, 3, 4], 'end']
+    )
 
   def test_big_vector(self):
     n = 10 * 1000
@@ -1282,8 +1363,14 @@
       fbb.FixedTypedVectorFromElements(elements, element_type)
       return fbb.Finish()
 
-    for elements in ((-2, 2), (1, 2, 3), (100, -100, 200, -200), (4.0, 7.0),
-                     (0.0, 1.0, 8.0), (9.0, 7.0, 1.0, 5.5)):
+    for elements in (
+        (-2, 2),
+        (1, 2, 3),
+        (100, -100, 200, -200),
+        (4.0, 7.0),
+        (0.0, 1.0, 8.0),
+        (9.0, 7.0, 1.0, 5.5),
+    ):
       with self.subTest(elements=elements):
         data = encode_fixed_typed_vector(elements)
         self.assertSequenceEqual(flexbuffers.Loads(data), elements)
@@ -1340,11 +1427,8 @@
     data = fbb.Finish()
 
     self.assertEqual(
-        flexbuffers.Loads(data), {
-            'v': [45],
-            'tv': [-7],
-            'ftv': [-2.0, 1.0]
-        })
+        flexbuffers.Loads(data), {'v': [45], 'tv': [-7], 'ftv': [-2.0, 1.0]}
+    )
 
     keys = get_keys(data)
     self.assertEqual(sorted(keys), keys)
@@ -1368,7 +1452,8 @@
     data = fbb.Finish()
 
     self.assertEqual(
-        flexbuffers.Loads(data), {
+        flexbuffers.Loads(data),
+        {
             'n': None,
             'b': False,
             'i': -27,
@@ -1381,8 +1466,9 @@
             'if': 0.0,
             'v': [2, 1, 0.0],
             'tv': [2, 1, 0],
-            'ftv': [2.0, -6.0]
-        })
+            'ftv': [2.0, -6.0],
+        },
+    )
 
     keys = get_keys(data)
     self.assertEqual(sorted(keys), keys)
@@ -1390,19 +1476,9 @@
   def test_map_python(self):
     maps = [
         {},
-        {
-            'key': 'value'
-        },
-        {
-            'x': None,
-            'y': 3400,
-            'z': -7040
-        },
-        {
-            'zzz': 100,
-            'aaa': 5.0,
-            'ccc': ['Test', 32, False, None, True]
-        },
+        {'key': 'value'},
+        {'x': None, 'y': 3400, 'z': -7040},
+        {'zzz': 100, 'aaa': 5.0, 'ccc': ['Test', 32, False, None, True]},
         {
             'name': ['John', 'Smith'],
             'valid': True,
diff --git a/tests/py_test.py b/tests/py_test.py
index 4749fe4..9898fd8 100644
--- a/tests/py_test.py
+++ b/tests/py_test.py
@@ -15,6 +15,7 @@
 
 import os.path
 import sys
+
 PY_VERSION = sys.version_info[:2]
 
 import ctypes
@@ -86,7 +87,7 @@
 
 
 def assertRaises(test_case, fn, exception_class):
-  """ Backwards-compatible assertion for exceptions raised. """
+  """Backwards-compatible assertion for exceptions raised."""
 
   exc = None
   try:
@@ -98,24 +99,23 @@
 
 
 def byte_swap_array(np_version, arr):
-    """
-    Performs byte swapping on a NumPy array, adapting to different NumPy versions.
+  """Performs byte swapping on a NumPy array, adapting to different NumPy versions.
 
-    Args:
-        np_version: Version of NumPu (np.__version__)
-        arr: The input NumPy array.
+  Args:
+      np_version: Version of NumPu (np.__version__)
+      arr: The input NumPy array.
 
-    Returns:
-        A new NumPy array with byte order swapped.
-    """
-    numpy_version_tuple = tuple(map(int, np_version.split('.')[:3]))
-    min_version_for_new_method_tuple = (2, 0, 0)
+  Returns:
+      A new NumPy array with byte order swapped.
+  """
+  numpy_version_tuple = tuple(map(int, np_version.split('.')[:3]))
+  min_version_for_new_method_tuple = (2, 0, 0)
 
-    if numpy_version_tuple >= min_version_for_new_method_tuple:
-        # 'S' indicates swap byte order.
-        return arr.byteswap().view(arr.dtype.newbyteorder('S'))
-    else:
-        return arr.byteswap().newbyteorder()
+  if numpy_version_tuple >= min_version_for_new_method_tuple:
+    # 'S' indicates swap byte order.
+    return arr.byteswap().view(arr.dtype.newbyteorder('S'))
+  else:
+    return arr.byteswap().newbyteorder()
 
 
 class TestWireFormat(unittest.TestCase):
@@ -127,12 +127,14 @@
     for sizePrefix in [True, False]:
       for file_identifier in [None, b'MONS']:
         gen_buf, gen_off = make_monster_from_generated_code(
-            sizePrefix=sizePrefix, file_identifier=file_identifier)
+            sizePrefix=sizePrefix, file_identifier=file_identifier
+        )
         CheckReadBuffer(
             gen_buf,
             gen_off,
             sizePrefix=sizePrefix,
-            file_identifier=file_identifier)
+            file_identifier=file_identifier,
+        )
 
     # Verify that the canonical flatbuffer file is readable by the
     # generated Python code. Note that context managers are not part of
@@ -149,13 +151,13 @@
 
 
 class TestObjectBasedAPI(unittest.TestCase):
-  """ Tests the generated object based API."""
+  """Tests the generated object based API."""
 
   def test_consistency_with_repeated_pack_and_unpack(self):
-    """ Checks the serialization and deserialization between a buffer and
+    """Checks the serialization and deserialization between a buffer and
 
-        its python object. It tests in the same way as the C++ object API test,
-        ObjectFlatBuffersTest in test.cpp.
+    its python object. It tests in the same way as the C++ object API test,
+    ObjectFlatBuffersTest in test.cpp.
     """
 
     buf, off = make_monster_from_generated_code()
@@ -187,10 +189,10 @@
       CheckReadBuffer(b2.Bytes, b2.Head(), sizePrefix)
 
   def test_default_values_with_pack_and_unpack(self):
-    """ Serializes and deserializes between a buffer with default values (no
+    """Serializes and deserializes between a buffer with default values (no
 
-        specific values are filled when the buffer is created) and its python
-        object.
+    specific values are filled when the buffer is created) and its python
+    object.
     """
     # Creates a flatbuffer with default values.
     b1 = flatbuffers.Builder(0)
@@ -302,9 +304,10 @@
     self.assertTrue(monster2.VectorOfEnumsIsNone())
 
   def test_optional_scalars_with_pack_and_unpack(self):
-    """ Serializes and deserializes between a buffer with optional values (no
-        specific values are filled when the buffer is created) and its python
-        object.
+    """Serializes and deserializes between a buffer with optional values (no
+
+    specific values are filled when the buffer is created) and its python
+    object.
     """
     # Creates a flatbuffer with optional values.
     b1 = flatbuffers.Builder(0)
@@ -313,13 +316,17 @@
     b1.Finish(gen_opt)
 
     # Converts the flatbuffer into the object class.
-    opts1 = optional_scalars.ScalarStuff.ScalarStuff.GetRootAs(b1.Bytes, b1.Head())
+    opts1 = optional_scalars.ScalarStuff.ScalarStuff.GetRootAs(
+        b1.Bytes, b1.Head()
+    )
     optsT1 = optional_scalars.ScalarStuff.ScalarStuffT.InitFromObj(opts1)
 
     # Packs the object class into another flatbuffer.
     b2 = flatbuffers.Builder(0)
     b2.Finish(optsT1.Pack(b2))
-    opts2 = optional_scalars.ScalarStuff.ScalarStuff.GetRootAs(b2.Bytes, b2.Head())
+    opts2 = optional_scalars.ScalarStuff.ScalarStuff.GetRootAs(
+        b2.Bytes, b2.Head()
+    )
     optsT2 = optional_scalars.ScalarStuff.ScalarStuffT.InitFromObj(opts2)
     # Checks the default values.
     self.assertTrue(opts2.JustI8() == 0)
@@ -330,14 +337,13 @@
     self.assertTrue(optsT2.defaultU64 == 42)
 
 
-
 class TestAllMutableCodePathsOfExampleSchema(unittest.TestCase):
-  """ Tests the object API generated for monster_test.fbs for mutation
+  """Tests the object API generated for monster_test.fbs for mutation
 
-        purposes. In each test, the default values will be changed through the
-        object API. We'll then pack the object class into the buf class and read
-        the updated values out from it to validate if the values are mutated as
-        expected.
+  purposes. In each test, the default values will be changed through the
+  object API. We'll then pack the object class into the buf class and read
+  the updated values out from it to validate if the values are mutated as
+  expected.
   """
 
   def setUp(self, *args, **kwargs):
@@ -349,9 +355,9 @@
     self.monsterT = self._create_and_load_object_class(b)
 
   def _pack_and_load_buf_class(self, monsterT):
-    """ Packs the object class into a flatbuffer and loads it into a buf
+    """Packs the object class into a flatbuffer and loads it into a buf
 
-        class.
+    class.
     """
     b = flatbuffers.Builder(0)
     b.Finish(monsterT.Pack(b))
@@ -359,9 +365,9 @@
     return monster
 
   def _create_and_load_object_class(self, b):
-    """ Finishs the creation of a monster flatbuffer and loads it into an
+    """Finishs the creation of a monster flatbuffer and loads it into an
 
-        object class.
+    object class.
     """
     gen_mon = _MONSTER.MonsterEnd(b)
     b.Finish(gen_mon)
@@ -586,13 +592,13 @@
 
   def test_mutate_vectorofdoubles(self):
     self.monsterT.vectorOfDoubles = []
-    self.monsterT.vectorOfDoubles.append(-1.7976931348623157e+308)
+    self.monsterT.vectorOfDoubles.append(-1.7976931348623157e308)
     self.monsterT.vectorOfDoubles.append(0)
-    self.monsterT.vectorOfDoubles.append(1.7976931348623157e+308)
+    self.monsterT.vectorOfDoubles.append(1.7976931348623157e308)
     monster = self._pack_and_load_buf_class(self.monsterT)
-    self.assertEqual(monster.VectorOfDoubles(0), -1.7976931348623157e+308)
+    self.assertEqual(monster.VectorOfDoubles(0), -1.7976931348623157e308)
     self.assertEqual(monster.VectorOfDoubles(1), 0)
-    self.assertEqual(monster.VectorOfDoubles(2), 1.7976931348623157e+308)
+    self.assertEqual(monster.VectorOfDoubles(2), 1.7976931348623157e308)
 
   def test_empty_vectorofdoubles(self):
     self.monsterT.vectorOfDoubles = []
@@ -600,12 +606,16 @@
     self.assertFalse(monster.VectorOfDoublesIsNone())
 
   def test_mutate_parentnamespacetest(self):
-    self.monsterT.parentNamespaceTest = _IN_PARENT_NAMESPACE.InParentNamespaceT(
+    self.monsterT.parentNamespaceTest = (
+        _IN_PARENT_NAMESPACE.InParentNamespaceT()
     )
     monster = self._pack_and_load_buf_class(self.monsterT)
     self.assertTrue(
-        isinstance(monster.ParentNamespaceTest(),
-                   _IN_PARENT_NAMESPACE.InParentNamespace))
+        isinstance(
+            monster.ParentNamespaceTest(),
+            _IN_PARENT_NAMESPACE.InParentNamespace,
+        )
+    )
 
   def test_mutate_vectorofEnums(self):
     self.monsterT.vectorOfEnums = []
@@ -624,30 +634,35 @@
 
 
 def CheckReadBuffer(buf, offset, sizePrefix=False, file_identifier=None):
-  """ CheckReadBuffer checks that the given buffer is evaluated correctly
+  """CheckReadBuffer checks that the given buffer is evaluated correctly
 
-        as the example Monster.
+  as the example Monster.
   """
 
   def asserter(stmt):
-    """ An assertion helper that is separated from TestCase classes. """
+    """An assertion helper that is separated from TestCase classes."""
     if not stmt:
       raise AssertionError('CheckReadBuffer case failed')
 
   if file_identifier:
     # test prior to removal of size_prefix
     asserter(
-        util.GetBufferIdentifier(buf, offset, size_prefixed=sizePrefix) ==
-        file_identifier)
+        util.GetBufferIdentifier(buf, offset, size_prefixed=sizePrefix)
+        == file_identifier
+    )
     asserter(
         util.BufferHasIdentifier(
             buf,
             offset,
             file_identifier=file_identifier,
-            size_prefixed=sizePrefix))
+            size_prefixed=sizePrefix,
+        )
+    )
     asserter(
         _MONSTER.Monster.MonsterBufferHasIdentifier(
-            buf, offset, size_prefixed=sizePrefix))
+            buf, offset, size_prefixed=sizePrefix
+        )
+    )
   if sizePrefix:
     size = util.GetSizePrefix(buf, offset)
     asserter(size == len(buf[offset:]) - 4)
@@ -707,12 +722,16 @@
   asserter(invsum == 10)
 
   for i in range(5):
-    asserter(monster.VectorOfLongs(i) == 10**(i * 2))
+    asserter(monster.VectorOfLongs(i) == 10 ** (i * 2))
 
   asserter(not monster.VectorOfDoublesIsNone())
-  asserter(([-1.7976931348623157e+308, 0, 1.7976931348623157e+308] == [
-      monster.VectorOfDoubles(i) for i in range(monster.VectorOfDoublesLength())
-  ]))
+  asserter((
+      [-1.7976931348623157e308, 0, 1.7976931348623157e308]
+      == [
+          monster.VectorOfDoubles(i)
+          for i in range(monster.VectorOfDoublesLength())
+      ]
+  ))
 
   try:
     # if numpy exists, then we should be able to get the
@@ -725,7 +744,7 @@
     VectorOfLongs = monster.VectorOfLongsAsNumpy()
     asserter(VectorOfLongs.dtype == np.dtype('<i8'))
     for i in range(5):
-      asserter(VectorOfLongs[i] == 10**(i * 2))
+      asserter(VectorOfLongs[i] == 10 ** (i * 2))
 
     VectorOfDoubles = monster.VectorOfDoublesAsNumpy()
     asserter(VectorOfDoubles.dtype == np.dtype('<f8'))
@@ -773,18 +792,20 @@
 
 
 class TestFuzz(unittest.TestCase):
-  """ Low level stress/fuzz test: serialize/deserialize a variety of
+  """Low level stress/fuzz test: serialize/deserialize a variety of
 
-        different kinds of data in different combinations
+  different kinds of data in different combinations
   """
 
   binary_type = compat.binary_types[0]  # this will always exist
   ofInt32Bytes = binary_type([0x83, 0x33, 0x33, 0x33])
   ofInt64Bytes = binary_type([0x84, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44])
-  overflowingInt32Val = flatbuffers.encode.Get(flatbuffers.packer.int32,
-                                               ofInt32Bytes, 0)
-  overflowingInt64Val = flatbuffers.encode.Get(flatbuffers.packer.int64,
-                                               ofInt64Bytes, 0)
+  overflowingInt32Val = flatbuffers.encode.Get(
+      flatbuffers.packer.int32, ofInt32Bytes, 0
+  )
+  overflowingInt64Val = flatbuffers.encode.Get(
+      flatbuffers.packer.int64, ofInt64Bytes, 0
+  )
 
   # Values we're testing against: chosen to ensure no bits get chopped
   # off anywhere, and also be different from eachother.
@@ -864,8 +885,9 @@
     # so this is deterministic.
     for i in compat_range(fuzzObjects):
 
-      table = flatbuffers.table.Table(builder.Bytes,
-                                      len(builder.Bytes) - objects[i])
+      table = flatbuffers.table.Table(
+          builder.Bytes, len(builder.Bytes) - objects[i]
+      )
 
       for j in compat_range(fuzzFields):
         field_count = flatbuffers.builder.VtableMetadataFields + j
@@ -873,47 +895,52 @@
         choice = int(l.Next()) % testValuesMax
 
         if choice == 0:
-          check(table, 'bool', self.boolVal,
-                table.GetSlot(f, False, N.BoolFlags))
+          check(
+              table, 'bool', self.boolVal, table.GetSlot(f, False, N.BoolFlags)
+          )
         elif choice == 1:
           check(table, '<i1', self.int8Val, table.GetSlot(f, 0, N.Int8Flags))
         elif choice == 2:
-          check(table, '<u1', self.uint8Val,
-                table.GetSlot(f, 0, N.Uint8Flags))
+          check(table, '<u1', self.uint8Val, table.GetSlot(f, 0, N.Uint8Flags))
         elif choice == 3:
-          check(table, '<i2', self.int16Val,
-                table.GetSlot(f, 0, N.Int16Flags))
+          check(table, '<i2', self.int16Val, table.GetSlot(f, 0, N.Int16Flags))
         elif choice == 4:
-          check(table, '<u2', self.uint16Val,
-                table.GetSlot(f, 0, N.Uint16Flags))
+          check(
+              table, '<u2', self.uint16Val, table.GetSlot(f, 0, N.Uint16Flags)
+          )
         elif choice == 5:
-          check(table, '<i4', self.int32Val,
-                table.GetSlot(f, 0, N.Int32Flags))
+          check(table, '<i4', self.int32Val, table.GetSlot(f, 0, N.Int32Flags))
         elif choice == 6:
-          check(table, '<u4', self.uint32Val,
-                table.GetSlot(f, 0, N.Uint32Flags))
+          check(
+              table, '<u4', self.uint32Val, table.GetSlot(f, 0, N.Uint32Flags)
+          )
         elif choice == 7:
-          check(table, '<i8', self.int64Val,
-                table.GetSlot(f, 0, N.Int64Flags))
+          check(table, '<i8', self.int64Val, table.GetSlot(f, 0, N.Int64Flags))
         elif choice == 8:
-          check(table, '<u8', self.uint64Val,
-                table.GetSlot(f, 0, N.Uint64Flags))
+          check(
+              table, '<u8', self.uint64Val, table.GetSlot(f, 0, N.Uint64Flags)
+          )
         elif choice == 9:
-          check(table, '<f4', self.float32Val,
-                table.GetSlot(f, 0, N.Float32Flags))
+          check(
+              table, '<f4', self.float32Val, table.GetSlot(f, 0, N.Float32Flags)
+          )
         elif choice == 10:
-          check(table, '<f8', self.float64Val,
-                table.GetSlot(f, 0, N.Float64Flags))
+          check(
+              table, '<f8', self.float64Val, table.GetSlot(f, 0, N.Float64Flags)
+          )
         else:
           raise RuntimeError('unreachable')
 
     # If enough checks were made, verify that all scalar types were used:
-    self.assertEqual(testValuesMax, len(stats),
-                     'fuzzing failed to test all scalar types: %s' % stats)
+    self.assertEqual(
+        testValuesMax,
+        len(stats),
+        'fuzzing failed to test all scalar types: %s' % stats,
+    )
 
 
 class TestByteLayout(unittest.TestCase):
-  """ TestByteLayout checks the bytes of a Builder in various scenarios. """
+  """TestByteLayout checks the bytes of a Builder in various scenarios."""
 
   def assertBuilderEquals(self, builder, want_chars_or_ints):
 
@@ -924,7 +951,7 @@
 
     want_ints = list(map(integerize, want_chars_or_ints))
     want = bytearray(want_ints)
-    got = builder.Bytes[builder.Head():]  # use the buffer directly
+    got = builder.Bytes[builder.Head() :]  # use the buffer directly
     self.assertEqual(want, got)
 
   def test_numbers(self):
@@ -943,23 +970,43 @@
     self.assertBuilderEquals(b, [0xEE, 0xFE, 0x22, 0x82, 0, 255, 129, 1])
     b.PrependInt32(-53687092)
     self.assertBuilderEquals(
-        b, [204, 204, 204, 252, 0xEE, 0xFE, 0x22, 0x82, 0, 255, 129, 1])
+        b, [204, 204, 204, 252, 0xEE, 0xFE, 0x22, 0x82, 0, 255, 129, 1]
+    )
     b.PrependUint32(0x98765432)
-    self.assertBuilderEquals(b, [
-        0x32, 0x54, 0x76, 0x98, 204, 204, 204, 252, 0xEE, 0xFE, 0x22, 0x82, 0,
-        255, 129, 1
-    ])
+    self.assertBuilderEquals(
+        b,
+        [
+            0x32,
+            0x54,
+            0x76,
+            0x98,
+            204,
+            204,
+            204,
+            252,
+            0xEE,
+            0xFE,
+            0x22,
+            0x82,
+            0,
+            255,
+            129,
+            1,
+        ],
+    )
 
   def test_numbers64(self):
     b = flatbuffers.Builder(0)
     b.PrependUint64(0x1122334455667788)
-    self.assertBuilderEquals(b,
-                             [0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11])
+    self.assertBuilderEquals(
+        b, [0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11]
+    )
 
     b = flatbuffers.Builder(0)
     b.PrependInt64(0x1122334455667788)
-    self.assertBuilderEquals(b,
-                             [0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11])
+    self.assertBuilderEquals(
+        b, [0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11]
+    )
 
   def test_1xbyte_vector(self):
     b = flatbuffers.Builder(0)
@@ -1004,31 +1051,59 @@
 
   def test_create_ascii_shared_string(self):
     b = flatbuffers.Builder(0)
-    b.CreateSharedString(u'foo', encoding='ascii')
-    b.CreateSharedString(u'foo', encoding='ascii')
+    b.CreateSharedString('foo', encoding='ascii')
+    b.CreateSharedString('foo', encoding='ascii')
 
     # 0-terminated, no pad:
     self.assertBuilderEquals(b, [3, 0, 0, 0, 'f', 'o', 'o', 0])
-    b.CreateSharedString(u'moop', encoding='ascii')
-    b.CreateSharedString(u'moop', encoding='ascii')
+    b.CreateSharedString('moop', encoding='ascii')
+    b.CreateSharedString('moop', encoding='ascii')
     # 0-terminated, 3-byte pad:
-    self.assertBuilderEquals(b, [
-        4, 0, 0, 0, 'm', 'o', 'o', 'p', 0, 0, 0, 0, 3, 0, 0, 0, 'f', 'o', 'o', 0
-    ])
+    self.assertBuilderEquals(
+        b,
+        [
+            4,
+            0,
+            0,
+            0,
+            'm',
+            'o',
+            'o',
+            'p',
+            0,
+            0,
+            0,
+            0,
+            3,
+            0,
+            0,
+            0,
+            'f',
+            'o',
+            'o',
+            0,
+        ],
+    )
 
   def test_create_utf8_shared_string(self):
     b = flatbuffers.Builder(0)
-    b.CreateSharedString(u'Цлїςσδε')
-    b.CreateSharedString(u'Цлїςσδε')
-    self.assertBuilderEquals(b, '\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \
-        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00')
+    b.CreateSharedString('Цлїςσδε')
+    b.CreateSharedString('Цлїςσδε')
+    self.assertBuilderEquals(
+        b,
+        '\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97'
+        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00',
+    )
 
-    b.CreateSharedString(u'フムアムカモケモ')
-    b.CreateSharedString(u'フムアムカモケモ')
-    self.assertBuilderEquals(b, '\x18\x00\x00\x00\xef\xbe\x8c\xef\xbe\x91' \
-        '\xef\xbd\xb1\xef\xbe\x91\xef\xbd\xb6\xef\xbe\x93\xef\xbd\xb9\xef' \
-        '\xbe\x93\x00\x00\x00\x00\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \
-        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00')
+    b.CreateSharedString('フムアムカモケモ')
+    b.CreateSharedString('フムアムカモケモ')
+    self.assertBuilderEquals(
+        b,
+        '\x18\x00\x00\x00\xef\xbe\x8c\xef\xbe\x91'
+        '\xef\xbd\xb1\xef\xbe\x91\xef\xbd\xb6\xef\xbe\x93\xef\xbd\xb9\xef'
+        '\xbe\x93\x00\x00\x00\x00\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97'
+        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00',
+    )
 
   def test_create_arbitrary_shared_string(self):
     b = flatbuffers.Builder(0)
@@ -1042,31 +1117,60 @@
     b.CreateSharedString(s2)
     # 0-terminated, 3-byte pad:
     self.assertBuilderEquals(
-        b, [4, 0, 0, 0, 4, 5, 6, 7, 0, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0])
+        b, [4, 0, 0, 0, 4, 5, 6, 7, 0, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0]
+    )
 
   def test_create_ascii_string(self):
     b = flatbuffers.Builder(0)
-    b.CreateString(u'foo', encoding='ascii')
+    b.CreateString('foo', encoding='ascii')
 
     # 0-terminated, no pad:
     self.assertBuilderEquals(b, [3, 0, 0, 0, 'f', 'o', 'o', 0])
-    b.CreateString(u'moop', encoding='ascii')
+    b.CreateString('moop', encoding='ascii')
     # 0-terminated, 3-byte pad:
-    self.assertBuilderEquals(b, [
-        4, 0, 0, 0, 'm', 'o', 'o', 'p', 0, 0, 0, 0, 3, 0, 0, 0, 'f', 'o', 'o', 0
-    ])
+    self.assertBuilderEquals(
+        b,
+        [
+            4,
+            0,
+            0,
+            0,
+            'm',
+            'o',
+            'o',
+            'p',
+            0,
+            0,
+            0,
+            0,
+            3,
+            0,
+            0,
+            0,
+            'f',
+            'o',
+            'o',
+            0,
+        ],
+    )
 
   def test_create_utf8_string(self):
     b = flatbuffers.Builder(0)
-    b.CreateString(u'Цлїςσδε')
-    self.assertBuilderEquals(b, '\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \
-        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00')
+    b.CreateString('Цлїςσδε')
+    self.assertBuilderEquals(
+        b,
+        '\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97'
+        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00',
+    )
 
-    b.CreateString(u'フムアムカモケモ')
-    self.assertBuilderEquals(b, '\x18\x00\x00\x00\xef\xbe\x8c\xef\xbe\x91' \
-        '\xef\xbd\xb1\xef\xbe\x91\xef\xbd\xb6\xef\xbe\x93\xef\xbd\xb9\xef' \
-        '\xbe\x93\x00\x00\x00\x00\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \
-        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00')
+    b.CreateString('フムアムカモケモ')
+    self.assertBuilderEquals(
+        b,
+        '\x18\x00\x00\x00\xef\xbe\x8c\xef\xbe\x91'
+        '\xef\xbd\xb1\xef\xbe\x91\xef\xbd\xb6\xef\xbe\x93\xef\xbd\xb9\xef'
+        '\xbe\x93\x00\x00\x00\x00\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97'
+        '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00',
+    )
 
   def test_create_arbitrary_string(self):
     b = flatbuffers.Builder(0)
@@ -1078,7 +1182,8 @@
     b.CreateString(s2)  # Default encoding is utf-8.
     # 0-terminated, 3-byte pad:
     self.assertBuilderEquals(
-        b, [4, 0, 0, 0, 4, 5, 6, 7, 0, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0])
+        b, [4, 0, 0, 0, 4, 5, 6, 7, 0, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0]
+    )
 
   def test_create_byte_vector(self):
     b = flatbuffers.Builder(0)
@@ -1092,27 +1197,33 @@
     self.assertBuilderEquals(b, [3, 0, 0, 0, 1, 2, 3, 0])
 
   def test_comparison_of_np_arrays(self):
-    """
-    MonsterT dvec and fvec are np.array types which can not be compared with == directly
+    """MonsterT dvec and fvec are np.array types which can not be compared with == directly
+
     This tests ensures that the __eq__ is generated correctly
     """
     try:
       # if numpy exists, then we should be able to get the
       # vector as a numpy array
       import numpy as np
+
       vec1 = np.array([1, 2], dtype=np.float32)
       vec2 = np.array([3, 4], dtype=np.float32)
 
-      monsterA = MyGame.MonsterExtra.MonsterExtraT(d0=1, d1=1, d2=1, d3=1, f0=1, f1=1, f2=1, f3=1, dvec=vec1, fvec=vec2)
+      monsterA = MyGame.MonsterExtra.MonsterExtraT(
+          d0=1, d1=1, d2=1, d3=1, f0=1, f1=1, f2=1, f3=1, dvec=vec1, fvec=vec2
+      )
       assert monsterA == monsterA
 
-      monsterB = MyGame.MonsterExtra.MonsterExtraT(d0=2, d1=1, d2=1, d3=1, f0=1, f1=1, f2=1, f3=1, dvec=vec1, fvec=vec2)
+      monsterB = MyGame.MonsterExtra.MonsterExtraT(
+          d0=2, d1=1, d2=1, d3=1, f0=1, f1=1, f2=1, f3=1, dvec=vec1, fvec=vec2
+      )
       assert monsterA != monsterB
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_int8(self):
     try:
@@ -1134,8 +1245,9 @@
               1,
               2,
               256 - 3,
-              0  # vector value + padding
-          ])
+              0,  # vector value + padding
+          ],
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1151,13 +1263,15 @@
               1,
               2,
               256 - 3,
-              0  # vector value + padding
-          ])
+              0,  # vector value + padding
+          ],
+      )
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_uint16(self):
     try:
@@ -1183,8 +1297,9 @@
               312 - 256,
               1,  # 312
               0,
-              0  # padding
-          ])
+              0,  # padding
+          ],
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1204,13 +1319,15 @@
               312 - 256,
               1,  # 312
               0,
-              0  # padding
-          ])
+              0,  # padding
+          ],
+      )
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_int64(self):
     try:
@@ -1252,8 +1369,9 @@
               255,
               255,
               255,
-              255  # -12
-          ])
+              255,  # -12
+          ],
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1289,14 +1407,16 @@
               255,
               255,
               255,
-              255  # -12
-          ])
+              255,  # -12
+          ],
+      )
 
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_float32(self):
     try:
@@ -1326,8 +1446,9 @@
               0,
               0,
               64,
-              193  # -12
-          ])
+              193,  # -12
+          ],
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1351,14 +1472,16 @@
               0,
               0,
               64,
-              193  # -12
-          ])
+              193,  # -12
+          ],
+      )
 
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_float64(self):
     try:
@@ -1400,8 +1523,9 @@
               0,
               0,
               40,
-              192  # -12
-          ])
+              192,  # -12
+          ],
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1437,14 +1561,16 @@
               0,
               0,
               40,
-              192  # -12
-          ])
+              192,  # -12
+          ],
+      )
 
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_bool(self):
     try:
@@ -1458,16 +1584,8 @@
       b.CreateNumpyVector(x)
       self.assertBuilderEquals(
           b,
-          [
-              3,
-              0,
-              0,
-              0,  # vector length
-              1,
-              0,
-              1,
-              0  # vector values + padding
-          ])
+          [3, 0, 0, 0, 1, 0, 1, 0],  # vector length  # vector values + padding
+      )
 
       # Reverse endian:
       b = flatbuffers.Builder(0)
@@ -1475,22 +1593,15 @@
       b.CreateNumpyVector(x_other_endian)
       self.assertBuilderEquals(
           b,
-          [
-              3,
-              0,
-              0,
-              0,  # vector length
-              1,
-              0,
-              1,
-              0  # vector values + padding
-          ])
+          [3, 0, 0, 0, 1, 0, 1, 0],  # vector length  # vector values + padding
+      )
 
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_reject_strings(self):
     try:
@@ -1506,8 +1617,9 @@
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_create_numpy_vector_reject_object(self):
     try:
@@ -1523,8 +1635,9 @@
     except ImportError:
       b = flatbuffers.Builder(0)
       x = 0
-      assertRaises(self, lambda: b.CreateNumpyVector(x),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self, lambda: b.CreateNumpyVector(x), NumpyRequiredForThisFeature
+      )
 
   def test_empty_vtable(self):
     b = flatbuffers.Builder(0)
@@ -1557,7 +1670,8 @@
             0,
             0,  # padded to 4 bytes
             1,  # bool value
-        ])
+        ],
+    )
 
   def test_vtable_with_one_default_bool(self):
     b = flatbuffers.Builder(0)
@@ -1578,7 +1692,8 @@
             0,
             0,
             0,  # offset for start of vtable (int32)
-        ])
+        ],
+    )
 
   def test_vtable_with_one_int16(self):
     b = flatbuffers.Builder(0)
@@ -1602,7 +1717,8 @@
             0,  # padding to 4 bytes
             0x9A,
             0x78,
-        ])
+        ],
+    )
 
   def test_vtable_with_two_int16(self):
     b = flatbuffers.Builder(0)
@@ -1629,7 +1745,8 @@
             0x78,  # value 1
             0x56,
             0x34,  # value 0
-        ])
+        ],
+    )
 
   def test_vtable_with_int16_and_bool(self):
     b = flatbuffers.Builder(0)
@@ -1656,7 +1773,8 @@
             1,  # value 1
             0x56,
             0x34,  # value 0
-        ])
+        ],
+    )
 
   def test_vtable_with_empty_vector(self):
     b = flatbuffers.Builder(0)
@@ -1686,7 +1804,8 @@
             0,
             0,
             0,  # length of vector (not in struct)
-        ])
+        ],
+    )
 
   def test_vtable_with_empty_vector_of_byte_and_some_scalars(self):
     b = flatbuffers.Builder(0)
@@ -1723,7 +1842,8 @@
             0,
             0,
             0,  # length of vector (not in struct)
-        ])
+        ],
+    )
 
   def test_vtable_with_1_int16_and_2vector_of_int16(self):
     b = flatbuffers.Builder(0)
@@ -1766,7 +1886,8 @@
             0x56,  # vector value 1
             0x34,
             0x12,  # vector value 0
-        ])
+        ],
+    )
 
   def test_vtable_with_1_struct_of_1_int8__1_int16__1_int32(self):
     b = flatbuffers.Builder(0)
@@ -1805,7 +1926,8 @@
             0,
             0,  # padding
             55,  # value 0
-        ])
+        ],
+    )
 
   def test_vtable_with_1_vector_of_2_struct_of_2_int8(self):
     b = flatbuffers.Builder(0)
@@ -1843,7 +1965,8 @@
             55,  # vector value 1,0
             44,  # vector value 0,1
             33,  # vector value 0,0
-        ])
+        ],
+    )
 
   def test_table_with_some_elements(self):
     b = flatbuffers.Builder(0)
@@ -1876,7 +1999,8 @@
             0,  # value 1
             0,  # padding
             33,  # value 0
-        ])
+        ],
+    )
 
   def test__one_unfinished_table_and_one_finished_table(self):
     b = flatbuffers.Builder(0)
@@ -1940,7 +2064,8 @@
             0,  # padding
             44,  # value 1
             33,  # value 0
-        ])
+        ],
+    )
 
   def test_a_bunch_of_bools(self):
     b = flatbuffers.Builder(0)
@@ -1995,7 +2120,8 @@
             1,  # value 2
             1,  # value 1
             1,  # value 0
-        ])
+        ],
+    )
 
   def test_three_bools(self):
     b = flatbuffers.Builder(0)
@@ -2033,7 +2159,8 @@
             1,  # value 2
             1,  # value 1
             1,  # value 0
-        ])
+        ],
+    )
 
   def test_some_floats(self):
     b = flatbuffers.Builder(0)
@@ -2058,11 +2185,14 @@
             0,
             128,
             63,  # value 0
-        ])
+        ],
+    )
 
 
-def make_monster_from_generated_code(b=None, sizePrefix=False, file_identifier=None):
-  """ Use generated code to build the example Monster. """
+def make_monster_from_generated_code(
+    b=None, sizePrefix=False, file_identifier=None
+):
+  """Use generated code to build the example Monster."""
   if b is None:
     b = flatbuffers.Builder(0)
   string = b.CreateString('MyMonster')
@@ -2101,9 +2231,9 @@
   VectorOfLongs = b.EndVector()
 
   _MONSTER.MonsterStartVectorOfDoublesVector(b, 3)
-  b.PrependFloat64(1.7976931348623157e+308)
+  b.PrependFloat64(1.7976931348623157e308)
   b.PrependFloat64(0)
-  b.PrependFloat64(-1.7976931348623157e+308)
+  b.PrependFloat64(-1.7976931348623157e308)
   VectorOfDoubles = b.EndVector()
 
   _MONSTER.MonsterStart(b)
@@ -2133,10 +2263,20 @@
 class TestBuilderForceDefaults(unittest.TestCase):
   """Verify that the builder adds default values when forced."""
 
-  test_flags = [N.BoolFlags(), N.Uint8Flags(), N.Uint16Flags(), \
-                N.Uint32Flags(), N.Uint64Flags(), N.Int8Flags(), \
-                N.Int16Flags(), N.Int32Flags(), N.Int64Flags(), \
-                N.Float32Flags(), N.Float64Flags(), N.UOffsetTFlags()]
+  test_flags = [
+      N.BoolFlags(),
+      N.Uint8Flags(),
+      N.Uint16Flags(),
+      N.Uint32Flags(),
+      N.Uint64Flags(),
+      N.Int8Flags(),
+      N.Int16Flags(),
+      N.Int32Flags(),
+      N.Int64Flags(),
+      N.Float32Flags(),
+      N.Float64Flags(),
+      N.UOffsetTFlags(),
+  ]
 
   def test_default_force_defaults(self):
     for flag in self.test_flags:
@@ -2383,8 +2523,11 @@
 
       self.assertEqual([0, 2, 4], mon2.TestnestedflatbufferAsNumpy().tolist())
     except ImportError:
-      assertRaises(self, lambda: mon2.TestnestedflatbufferAsNumpy(),
-                   NumpyRequiredForThisFeature)
+      assertRaises(
+          self,
+          lambda: mon2.TestnestedflatbufferAsNumpy(),
+          NumpyRequiredForThisFeature,
+      )
 
   def test_nested_monster_testnestedflatbuffer(self):
     b = flatbuffers.Builder(0)
@@ -2400,7 +2543,8 @@
 
     # write the nested FB bytes
     sub_buf = _MONSTER.MonsterMakeTestnestedflatbufferVectorFromBytes(
-        b, nestedB.Output())
+        b, nestedB.Output()
+    )
 
     # make the parent monster and include the bytes of the nested monster
     _MONSTER.MonsterStart(b)
@@ -2497,8 +2641,11 @@
     # Inspect the resulting data.
     monster = _MONSTER.Monster.GetRootAs(b.Bytes, b.Head())
     self.assertTrue(
-        isinstance(monster.ParentNamespaceTest(),
-                   _IN_PARENT_NAMESPACE.InParentNamespace))
+        isinstance(
+            monster.ParentNamespaceTest(),
+            _IN_PARENT_NAMESPACE.InParentNamespace,
+        )
+    )
 
   def test_getrootas_for_nonroot_table(self):
     b = flatbuffers.Builder(0)
@@ -2541,7 +2688,7 @@
 
 
 class TestVtableDeduplication(unittest.TestCase):
-  """ TestVtableDeduplication verifies that vtables are deduplicated. """
+  """TestVtableDeduplication verifies that vtables are deduplicated."""
 
   def test_vtable_deduplication(self):
     b = flatbuffers.Builder(0)
@@ -2567,7 +2714,7 @@
     b.PrependInt16Slot(3, 99, 0)
     obj2 = b.EndObject()
 
-    got = b.Bytes[b.Head():]
+    got = b.Bytes[b.Head() :]
 
     want = bytearray([
         240,
@@ -2646,50 +2793,62 @@
   def test_object_is_nested_error(self):
     b = flatbuffers.Builder(0)
     b.StartObject(0)
-    assertRaises(self, lambda: b.StartObject(0),
-                 flatbuffers.builder.IsNestedError)
+    assertRaises(
+        self, lambda: b.StartObject(0), flatbuffers.builder.IsNestedError
+    )
 
   def test_object_is_not_nested_error(self):
     b = flatbuffers.Builder(0)
-    assertRaises(self, lambda: b.EndObject(),
-                 flatbuffers.builder.IsNotNestedError)
+    assertRaises(
+        self, lambda: b.EndObject(), flatbuffers.builder.IsNotNestedError
+    )
 
   def test_struct_is_not_inline_error(self):
     b = flatbuffers.Builder(0)
     b.StartObject(0)
-    assertRaises(self, lambda: b.PrependStructSlot(0, 1, 0),
-                 flatbuffers.builder.StructIsNotInlineError)
+    assertRaises(
+        self,
+        lambda: b.PrependStructSlot(0, 1, 0),
+        flatbuffers.builder.StructIsNotInlineError,
+    )
 
   def test_unreachable_error(self):
     b = flatbuffers.Builder(0)
-    assertRaises(self, lambda: b.PrependUOffsetTRelative(1),
-                 flatbuffers.builder.OffsetArithmeticError)
+    assertRaises(
+        self,
+        lambda: b.PrependUOffsetTRelative(1),
+        flatbuffers.builder.OffsetArithmeticError,
+    )
 
   def test_create_shared_string_is_nested_error(self):
     b = flatbuffers.Builder(0)
     b.StartObject(0)
     s = 'test1'
-    assertRaises(self, lambda: b.CreateSharedString(s),
-                 flatbuffers.builder.IsNestedError)
+    assertRaises(
+        self, lambda: b.CreateSharedString(s), flatbuffers.builder.IsNestedError
+    )
 
   def test_create_string_is_nested_error(self):
     b = flatbuffers.Builder(0)
     b.StartObject(0)
     s = 'test1'
-    assertRaises(self, lambda: b.CreateString(s),
-                 flatbuffers.builder.IsNestedError)
+    assertRaises(
+        self, lambda: b.CreateString(s), flatbuffers.builder.IsNestedError
+    )
 
   def test_create_byte_vector_is_nested_error(self):
     b = flatbuffers.Builder(0)
     b.StartObject(0)
     s = b'test1'
-    assertRaises(self, lambda: b.CreateByteVector(s),
-                 flatbuffers.builder.IsNestedError)
+    assertRaises(
+        self, lambda: b.CreateByteVector(s), flatbuffers.builder.IsNestedError
+    )
 
   def test_finished_bytes_error(self):
     b = flatbuffers.Builder(0)
-    assertRaises(self, lambda: b.Output(),
-                 flatbuffers.builder.BuilderNotFinishedError)
+    assertRaises(
+        self, lambda: b.Output(), flatbuffers.builder.BuilderNotFinishedError
+    )
 
 
 class TestFixedLengthArrays(unittest.TestCase):
@@ -2701,18 +2860,27 @@
     b = range(0, 15)
     c = 1
     d_a = [[1, 2], [3, 4]]
-    d_b = [MyGame.Example.TestEnum.TestEnum.B, \
-            MyGame.Example.TestEnum.TestEnum.C]
-    d_c = [[MyGame.Example.TestEnum.TestEnum.A, \
-            MyGame.Example.TestEnum.TestEnum.B], \
-            [MyGame.Example.TestEnum.TestEnum.C, \
-             MyGame.Example.TestEnum.TestEnum.B]]
+    d_b = [
+        MyGame.Example.TestEnum.TestEnum.B,
+        MyGame.Example.TestEnum.TestEnum.C,
+    ]
+    d_c = [
+        [
+            MyGame.Example.TestEnum.TestEnum.A,
+            MyGame.Example.TestEnum.TestEnum.B,
+        ],
+        [
+            MyGame.Example.TestEnum.TestEnum.C,
+            MyGame.Example.TestEnum.TestEnum.B,
+        ],
+    ]
     d_d = [[-1, 1], [-2, 2]]
     e = 2
     f = [-1, 1]
 
-    arrayOffset = MyGame.Example.ArrayStruct.CreateArrayStruct(builder, \
-        a, b, c, d_a, d_b, d_c, d_d, e, f)
+    arrayOffset = MyGame.Example.ArrayStruct.CreateArrayStruct(
+        builder, a, b, c, d_a, d_b, d_c, d_d, e, f
+    )
 
     # Create a table with the ArrayStruct.
     MyGame.Example.ArrayTable.Start(builder)
@@ -2728,21 +2896,28 @@
     # Verify structure.
     nested = MyGame.Example.NestedStruct.NestedStruct()
     self.assertEqual(table.A().A(), 0.5)
-    self.assertEqual(table.A().B(), \
-        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])
+    self.assertEqual(
+        table.A().B(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
+    )
     self.assertEqual(table.A().C(), 1)
     self.assertEqual(table.A().D(0).A(), [1, 2])
     self.assertEqual(table.A().D(1).A(), [3, 4])
-    self.assertEqual(table.A().D(0).B(), \
-        MyGame.Example.TestEnum.TestEnum.B)
-    self.assertEqual(table.A().D(1).B(), \
-        MyGame.Example.TestEnum.TestEnum.C)
-    self.assertEqual(table.A().D(0).C(), \
-        [MyGame.Example.TestEnum.TestEnum.A, \
-         MyGame.Example.TestEnum.TestEnum.B])
-    self.assertEqual(table.A().D(1).C(), \
-        [MyGame.Example.TestEnum.TestEnum.C, \
-         MyGame.Example.TestEnum.TestEnum.B])
+    self.assertEqual(table.A().D(0).B(), MyGame.Example.TestEnum.TestEnum.B)
+    self.assertEqual(table.A().D(1).B(), MyGame.Example.TestEnum.TestEnum.C)
+    self.assertEqual(
+        table.A().D(0).C(),
+        [
+            MyGame.Example.TestEnum.TestEnum.A,
+            MyGame.Example.TestEnum.TestEnum.B,
+        ],
+    )
+    self.assertEqual(
+        table.A().D(1).C(),
+        [
+            MyGame.Example.TestEnum.TestEnum.C,
+            MyGame.Example.TestEnum.TestEnum.B,
+        ],
+    )
     self.assertEqual(table.A().D(0).D(), [-1, 1])
     self.assertEqual(table.A().D(1).D(), [-2, 2])
     self.assertEqual(table.A().E(), 2)
@@ -2752,11 +2927,12 @@
     self.assertEqual(table.A().D(1).D(0), -2)
     self.assertEqual(table.A().D(1).D(1), 2)
 
+
 class TestNestedUnionTables(unittest.TestCase):
 
   def test_nested_union_tables(self):
     nestUnion = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT()
-    nestUnion.name = "testUnion1"
+    nestUnion.name = 'testUnion1'
     nestUnion.id = 1
     nestUnion.data = MyGame.Example.NestedUnion.Vec3.Vec3T()
     nestUnion.dataType = MyGame.Example.NestedUnion.Any.Any.Vec3
@@ -2772,8 +2948,16 @@
     b = flatbuffers.Builder(0)
     b.Finish(nestUnion.Pack(b))
 
-    nestUnionDecode = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTest.GetRootAs(b.Bytes, b.Head())
-    nestUnionDecodeT = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromObj(nestUnionDecode)
+    nestUnionDecode = (
+        MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTest.GetRootAs(
+            b.Bytes, b.Head()
+        )
+    )
+    nestUnionDecodeT = (
+        MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromObj(
+            nestUnionDecode
+        )
+    )
     self.assertEqual(nestUnionDecodeT.name, nestUnion.name)
     self.assertEqual(nestUnionDecodeT.id, nestUnion.id)
     self.assertEqual(nestUnionDecodeT.dataType, nestUnion.dataType)
@@ -2785,7 +2969,9 @@
     self.assertEqual(nestUnionDecodeT.data.test3.a, nestUnion.data.test3.a)
     self.assertEqual(nestUnionDecodeT.data.test3.b, nestUnion.data.test3.b)
 
-    nestUnionDecodeTFromBuf = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(b.Bytes, b.Head())
+    nestUnionDecodeTFromBuf = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(
+        b.Bytes, b.Head()
+    )
     self.assertEqual(nestUnionDecodeTFromBuf.name, nestUnion.name)
     self.assertEqual(nestUnionDecodeTFromBuf.id, nestUnion.id)
     self.assertEqual(nestUnionDecodeTFromBuf.dataType, nestUnion.dataType)
@@ -2794,11 +2980,16 @@
     self.assertEqual(nestUnionDecodeTFromBuf.data.z, nestUnion.data.z)
     self.assertEqual(nestUnionDecodeTFromBuf.data.test1, nestUnion.data.test1)
     self.assertEqual(nestUnionDecodeTFromBuf.data.test2, nestUnion.data.test2)
-    self.assertEqual(nestUnionDecodeTFromBuf.data.test3.a, nestUnion.data.test3.a)
-    self.assertEqual(nestUnionDecodeTFromBuf.data.test3.b, nestUnion.data.test3.b)
+    self.assertEqual(
+        nestUnionDecodeTFromBuf.data.test3.a, nestUnion.data.test3.a
+    )
+    self.assertEqual(
+        nestUnionDecodeTFromBuf.data.test3.b, nestUnion.data.test3.b
+    )
 
-
-    nestUnionDecodeTFromBuf2 = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(b.Output())
+    nestUnionDecodeTFromBuf2 = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(
+        b.Output()
+    )
     self.assertEqual(nestUnionDecodeTFromBuf2.name, nestUnion.name)
     self.assertEqual(nestUnionDecodeTFromBuf2.id, nestUnion.id)
     self.assertEqual(nestUnionDecodeTFromBuf2.dataType, nestUnion.dataType)
@@ -2807,26 +2998,30 @@
     self.assertEqual(nestUnionDecodeTFromBuf2.data.z, nestUnion.data.z)
     self.assertEqual(nestUnionDecodeTFromBuf2.data.test1, nestUnion.data.test1)
     self.assertEqual(nestUnionDecodeTFromBuf2.data.test2, nestUnion.data.test2)
-    self.assertEqual(nestUnionDecodeTFromBuf2.data.test3.a, nestUnion.data.test3.a)
-    self.assertEqual(nestUnionDecodeTFromBuf2.data.test3.b, nestUnion.data.test3.b)
+    self.assertEqual(
+        nestUnionDecodeTFromBuf2.data.test3.a, nestUnion.data.test3.a
+    )
+    self.assertEqual(
+        nestUnionDecodeTFromBuf2.data.test3.b, nestUnion.data.test3.b
+    )
 
 
 class TestBuilderClear(unittest.TestCase):
 
   def test_consistency(self):
-    """ Checks if clear resets the state of the builder. """
+    """Checks if clear resets the state of the builder."""
     b = flatbuffers.Builder(0)
 
     # Add some data to the buffer
     off1 = b.CreateString('a' * 1024)
-    want = b.Bytes[b.Head():]
+    want = b.Bytes[b.Head() :]
 
     # Reset the builder
     b.Clear()
 
     # Readd the same data into the buffer
     off2 = b.CreateString('a' * 1024)
-    got = b.Bytes[b.Head():]
+    got = b.Bytes[b.Head() :]
 
     # Expect to get the same data into the buffer at the same offset
     self.assertEqual(off1, off2)
@@ -2848,6 +3043,7 @@
         init_buf = buf
         init_off = off
 
+
 def CheckAgainstGoldDataGo():
   try:
     gen_buf, gen_off = make_monster_from_generated_code()
@@ -2870,7 +3066,8 @@
     return False
 
   print(
-      'Can read Go-generated test data, and Python generates bytewise identical data.'
+      'Can read Go-generated test data, and Python generates bytewise identical'
+      ' data.'
   )
   return True
 
@@ -2896,11 +3093,11 @@
 
 
 class LCG(object):
-  """ Include simple random number generator to ensure results will be the
+  """Include simple random number generator to ensure results will be the
 
-        same cross platform.
-        http://en.wikipedia.org/wiki/Park%E2%80%93Miller_random_number_generator
-        """
+  same cross platform.
+  http://en.wikipedia.org/wiki/Park%E2%80%93Miller_random_number_generator
+  """
 
   __slots__ = ['n']
 
@@ -2918,13 +3115,13 @@
 
 
 def BenchmarkVtableDeduplication(count):
-  """
-    BenchmarkVtableDeduplication measures the speed of vtable deduplication
-    by creating `prePop` vtables, then populating `count` objects with a
-    different single vtable.
+  """BenchmarkVtableDeduplication measures the speed of vtable deduplication
 
-    When count is large (as in long benchmarks), memory usage may be high.
-    """
+  by creating `prePop` vtables, then populating `count` objects with a
+  different single vtable.
+
+  When count is large (as in long benchmarks), memory usage may be high.
+  """
 
   for prePop in (1, 10, 100, 1000):
     builder = flatbuffers.Builder(0)
@@ -2955,15 +3152,17 @@
 
     duration = timeit.timeit(stmt=f, number=count)
     rate = float(count) / duration
-    print(('vtable deduplication rate (n=%d, vtables=%d): %.2f sec' %
-           (prePop, len(builder.vtables), rate)))
+    print((
+        'vtable deduplication rate (n=%d, vtables=%d): %.2f sec'
+        % (prePop, len(builder.vtables), rate)
+    ))
 
 
 def BenchmarkCheckReadBuffer(count, buf, off):
+  """BenchmarkCheckReadBuffer measures the speed of flatbuffer reading
+
+  by re-using the CheckReadBuffer function with the gold data.
   """
-    BenchmarkCheckReadBuffer measures the speed of flatbuffer reading
-    by re-using the CheckReadBuffer function with the gold data.
-    """
 
   def f():
     CheckReadBuffer(buf, off)
@@ -2973,36 +3172,43 @@
   data = float(len(buf) * count) / float(1024 * 1024)
   data_rate = data / float(duration)
 
-  print(('traversed %d %d-byte flatbuffers in %.2fsec: %.2f/sec, %.2fMB/sec') %
-        (count, len(buf), duration, rate, data_rate))
+  print(
+      'traversed %d %d-byte flatbuffers in %.2fsec: %.2f/sec, %.2fMB/sec'
+      % (count, len(buf), duration, rate, data_rate)
+  )
 
 
 def BenchmarkMakeMonsterFromGeneratedCode(count, length):
+  """BenchmarkMakeMonsterFromGeneratedCode measures the speed of flatbuffer
+
+  creation by re-using the make_monster_from_generated_code function for
+  generating gold data examples.
   """
-    BenchmarkMakeMonsterFromGeneratedCode measures the speed of flatbuffer
-    creation by re-using the make_monster_from_generated_code function for
-    generating gold data examples.
-    """
 
   duration = timeit.timeit(stmt=make_monster_from_generated_code, number=count)
   rate = float(count) / duration
   data = float(length * count) / float(1024 * 1024)
   data_rate = data / float(duration)
 
-  print(('built %d %d-byte flatbuffers in %.2fsec: %.2f/sec, %.2fMB/sec' % \
-         (count, length, duration, rate, data_rate)))
+  print((
+      'built %d %d-byte flatbuffers in %.2fsec: %.2f/sec, %.2fMB/sec'
+      % (count, length, duration, rate, data_rate)
+  ))
 
 
 def BenchmarkBuilderClear(count, length):
   b = flatbuffers.Builder(length)
-  duration = timeit.timeit(stmt=lambda: make_monster_from_generated_code(b),
-                           number=count)
+  duration = timeit.timeit(
+      stmt=lambda: make_monster_from_generated_code(b), number=count
+  )
   rate = float(count) / duration
   data = float(length * count) / float(1024 * 1024)
   data_rate = data / float(duration)
 
-  print(('built %d %d-byte flatbuffers (reused buffer) in %.2fsec:'
-         ' %.2f/sec, %.2fMB/sec' % (count, length, duration, rate, data_rate)))
+  print((
+      'built %d %d-byte flatbuffers (reused buffer) in %.2fsec:'
+      ' %.2f/sec, %.2fMB/sec' % (count, length, duration, rate, data_rate)
+  ))
 
 
 def backward_compatible_run_tests(**kwargs):
@@ -3033,14 +3239,22 @@
 def main():
   import os
   import sys
+
   if not len(sys.argv) == 6:
-    sys.stderr.write('Usage: %s <benchmark vtable count> '
-                     '<benchmark read count> <benchmark build count> '
-                     '<benchmark clear builder> <is_onefile>\n' % sys.argv[0])
-    sys.stderr.write('       Provide COMPARE_GENERATED_TO_GO=1   to check'
-                     'for bytewise comparison to Go data.\n')
-    sys.stderr.write('       Provide COMPARE_GENERATED_TO_JAVA=1 to check'
-                     'for bytewise comparison to Java data.\n')
+    sys.stderr.write(
+        'Usage: %s <benchmark vtable count> '
+        '<benchmark read count> <benchmark build count> '
+        '<benchmark clear builder> <is_onefile>\n'
+        % sys.argv[0]
+    )
+    sys.stderr.write(
+        '       Provide COMPARE_GENERATED_TO_GO=1   to check'
+        'for bytewise comparison to Go data.\n'
+    )
+    sys.stderr.write(
+        '       Provide COMPARE_GENERATED_TO_JAVA=1 to check'
+        'for bytewise comparison to Java data.\n'
+    )
     sys.stderr.flush()
     sys.exit(1)
 
@@ -3051,6 +3265,7 @@
   # show whether numpy is present, as it changes the test logic:
   try:
     import numpy
+
     print('numpy available')
   except ImportError:
     print('numpy not available')
@@ -3084,5 +3299,6 @@
     buf, off = make_monster_from_generated_code()
     BenchmarkBuilderClear(bench_build, len(buf))
 
+
 if __name__ == '__main__':
   main()
diff --git a/tests/reflection_test.h b/tests/reflection_test.h
index 0908719..fa6f470 100644
--- a/tests/reflection_test.h
+++ b/tests/reflection_test.h
@@ -2,14 +2,16 @@
 #define TESTS_REFLECTION_TEST_H
 
 #include <stdint.h>
+
 #include <string>
 
 namespace flatbuffers {
 namespace tests {
 
-void ReflectionTest(const std::string& tests_data_path, uint8_t *flatbuf, size_t length);
+void ReflectionTest(const std::string& tests_data_path, uint8_t* flatbuf,
+                    size_t length);
 void MiniReflectFixedLengthArrayTest();
-void MiniReflectFlatBuffersTest(uint8_t *flatbuf);
+void MiniReflectFlatBuffersTest(uint8_t* flatbuf);
 
 }  // namespace tests
 }  // namespace flatbuffers
diff --git a/tests/rust_reflection_test/src/lib.rs b/tests/rust_reflection_test/src/lib.rs
index f403e0d..6e92ecb 100644
--- a/tests/rust_reflection_test/src/lib.rs
+++ b/tests/rust_reflection_test/src/lib.rs
@@ -109,10 +109,7 @@
 #[test]
 fn test_schema_correct_table_field() {
     let schema_buffer = load_file_as_buffer("../monster_test.bfbs");
-    let root_table = root_as_schema(schema_buffer.as_slice())
-        .unwrap()
-        .root_table()
-        .unwrap();
+    let root_table = root_as_schema(schema_buffer.as_slice()).unwrap().root_table().unwrap();
 
     let fields = root_table.fields();
 
@@ -132,18 +129,14 @@
         .unwrap()
         .attributes()
         .unwrap()
-        .lookup_by_key("priority", |key_value, key| key_value
-            .key_compare_with_value(key))
+        .lookup_by_key("priority", |key_value, key| key_value.key_compare_with_value(key))
         .is_some());
 }
 
 #[test]
 fn test_schema_correct_table_field_nullability() {
     let schema_buffer = load_file_as_buffer("../monster_test.bfbs");
-    let root_table = root_as_schema(schema_buffer.as_slice())
-        .unwrap()
-        .root_table()
-        .unwrap();
+    let root_table = root_as_schema(schema_buffer.as_slice()).unwrap().root_table().unwrap();
 
     let fields = root_table.fields();
 
@@ -375,9 +368,7 @@
         .get(table_field.type_().index() as usize)
         .fields();
     let nested_table_field = nested_table_fields
-        .lookup_by_key("id", |field: &Field<'_>, key| {
-            field.key_compare_with_value(key)
-        })
+        .lookup_by_key("id", |field: &Field<'_>, key| field.key_compare_with_value(key))
         .unwrap();
     let nested_table_id = unsafe { get_field_string(&nested_table, &nested_table_field) };
     assert!(nested_table_id.is_ok());
@@ -406,11 +397,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -434,11 +421,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -591,11 +574,7 @@
     let i16_field = get_schema_field(&schema, "hp");
 
     let value = unsafe {
-        get_any_field_string(
-            &root_table,
-            &i16_field,
-            &root_as_schema(schema.as_slice()).unwrap(),
-        )
+        get_any_field_string(&root_table, &i16_field, &root_as_schema(schema.as_slice()).unwrap())
     };
 
     assert_eq!(value, String::from("32767"));
@@ -609,11 +588,7 @@
     let f32_field = get_schema_field(&schema, "testf");
 
     let mut value = unsafe {
-        get_any_field_string(
-            &root_table,
-            &f32_field,
-            &root_as_schema(schema.as_slice()).unwrap(),
-        )
+        get_any_field_string(&root_table, &f32_field, &root_as_schema(schema.as_slice()).unwrap())
     };
 
     value.truncate(4);
@@ -644,11 +619,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -680,11 +651,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -706,11 +673,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -732,11 +695,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -761,11 +720,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -797,11 +752,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -823,11 +774,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -849,11 +796,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -878,11 +821,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -919,11 +858,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -950,11 +885,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -981,11 +912,7 @@
     let root_table = unsafe { get_any_root(&buffer) };
     let schema = load_file_as_buffer("../monster_test.bfbs");
     let struct_field = get_schema_field(&schema, "pos");
-    let struct_value = unsafe {
-        get_field_struct(&root_table, &struct_field)
-            .unwrap()
-            .unwrap()
-    };
+    let struct_value = unsafe { get_field_struct(&root_table, &struct_field).unwrap().unwrap() };
     let struct_schema = root_as_schema(schema.as_slice())
         .unwrap()
         .objects()
@@ -1371,10 +1298,7 @@
     let updated_table = unsafe { get_any_root(&buffer) };
     let updated_value = unsafe { get_field_string(&updated_table, &string_field) };
     assert!(updated_value.is_ok());
-    assert_eq!(
-        updated_value.unwrap(),
-        Some("AStringWithSlightlyBiggerSize")
-    );
+    assert_eq!(updated_value.unwrap(), Some("AStringWithSlightlyBiggerSize"));
 }
 
 #[test]
@@ -1441,10 +1365,7 @@
     let buffer = create_test_buffer();
     let schema_buffer = load_file_as_buffer("../monster_test.bfbs");
     let schema = root_as_schema(schema_buffer.as_slice()).unwrap();
-    let verify_options = VerifierOptions {
-        max_depth: 1,
-        ..Default::default()
-    };
+    let verify_options = VerifierOptions { max_depth: 1, ..Default::default() };
 
     let safe_buffer = SafeBuffer::new_with_options(&buffer, &schema, &verify_options);
 
@@ -1457,10 +1378,7 @@
     let buffer = create_test_buffer();
     let schema_buffer = load_file_as_buffer("../monster_test.bfbs");
     let schema = root_as_schema(schema_buffer.as_slice()).unwrap();
-    let verify_options = VerifierOptions {
-        max_tables: 1,
-        ..Default::default()
-    };
+    let verify_options = VerifierOptions { max_tables: 1, ..Default::default() };
 
     let safe_buffer = SafeBuffer::new_with_options(&buffer, &schema, &verify_options);
 
@@ -1473,10 +1391,7 @@
     let buffer = create_test_buffer();
     let schema_buffer = load_file_as_buffer("../monster_test.bfbs");
     let schema = root_as_schema(schema_buffer.as_slice()).unwrap();
-    let verify_options = VerifierOptions {
-        max_apparent_size: 1 << 6,
-        ..Default::default()
-    };
+    let verify_options = VerifierOptions { max_apparent_size: 1 << 6, ..Default::default() };
 
     let safe_buffer = SafeBuffer::new_with_options(&buffer, &schema, &verify_options);
 
@@ -2073,9 +1988,7 @@
     let schema = root_as_schema(schema_buffer.as_slice()).unwrap();
     let root_table = schema.root_table().unwrap();
     let fields = root_table.fields();
-    fields
-        .lookup_by_key(field_name, |field, key| field.key_compare_with_value(key))
-        .unwrap()
+    fields.lookup_by_key(field_name, |field, key| field.key_compare_with_value(key)).unwrap()
 }
 
 fn create_test_buffer() -> Vec<u8> {
@@ -2105,18 +2018,12 @@
             test_type: my_game::example::Any::Monster,
             testempty: Some(my_game::example::Stat::create(
                 &mut builder,
-                &my_game::example::StatArgs {
-                    id: Some(fred_name),
-                    ..Default::default()
-                },
+                &my_game::example::StatArgs { id: Some(fred_name), ..Default::default() },
             )),
             test: Some(
                 my_game::example::Monster::create(
                     &mut builder,
-                    &my_game::example::MonsterArgs {
-                        name: Some(fred_name),
-                        ..Default::default()
-                    },
+                    &my_game::example::MonsterArgs { name: Some(fred_name), ..Default::default() },
                 )
                 .as_union_value(),
             ),
diff --git a/tests/rust_serialize_test/src/main.rs b/tests/rust_serialize_test/src/main.rs
index e6bdce6..239e2a4 100644
--- a/tests/rust_serialize_test/src/main.rs
+++ b/tests/rust_serialize_test/src/main.rs
@@ -29,10 +29,7 @@
             test: Some(
                 my_game::example::Monster::create(
                     builder,
-                    &my_game::example::MonsterArgs {
-                        name: Some(fred_name),
-                        ..Default::default()
-                    },
+                    &my_game::example::MonsterArgs { name: Some(fred_name), ..Default::default() },
                 )
                 .as_union_value(),
             ),
diff --git a/tests/rust_usage_test/benches/benchmarks.rs b/tests/rust_usage_test/benches/benchmarks.rs
index 51fae75..8d08436 100644
--- a/tests/rust_usage_test/benches/benchmarks.rs
+++ b/tests/rust_usage_test/benches/benchmarks.rs
@@ -27,7 +27,4 @@
 mod monster_test_generated;
 pub use monster_test_generated::my_game;
 
-benchmark_main!(
-    flatbuffers_benchmarks::benches,
-    flexbuffers_benchmarks::benches
-);
+benchmark_main!(flatbuffers_benchmarks::benches, flexbuffers_benchmarks::benches);
diff --git a/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs b/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs
index 3ab3b56..a52d26d 100644
--- a/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs
+++ b/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs
@@ -63,25 +63,15 @@
     let t2_name = builder.create_string("Wilma");
     let t0 = my_game::example::Monster::create(
         builder,
-        &my_game::example::MonsterArgs {
-            hp: 1000,
-            name: Some(t0_name),
-            ..Default::default()
-        },
+        &my_game::example::MonsterArgs { hp: 1000, name: Some(t0_name), ..Default::default() },
     );
     let t1 = my_game::example::Monster::create(
         builder,
-        &my_game::example::MonsterArgs {
-            name: Some(t1_name),
-            ..Default::default()
-        },
+        &my_game::example::MonsterArgs { name: Some(t1_name), ..Default::default() },
     );
     let t2 = my_game::example::Monster::create(
         builder,
-        &my_game::example::MonsterArgs {
-            name: Some(t2_name),
-            ..Default::default()
-        },
+        &my_game::example::MonsterArgs { name: Some(t2_name), ..Default::default() },
     );
     let mon = {
         let name = builder.create_string("MyMonster");
@@ -108,10 +98,7 @@
             test: Some(
                 my_game::example::Monster::create(
                     builder,
-                    &my_game::example::MonsterArgs {
-                        name: Some(fred_name),
-                        ..Default::default()
-                    },
+                    &my_game::example::MonsterArgs { name: Some(fred_name), ..Default::default() },
                 )
                 .as_union_value(),
             ),
diff --git a/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs b/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs
index 8a77c0e..bcc9dd3 100644
--- a/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs
+++ b/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs
@@ -3,7 +3,6 @@
 // global variable).
 use std::alloc::{GlobalAlloc, Layout, System};
 
-
 static mut N_ALLOCS: usize = 0;
 
 struct TrackingAllocator;
@@ -55,7 +54,7 @@
             builder.create_string("check"),
             builder.create_string("the"),
             builder.create_string("create_vector_of_strings"),
-            builder.create_string("function")
+            builder.create_string("function"),
         ];
         let _ = builder.create_vector(&strings);
 
@@ -83,12 +82,9 @@
             test: Some(
                 my_game::example::Monster::create(
                     builder,
-                    &my_game::example::MonsterArgs {
-                        name: Some(fred_name),
-                        ..Default::default()
-                    },
+                    &my_game::example::MonsterArgs { name: Some(fred_name), ..Default::default() },
                 )
-                    .as_union_value(),
+                .as_union_value(),
             ),
             inventory: Some(builder.create_vector(&[0u8, 1, 2, 3, 4])),
             test4: Some(builder.create_vector(&[
@@ -103,7 +99,7 @@
     my_game::example::finish_monster_buffer(builder, mon);
 }
 
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 fn main() {
     // test the allocation tracking:
     {
diff --git a/tests/rust_usage_test/bin/flexbuffers_alloc_check.rs b/tests/rust_usage_test/bin/flexbuffers_alloc_check.rs
index a921af7..009bf42 100644
--- a/tests/rust_usage_test/bin/flexbuffers_alloc_check.rs
+++ b/tests/rust_usage_test/bin/flexbuffers_alloc_check.rs
@@ -107,7 +107,7 @@
 
 // This is in a separate binary than tests because taking over the global allocator is not
 // hermetic and not thread safe.
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 fn main() {
     let start_up = current_allocs();
 
@@ -138,7 +138,7 @@
 }
 
 #[test]
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 fn no_extra_allocations() {
     main()
 }
diff --git a/tests/rust_usage_test/bin/monster_example.rs b/tests/rust_usage_test/bin/monster_example.rs
index f50003f..9b76204 100644
--- a/tests/rust_usage_test/bin/monster_example.rs
+++ b/tests/rust_usage_test/bin/monster_example.rs
@@ -1,7 +1,6 @@
 #![allow(clippy::derivable_impls, clippy::all)]
 extern crate flatbuffers;
 
-
 #[allow(dead_code, unused_imports)]
 #[path = "../../include_test1/mod.rs"]
 pub mod include_test1_generated;
diff --git a/tests/rust_usage_test/outdir/src/main.rs b/tests/rust_usage_test/outdir/src/main.rs
index 734e137..4a85159 100644
--- a/tests/rust_usage_test/outdir/src/main.rs
+++ b/tests/rust_usage_test/outdir/src/main.rs
@@ -7,15 +7,7 @@
 fn main() {
     let mut fbb = flatbuffers::FlatBufferBuilder::new();
     let name = Some(fbb.create_string("bob"));
-    let m = Monster::create(
-        &mut fbb,
-        &MonsterArgs {
-            hp: 1,
-            mana: 2,
-            name,
-            ..Default::default()
-        },
-    );
+    let m = Monster::create(&mut fbb, &MonsterArgs { hp: 1, mana: 2, name, ..Default::default() });
     fbb.finish(m, None);
     let mon = flatbuffers::root::<Monster>(fbb.finished_data()).unwrap();
     assert_eq!(mon.hp(), 1);
diff --git a/tests/rust_usage_test/tests/arrays_test.rs b/tests/rust_usage_test/tests/arrays_test.rs
index 1b4cc64..e73fe05 100644
--- a/tests/rust_usage_test/tests/arrays_test.rs
+++ b/tests/rust_usage_test/tests/arrays_test.rs
@@ -44,12 +44,7 @@
         &[-0x8000000000000000, 0x7FFFFFFFFFFFFFFF],
     );
     // Test five makes sense when specified.
-    let ss = ArrayTable::create(
-        builder,
-        &ArrayTableArgs {
-            a: Some(&array_struct),
-        },
-    );
+    let ss = ArrayTable::create(builder, &ArrayTableArgs { a: Some(&array_struct) });
     finish_array_table_buffer(builder, ss);
 }
 
@@ -102,10 +97,7 @@
     assert_eq!(nested_struct2.c().get(1), TestEnum::A);
     assert_eq!(nested_struct2.d().len(), 2);
     let arr: [i64; 2] = nested_struct2.d().into();
-    assert_eq!(
-        arr,
-        [-0x1122334455667788, 0x1122334455667788]
-    );
+    assert_eq!(arr, [-0x1122334455667788, 0x1122334455667788]);
 
     assert_eq!(array_struct.e(), 1);
     assert_eq!(array_struct.f().len(), 2);
@@ -254,9 +246,11 @@
         let x: [T; N] = array_init(|_| {
             loop {
                 let generated_scalar = T::arbitrary(g);
-                // Verify that generated scalar is not Nan, which is not equals to itself, 
+                // Verify that generated scalar is not Nan, which is not equals to itself,
                 // therefore we can't use it to validate input == output
-                if generated_scalar == generated_scalar { return generated_scalar; }
+                if generated_scalar == generated_scalar {
+                    return generated_scalar;
+                }
             }
         });
         FakeArray { 0: x }
@@ -265,9 +259,9 @@
 
 #[cfg(test)]
 mod array_fuzz {
-    #[cfg(not(miri))]  // slow.
-    extern crate quickcheck;
     extern crate flatbuffers;
+    #[cfg(not(miri))] // slow.
+    extern crate quickcheck;
 
     use self::flatbuffers::{Follow, Push};
     use super::*;
@@ -278,10 +272,10 @@
     // This uses a macro because lifetimes for the trait-bounded function get too
     // complicated.
     macro_rules! impl_prop {
-        ($test_name:ident, $fn_name:ident, $ty:ident) => (
+        ($test_name:ident, $fn_name:ident, $ty:ident) => {
             fn $fn_name(xs: FakeArray<$ty, ARRAY_SIZE>) {
                 let mut test_buf = [0 as u8; 1024];
-                let arr: flatbuffers::Array<$ty, ARRAY_SIZE> =  unsafe {
+                let arr: flatbuffers::Array<$ty, ARRAY_SIZE> = unsafe {
                     flatbuffers::emplace_scalar_array(&mut test_buf, 0, &xs.0);
                     flatbuffers::Array::follow(&test_buf, 0)
                 };
@@ -289,10 +283,12 @@
                 assert_eq!(got, xs.0);
             }
             #[test]
-            fn $test_name() { 
-                quickcheck::QuickCheck::new().max_tests(MAX_TESTS).quickcheck($fn_name as fn(FakeArray<$ty, ARRAY_SIZE>));
+            fn $test_name() {
+                quickcheck::QuickCheck::new()
+                    .max_tests(MAX_TESTS)
+                    .quickcheck($fn_name as fn(FakeArray<$ty, ARRAY_SIZE>));
             }
-        )
+        };
     }
 
     impl_prop!(test_bool, prop_bool, bool);
@@ -322,19 +318,25 @@
 
     fn prop_struct(xs: FakeArray<NestedStructWrapper, ARRAY_SIZE>) {
         let mut test_buf = [0 as u8; 1024];
-        let native_struct_array: [&NestedStruct; ARRAY_SIZE] = array_init::from_iter(xs.0.iter().map(|x| &x.0)).unwrap();
+        let native_struct_array: [&NestedStruct; ARRAY_SIZE] =
+            array_init::from_iter(xs.0.iter().map(|x| &x.0)).unwrap();
         for i in 0..ARRAY_SIZE {
             let offset = i * NESTED_STRUCT_SIZE;
-            unsafe { native_struct_array[i].push(&mut test_buf[offset..offset + NESTED_STRUCT_SIZE], 0) };
+            unsafe {
+                native_struct_array[i].push(&mut test_buf[offset..offset + NESTED_STRUCT_SIZE], 0)
+            };
         }
-        let arr: flatbuffers::Array<NestedStruct, ARRAY_SIZE> = unsafe { flatbuffers::Array::follow(&test_buf, 0) };
+        let arr: flatbuffers::Array<NestedStruct, ARRAY_SIZE> =
+            unsafe { flatbuffers::Array::follow(&test_buf, 0) };
         let got: [&NestedStruct; ARRAY_SIZE] = arr.into();
         assert_eq!(got, native_struct_array);
     }
 
     #[test]
-    #[cfg(not(miri))]  // slow.
+    #[cfg(not(miri))] // slow.
     fn test_struct() {
-        quickcheck::QuickCheck::new().max_tests(MAX_TESTS).quickcheck(prop_struct as fn(FakeArray<NestedStructWrapper, ARRAY_SIZE>));
+        quickcheck::QuickCheck::new()
+            .max_tests(MAX_TESTS)
+            .quickcheck(prop_struct as fn(FakeArray<NestedStructWrapper, ARRAY_SIZE>));
     }
 }
diff --git a/tests/rust_usage_test/tests/flexbuffers_tests/binary_format.rs b/tests/rust_usage_test/tests/flexbuffers_tests/binary_format.rs
index 84fd21b..0f38668 100644
--- a/tests/rust_usage_test/tests/flexbuffers_tests/binary_format.rs
+++ b/tests/rust_usage_test/tests/flexbuffers_tests/binary_format.rs
@@ -108,7 +108,7 @@
     );
 }
 
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 quickcheck! {
     fn qc_f32(x: f32) -> bool {
         let fxb = singleton(x);
diff --git a/tests/rust_usage_test/tests/flexbuffers_tests/mod.rs b/tests/rust_usage_test/tests/flexbuffers_tests/mod.rs
index ee52aca..7fd6d09 100644
--- a/tests/rust_usage_test/tests/flexbuffers_tests/mod.rs
+++ b/tests/rust_usage_test/tests/flexbuffers_tests/mod.rs
@@ -16,6 +16,6 @@
 #[cfg(not(feature = "no_std"))] // uses file I/O
 mod interop;
 mod other_api;
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 mod qc_serious;
 mod rwyw;
diff --git a/tests/rust_usage_test/tests/flexbuffers_tests/other_api.rs b/tests/rust_usage_test/tests/flexbuffers_tests/other_api.rs
index 9875c22..158999d 100644
--- a/tests/rust_usage_test/tests/flexbuffers_tests/other_api.rs
+++ b/tests/rust_usage_test/tests/flexbuffers_tests/other_api.rs
@@ -15,11 +15,11 @@
 use alloc::vec::Vec;
 
 use flexbuffers::*;
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 use quickcheck::QuickCheck;
 
 #[test]
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 fn qc_reader_no_crash() {
     fn no_crash(xs: Vec<u8>) -> bool {
         let r = Reader::get_root(xs.as_ref());
@@ -165,12 +165,7 @@
 }
 #[test]
 fn get_root_deref_u64() {
-    let s = &[
-        0,
-        0,
-        (FlexBufferType::IndirectUInt as u8) << 2 | BitWidth::W64 as u8,
-        1,
-    ];
+    let s = &[0, 0, (FlexBufferType::IndirectUInt as u8) << 2 | BitWidth::W64 as u8, 1];
     // The risk of crashing is reading 8 bytes from index 0.
     assert_eq!(Reader::get_root(s.as_ref()).unwrap().as_u64(), 0);
 }
diff --git a/tests/rust_usage_test/tests/flexbuffers_tests/qc_serious.rs b/tests/rust_usage_test/tests/flexbuffers_tests/qc_serious.rs
index b2e04ec..5489513 100644
--- a/tests/rust_usage_test/tests/flexbuffers_tests/qc_serious.rs
+++ b/tests/rust_usage_test/tests/flexbuffers_tests/qc_serious.rs
@@ -25,11 +25,7 @@
     String(String),
     Strings(String, String),
     Everything(u8, u16, u32, u64, i8, i16, i32, i64, f32, f64, String),
-    Arrays {
-        a: Array3<u16>,
-        b: Array4<i32>,
-        c: Array2<f64>,
-    },
+    Arrays { a: Array3<u16>, b: Array4<i32>, c: Array2<f64> },
     Blobs(#[serde(with = "serde_bytes")] Vec<u8>),
 }
 
@@ -126,12 +122,7 @@
 }
 impl<A: Arbitrary> Arbitrary for Array4<A> {
     fn arbitrary<G: Gen>(g: &mut G) -> Self {
-        Array4([
-            A::arbitrary(g),
-            A::arbitrary(g),
-            A::arbitrary(g),
-            A::arbitrary(g),
-        ])
+        Array4([A::arbitrary(g), A::arbitrary(g), A::arbitrary(g), A::arbitrary(g)])
     }
 }
 
diff --git a/tests/rust_usage_test/tests/flexbuffers_tests/rwyw.rs b/tests/rust_usage_test/tests/flexbuffers_tests/rwyw.rs
index 478d33a..1e32fc1 100644
--- a/tests/rust_usage_test/tests/flexbuffers_tests/rwyw.rs
+++ b/tests/rust_usage_test/tests/flexbuffers_tests/rwyw.rs
@@ -17,7 +17,7 @@
 
 // Read what you wrote.
 use flexbuffers::*;
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 use quickcheck;
 use serde::{Deserialize, Serialize};
 
@@ -28,16 +28,12 @@
     fn arbitrary<G: quickcheck::Gen>(g: &mut G) -> Self {
         let size = core::cmp::min(1, usize::arbitrary(g));
         NonNullString(
-            (0..)
-                .map(|_| <char>::arbitrary(g))
-                .filter(|&b| b != '\0')
-                .take(size)
-                .collect(),
+            (0..).map(|_| <char>::arbitrary(g)).filter(|&b| b != '\0').take(size).collect(),
         )
     }
 }
 
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 quickcheck! {
     fn qc_vec_bool(xs: Vec<bool>) -> bool {
         let mut builder = Builder::default();
@@ -371,7 +367,7 @@
     d: String,
 }
 
-#[cfg(not(miri))]  // slow.
+#[cfg(not(miri))] // slow.
 quickcheck! {
     fn serde_foo(a: i8,
     b: f64,
@@ -415,22 +411,13 @@
     let data = MyTupleStruct(
         MyNewType,
         MyUnitStruct(vec!["Hello".to_string(), "World".to_string()]),
-        MyStruct {
-            a: 2,
-            b: 4,
-            c: 8,
-            d: 16,
-        },
+        MyStruct { a: 2, b: 4, c: 8, d: 16 },
         vec![
             MyEnum::Unit,
             MyEnum::NewType([-1, 0, 1]),
             MyEnum::Unit,
             MyEnum::Tuple(3.14, 2.71),
-            MyEnum::Struct {
-                a: 32,
-                b: 64,
-                c: 128,
-            },
+            MyEnum::Struct { a: 32, b: 64, c: 128 },
         ],
     );
 
diff --git a/tests/rust_usage_test/tests/optional_scalars_test.rs b/tests/rust_usage_test/tests/optional_scalars_test.rs
index f8588c5..ad10e32 100644
--- a/tests/rust_usage_test/tests/optional_scalars_test.rs
+++ b/tests/rust_usage_test/tests/optional_scalars_test.rs
@@ -59,41 +59,17 @@
 make_test!(optional_u32, just_u32, default_u32, maybe_u32, 5, 0, 42);
 make_test!(optional_i64, just_i64, default_i64, maybe_i64, 5, 0, 42);
 make_test!(optional_u64, just_u64, default_u64, maybe_u64, 5, 0, 42);
+make_test!(optional_f32, just_f32, default_f32, maybe_f32, 5.0, 0.0, 42.0);
+make_test!(optional_f64, just_f64, default_f64, maybe_f64, 5.0, 0.0, 42.0);
+make_test!(optional_bool, just_bool, default_bool, maybe_bool, true, false, true);
 make_test!(
-    optional_f32,
-    just_f32,
-    default_f32,
-    maybe_f32,
-    5.0,
-    0.0,
-    42.0
-);
-make_test!(
-    optional_f64,
-    just_f64,
-    default_f64,
-    maybe_f64,
-    5.0,
-    0.0,
-    42.0
-);
-make_test!(
-    optional_bool,
-    just_bool,
-    default_bool,
-    maybe_bool,
-    true,
-    false,
-    true
-);
-make_test!(
-     optional_enum,
-     just_enum,
-     default_enum,
-     maybe_enum,
-     OptionalByte::Two,
-     OptionalByte::None,
-     OptionalByte::One
+    optional_enum,
+    just_enum,
+    default_enum,
+    maybe_enum,
+    OptionalByte::Two,
+    OptionalByte::None,
+    OptionalByte::One
 );
 
 #[test]
@@ -143,7 +119,6 @@
             just_enum: OptionalByte::None,
             maybe_enum: None,
             default_enum: OptionalByte::One,
-
         }
     );
 }
diff --git a/tests/service_test_generated.py b/tests/service_test_generated.py
index 1fa9b09..abc9e92 100644
--- a/tests/service_test_generated.py
+++ b/tests/service_test_generated.py
@@ -2,57 +2,61 @@
 
 # namespace: example
 
-import flatbuffers
 from typing import Any
+import flatbuffers
+
+
 class HelloRequest(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset: int = 0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = HelloRequest()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset: int = 0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = HelloRequest()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsHelloRequest(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # HelloRequest
-    def Init(self, buf: bytes, pos: int):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsHelloRequest(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
+
+  # HelloRequest
+  def Init(self, buf: bytes, pos: int):
+    self._tab = flatbuffers.table.Table(buf, pos)
+
 
 def HelloRequestStart(builder: flatbuffers.Builder):
-    builder.StartObject(0)
+  builder.StartObject(0)
+
 
 def HelloRequestEnd(builder: flatbuffers.Builder) -> int:
-    return builder.EndObject()
-
+  return builder.EndObject()
 
 
 class HelloResponse(object):
-    __slots__ = ['_tab']
+  __slots__ = ['_tab']
 
-    @classmethod
-    def GetRootAs(cls, buf, offset: int = 0):
-        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
-        x = HelloResponse()
-        x.Init(buf, n + offset)
-        return x
+  @classmethod
+  def GetRootAs(cls, buf, offset: int = 0):
+    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+    x = HelloResponse()
+    x.Init(buf, n + offset)
+    return x
 
-    @classmethod
-    def GetRootAsHelloResponse(cls, buf, offset=0):
-        """This method is deprecated. Please switch to GetRootAs."""
-        return cls.GetRootAs(buf, offset)
-    # HelloResponse
-    def Init(self, buf: bytes, pos: int):
-        self._tab = flatbuffers.table.Table(buf, pos)
+  @classmethod
+  def GetRootAsHelloResponse(cls, buf, offset=0):
+    """This method is deprecated. Please switch to GetRootAs."""
+    return cls.GetRootAs(buf, offset)
+
+  # HelloResponse
+  def Init(self, buf: bytes, pos: int):
+    self._tab = flatbuffers.table.Table(buf, pos)
+
 
 def HelloResponseStart(builder: flatbuffers.Builder):
-    builder.StartObject(0)
+  builder.StartObject(0)
+
 
 def HelloResponseEnd(builder: flatbuffers.Builder) -> int:
-    return builder.EndObject()
-
-
-
+  return builder.EndObject()
diff --git a/tests/service_test_grpc.fb.py b/tests/service_test_grpc.fb.py
index 27284ea..c748f67 100644
--- a/tests/service_test_grpc.fb.py
+++ b/tests/service_test_grpc.fb.py
@@ -2,7 +2,6 @@
 
 import flatbuffers
 import grpc
-
 from service_test_generated import HelloRequest, HelloResponse
 
 
@@ -15,38 +14,42 @@
 
 
 class HelloServiceStub(object):
-  '''Interface exported by the server.'''
+  """Interface exported by the server."""
 
   def __init__(self, channel):
-    '''Constructor.
+    """Constructor.
 
     Args:
       channel: A grpc.Channel.
-    '''
+    """
 
     self.Hello = channel.unary_unary(
-      method='/example.HelloService/Hello',
-      request_serializer=_serialize_to_bytes,
-      response_deserializer=HelloResponse.GetRootAs)
+        method='/example.HelloService/Hello',
+        request_serializer=_serialize_to_bytes,
+        response_deserializer=HelloResponse.GetRootAs,
+    )
 
     self.StreamClient = channel.stream_unary(
-      method='/example.HelloService/StreamClient',
-      request_serializer=_serialize_to_bytes,
-      response_deserializer=HelloResponse.GetRootAs)
+        method='/example.HelloService/StreamClient',
+        request_serializer=_serialize_to_bytes,
+        response_deserializer=HelloResponse.GetRootAs,
+    )
 
     self.StreamServer = channel.unary_stream(
-      method='/example.HelloService/StreamServer',
-      request_serializer=_serialize_to_bytes,
-      response_deserializer=HelloResponse.GetRootAs)
+        method='/example.HelloService/StreamServer',
+        request_serializer=_serialize_to_bytes,
+        response_deserializer=HelloResponse.GetRootAs,
+    )
 
     self.Stream = channel.stream_stream(
-      method='/example.HelloService/Stream',
-      request_serializer=_serialize_to_bytes,
-      response_deserializer=HelloResponse.GetRootAs)
+        method='/example.HelloService/Stream',
+        request_serializer=_serialize_to_bytes,
+        response_deserializer=HelloResponse.GetRootAs,
+    )
 
 
 class HelloServiceServicer(object):
-  '''Interface exported by the server.'''
+  """Interface exported by the server."""
 
   def Hello(self, request, context):
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -71,27 +74,30 @@
 
 def add_HelloServiceServicer_to_server(servicer, server):
   rpc_method_handlers = {
-    'Hello': grpc.unary_unary_rpc_method_handler(
-      servicer.Hello,
-      request_deserializer=HelloRequest.GetRootAs,
-      response_serializer=_serialize_to_bytes),
-    'StreamClient': grpc.stream_unary_rpc_method_handler(
-      servicer.StreamClient,
-      request_deserializer=HelloRequest.GetRootAs,
-      response_serializer=_serialize_to_bytes),
-    'StreamServer': grpc.unary_stream_rpc_method_handler(
-      servicer.StreamServer,
-      request_deserializer=HelloRequest.GetRootAs,
-      response_serializer=_serialize_to_bytes),
-    'Stream': grpc.stream_stream_rpc_method_handler(
-      servicer.Stream,
-      request_deserializer=HelloRequest.GetRootAs,
-      response_serializer=_serialize_to_bytes),
+      'Hello': grpc.unary_unary_rpc_method_handler(
+          servicer.Hello,
+          request_deserializer=HelloRequest.GetRootAs,
+          response_serializer=_serialize_to_bytes,
+      ),
+      'StreamClient': grpc.stream_unary_rpc_method_handler(
+          servicer.StreamClient,
+          request_deserializer=HelloRequest.GetRootAs,
+          response_serializer=_serialize_to_bytes,
+      ),
+      'StreamServer': grpc.unary_stream_rpc_method_handler(
+          servicer.StreamServer,
+          request_deserializer=HelloRequest.GetRootAs,
+          response_serializer=_serialize_to_bytes,
+      ),
+      'Stream': grpc.stream_stream_rpc_method_handler(
+          servicer.Stream,
+          request_deserializer=HelloRequest.GetRootAs,
+          response_serializer=_serialize_to_bytes,
+      ),
   }
 
   generic_handler = grpc.method_handlers_generic_handler(
-    'example.HelloService', rpc_method_handlers)
+      'example.HelloService', rpc_method_handlers
+  )
 
   server.add_generic_rpc_handlers((generic_handler,))
-
-
diff --git a/tests/swift/Tests/Flatbuffers/ByteBufferTests.swift b/tests/swift/Tests/Flatbuffers/ByteBufferTests.swift
index 9d5fad9..4851e99 100644
--- a/tests/swift/Tests/Flatbuffers/ByteBufferTests.swift
+++ b/tests/swift/Tests/Flatbuffers/ByteBufferTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class ByteBufferTests: XCTestCase {
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersMonsterWriterTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersMonsterWriterTests.swift
index d7f67b2..386298e 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersMonsterWriterTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersMonsterWriterTests.swift
@@ -16,6 +16,7 @@
 
 import Foundation
 import XCTest
+
 @testable import FlatBuffers
 
 typealias Test = MyGame_Example_Test
@@ -27,7 +28,20 @@
 
   func testData() {
     // swiftformat:disable all
-    let data = Data([48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    let data = Data([
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116,
+      49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20,
+      0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0,
+      0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108,
+      109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100,
+      111, 0, 0, 0,
+    ])
     // swiftformat:enable all
     let _data = ByteBuffer(data: data)
     readVerifiedMonster(fb: _data)
@@ -74,7 +88,22 @@
   func testCreateMonster() {
     let bytes = createMonster(withPrefix: false)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
     var buffer = bytes.buffer
 
@@ -87,7 +116,22 @@
   func testCreateMonsterResizedBuffer() {
     let bytes = createMonster(withPrefix: false)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
     readVerifiedMonster(fb: bytes.sizedBuffer)
   }
@@ -95,7 +139,22 @@
   func testCreateMonsterPrefixed() {
     let bytes = createMonster(withPrefix: true)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [44, 1, 0, 0, 44, 0, 0, 0, 77, 79, 78, 83, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        44, 1, 0, 0, 44, 0, 0, 0, 77, 79, 78, 83, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
 
     var buffer = bytes.buffer
@@ -140,9 +199,23 @@
 
   func testReadMonsterFromUnsafePointerWithoutCopying() {
     // swiftformat:disable all
-    var array: [UInt8] = [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0]
+    var array: [UInt8] = [
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116,
+      49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20,
+      0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0,
+      0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108,
+      109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100,
+      111, 0, 0, 0,
+    ]
     // swiftformat:enable all
-    let unpacked = array
+    let unpacked =
+      array
       .withUnsafeMutableBytes { memory -> MyGame_Example_MonsterT in
         var bytes = ByteBuffer(
           assumingMemoryBound: memory.baseAddress!,
@@ -263,7 +336,20 @@
   func testForceRetainedObject() {
     let byteBuffer = {
       // swiftformat:disable all
-      var data: Data? = Data([48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+      var data: Data? = Data([
+        48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
       // swiftformat:enable all
       let buffer = ByteBuffer(data: data!)
       data = nil
@@ -451,8 +537,7 @@
           count: Int(monster.test4Count))
       var pointerSum = 0
       for pointee in bindedMemory.startIndex..<bindedMemory.endIndex {
-        pointerSum += Int(bindedMemory[pointee].a) +
-          Int(bindedMemory[pointee].b)
+        pointerSum += Int(bindedMemory[pointee].a) + Int(bindedMemory[pointee].b)
       }
       XCTAssertEqual(pointerSum, 100)
     }
@@ -477,7 +562,7 @@
     let array = monster.nameSegmentArray
     XCTAssertEqual(String(bytes: array ?? [], encoding: .utf8), "MyMonster")
 
-    if 0 == monster.testarrayofboolsCount  {
+    if 0 == monster.testarrayofboolsCount {
       XCTAssertEqual(monster.testarrayofbools.isEmpty, true)
     } else {
       XCTAssertEqual(monster.testarrayofbools.isEmpty, false)
@@ -563,14 +648,14 @@
 
   private var path: String {
     #if os(macOS)
-    // Gets the current path of this test file then
-    // strips out the nested directories.
-    let filePath = URL(filePath: #file)
-      .deletingLastPathComponent()
-    return filePath.absoluteString
+      // Gets the current path of this test file then
+      // strips out the nested directories.
+      let filePath = URL(filePath: #file)
+        .deletingLastPathComponent()
+      return filePath.absoluteString
     #else
-    return FileManager.default.currentDirectoryPath
-      .appending("/tests/swift/Tests/Flatbuffers")
+      return FileManager.default.currentDirectoryPath
+        .appending("/tests/swift/Tests/Flatbuffers")
     #endif
   }
 
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersNanInfTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersNanInfTests.swift
index 0969923..d8ffc77 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersNanInfTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersNanInfTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatBuffersNanInfTests: XCTestCase {
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersStructsTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersStructsTests.swift
index 3efdb20..b80c93e 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersStructsTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersStructsTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatBuffersStructsTests: XCTestCase {
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersTests.swift
index 896c414..805d481 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import Common
 @testable import FlatBuffers
 
@@ -60,7 +61,10 @@
       lan: 100)
     b.finish(offset: countryOff)
     // swiftformat:disable all
-    let v: [UInt8] = [16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0, 100, 0, 0, 0, 200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0]
+    let v: [UInt8] = [
+      16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0, 100, 0, 0, 0,
+      200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
+    ]
     // swiftformat:enable all
     XCTAssertEqual(b.sizedByteArray, v)
   }
@@ -74,14 +78,20 @@
       lan: 100)
     b.finish(offset: countryOff, addPrefix: true)
     // swiftformat:disable all
-    let v: [UInt8] = [44, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0, 100, 0, 0, 0, 200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0]
+    let v: [UInt8] = [
+      44, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0,
+      100, 0, 0, 0, 200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
+    ]
     // swiftformat:enable all
     XCTAssertEqual(b.sizedByteArray, v)
   }
 
   func testReadCountry() {
     // swiftformat:disable all
-    let v: [UInt8] = [16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0, 100, 0, 0, 0, 200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0]
+    let v: [UInt8] = [
+      16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 12, 0, 0, 0, 100, 0, 0, 0,
+      200, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
+    ]
     // swiftformat:enable all
     let buffer = ByteBuffer(bytes: v)
     let c = Country.getRootAsCountry(buffer)
@@ -122,19 +132,19 @@
   }
 
   func testAlignmentCrash() {
-      var builder = FlatBufferBuilder(initialSize: 256)
+    var builder = FlatBufferBuilder(initialSize: 256)
 
-      // Create two identical tables to trigger vtable deduplication
-      let str1 = builder.create(string: "test")
-      let start1 = builder.startTable(with: 1)
-      builder.add(offset: str1, at: 0)
-      _ = builder.endTable(at: start1)
+    // Create two identical tables to trigger vtable deduplication
+    let str1 = builder.create(string: "test")
+    let start1 = builder.startTable(with: 1)
+    builder.add(offset: str1, at: 0)
+    _ = builder.endTable(at: start1)
 
-      // Second table triggers vtable comparison where crash occurs
-      let str2 = builder.create(string: "crash")
-      let start2 = builder.startTable(with: 1)
-      builder.add(offset: str2, at: 0)
-      _ = builder.endTable(at: start2) // ← Crashes here on ARM64
+    // Second table triggers vtable comparison where crash occurs
+    let str2 = builder.create(string: "crash")
+    let start2 = builder.startTable(with: 1)
+    builder.add(offset: str2, at: 0)
+    _ = builder.endTable(at: start2)  // ← Crashes here on ARM64
   }
 }
 
@@ -147,21 +157,34 @@
     __t = t
   }
 
-  var lan: Int32 { let o = __t.offset(6); return o == 0 ? 0 : __t.readBuffer(
-    of: Int32.self,
-    at: o) }
-  var log: Int32 { let o = __t.offset(8); return o == 0 ? 0 : __t.readBuffer(
-    of: Int32.self,
-    at: o) }
+  var lan: Int32 {
+    let o = __t.offset(6)
+    return o == 0
+      ? 0
+      : __t.readBuffer(
+        of: Int32.self,
+        at: o)
+  }
+  var log: Int32 {
+    let o = __t.offset(8)
+    return o == 0
+      ? 0
+      : __t.readBuffer(
+        of: Int32.self,
+        at: o)
+  }
   var nameVector: [UInt8]? { __t.getVector(at: 4) }
   var name: String? {
-    let o = __t.offset(4); return o == 0 ? nil : __t.string(at: o) }
+    let o = __t.offset(4)
+    return o == 0 ? nil : __t.string(at: o)
+  }
 
   @inlinable
   static func getRootAsCountry(_ bb: ByteBuffer) -> Country {
-    Country(Table(
-      bb: bb,
-      position: Int32(bb.read(def: UOffset.self, position: 0))))
+    Country(
+      Table(
+        bb: bb,
+        position: Int32(bb.read(def: UOffset.self, position: 0))))
   }
 
   @inlinable
@@ -169,8 +192,8 @@
     builder: inout FlatBufferBuilder,
     name: String,
     log: Int32,
-    lan: Int32) -> Offset
-  {
+    lan: Int32
+  ) -> Offset {
     createCountry(
       builder: &builder,
       offset: builder.create(string: name),
@@ -183,8 +206,8 @@
     builder: inout FlatBufferBuilder,
     offset: Offset,
     log: Int32,
-    lan: Int32) -> Offset
-  {
+    lan: Int32
+  ) -> Offset {
     let _start = builder.startTable(with: 3)
     Country.add(builder: &builder, lng: log)
     Country.add(builder: &builder, lan: lan)
@@ -195,8 +218,8 @@
   @inlinable
   static func end(
     builder: inout FlatBufferBuilder,
-    startOffset: UOffset) -> Offset
-  {
+    startOffset: UOffset
+  ) -> Offset {
     Offset(offset: builder.endTable(at: startOffset))
   }
 
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersUnionTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersUnionTests.swift
index c3a6a52..978e915 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersUnionTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersUnionTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatBuffersUnionTests: XCTestCase {
@@ -35,7 +36,13 @@
     b.finish(offset: root)
     let buffer = b.sizedByteArray
     // swiftformat:disable all
-    XCTAssertEqual(buffer, [16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 8, 0, 7, 0, 12, 0, 10, 0, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 12, 0, 0, 0, 8, 0, 12, 0, 8, 0, 6, 0, 8, 0, 0, 0, 0, 0, 5, 0, 4, 0, 0, 0, 3, 0, 0, 0, 65, 120, 101, 0])
+    XCTAssertEqual(
+      buffer,
+      [
+        16, 0, 0, 0, 0, 0, 10, 0, 16, 0, 8, 0, 7, 0, 12, 0, 10, 0, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 20,
+        0, 0, 0, 1, 0, 0, 0, 12, 0, 0, 0, 8, 0, 12, 0, 8, 0, 6, 0, 8, 0, 0, 0, 0, 0, 5, 0, 4, 0, 0,
+        0, 3, 0, 0, 0, 65, 120, 101, 0,
+      ])
     // swiftformat:enable all
     let monster = LocalMonster.getRootAsMonster(bb: ByteBuffer(bytes: buffer))
     XCTAssertEqual(monster.weapon(at: 0)?.dmg, dmg)
@@ -77,7 +84,18 @@
       path: path)
     builder.finish(offset: orc)
     // swiftformat:disable all
-    XCTAssertEqual(builder.sizedByteArray, [32, 0, 0, 0, 0, 0, 26, 0, 48, 0, 36, 0, 0, 0, 34, 0, 28, 0, 0, 0, 24, 0, 23, 0, 16, 0, 15, 0, 8, 0, 4, 0, 26, 0, 0, 0, 44, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 76, 0, 0, 0, 0, 0, 44, 1, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 0, 0, 0, 0, 128, 64, 0, 0, 160, 64, 0, 0, 192, 64, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 0, 0, 52, 0, 0, 0, 28, 0, 0, 0, 10, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 3, 0, 0, 0, 79, 114, 99, 0, 244, 255, 255, 255, 0, 0, 5, 0, 24, 0, 0, 0, 8, 0, 12, 0, 8, 0, 6, 0, 8, 0, 0, 0, 0, 0, 3, 0, 12, 0, 0, 0, 3, 0, 0, 0, 65, 120, 101, 0, 5, 0, 0, 0, 83, 119, 111, 114, 100, 0, 0, 0])
+    XCTAssertEqual(
+      builder.sizedByteArray,
+      [
+        32, 0, 0, 0, 0, 0, 26, 0, 48, 0, 36, 0, 0, 0, 34, 0, 28, 0, 0, 0, 24, 0, 23, 0, 16, 0, 15,
+        0, 8, 0, 4, 0, 26, 0, 0, 0, 44, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 0, 0, 0, 0,
+        64, 0, 0, 0, 76, 0, 0, 0, 0, 0, 44, 1, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 0, 0,
+        0, 0, 128, 64, 0, 0, 160, 64, 0, 0, 192, 64, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
+        0, 0, 52, 0, 0, 0, 28, 0, 0, 0, 10, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 3, 0, 0, 0,
+        79, 114, 99, 0, 244, 255, 255, 255, 0, 0, 5, 0, 24, 0, 0, 0, 8, 0, 12, 0, 8, 0, 6, 0, 8, 0,
+        0, 0, 0, 0, 3, 0, 12, 0, 0, 0, 3, 0, 0, 0, 65, 120, 101, 0, 5, 0, 0, 0, 83, 119, 111, 114,
+        100, 0, 0, 0,
+      ])
     // swiftformat:enable all
   }
 
@@ -91,7 +109,12 @@
     let end = ColorsNameSpace.Monster.endMonster(&builder, start: start)
     builder.finish(offset: end)
     // swiftformat:disable all
-    XCTAssertEqual(builder.sizedByteArray, [12, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0])
+    XCTAssertEqual(
+      builder.sizedByteArray,
+      [
+        12, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0,
+        0, 0,
+      ])
     // swiftformat:enable all
     let monster = ColorsNameSpace.Monster
       .getRootAsMonster(bb: builder.sizedBuffer)
@@ -269,41 +292,62 @@
     var __buffer: ByteBuffer! { _accessor.bb }
 
     private var _accessor: Table
-    static func getRootAsMonster(bb: ByteBuffer) -> Monster { Monster(Table(
-      bb: bb,
-      position: Int32(bb.read(def: UOffset.self, position: bb.reader)) +
-        Int32(bb.reader))) }
+    static func getRootAsMonster(bb: ByteBuffer) -> Monster {
+      Monster(
+        Table(
+          bb: bb,
+          position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader)))
+    }
 
     init(_ t: Table) { _accessor = t }
     init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
 
     public var colorsCount: Int32 {
-      let o = _accessor.offset(4); return o == 0 ? 0 : _accessor
-        .vector(count: o) }
+      let o = _accessor.offset(4)
+      return o == 0
+        ? 0
+        : _accessor
+          .vector(count: o)
+    }
     public func colors(at index: Int32) -> ColorsNameSpace
       .RGB?
-    { let o = _accessor.offset(4); return o == 0 ? ColorsNameSpace
-      .RGB(rawValue: 0)! : ColorsNameSpace.RGB(rawValue: _accessor.directRead(
-        of: Int32.self,
-        offset: _accessor.vector(at: o) + index * 4)) }
-    static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb
-      .startTable(with: 1) }
-    static func add(colors: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(
-      offset: colors,
-      at: 4)  }
+    {
+      let o = _accessor.offset(4)
+      return o == 0
+        ? ColorsNameSpace
+          .RGB(rawValue: 0)!
+        : ColorsNameSpace.RGB(
+          rawValue: _accessor.directRead(
+            of: Int32.self,
+            offset: _accessor.vector(at: o) + index * 4))
+    }
+    static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset {
+      fbb
+        .startTable(with: 1)
+    }
+    static func add(colors: Offset, _ fbb: inout FlatBufferBuilder) {
+      fbb.add(
+        offset: colors,
+        at: 4)
+    }
     static func endMonster(
       _ fbb: inout FlatBufferBuilder,
-      start: UOffset)
+      start: UOffset
+    )
       -> Offset
-    { let end = Offset(offset: fbb.endTable(at: start)); return end
+    {
+      let end = Offset(offset: fbb.endTable(at: start))
+      return end
     }
   }
 }
 
-
 enum Equipment: Byte { case none, Weapon }
 
-enum Color3: Int8 { case red = 0, green, blue }
+enum Color3: Int8 {
+  case red = 0
+  case green, blue
+}
 
 struct FinalMonster {
 
@@ -318,8 +362,8 @@
     weapons: Offset,
     equipment: Equipment = .none,
     equippedOffset: Offset,
-    path: Offset) -> Offset
-  {
+    path: Offset
+  ) -> Offset {
     let start = builder.startTable(with: 11)
     builder.create(struct: position, position: 4)
     builder.add(element: hp, def: 100, at: 8)
@@ -344,19 +388,27 @@
   init(_ fb: ByteBuffer, o: Int32) { __t = Table(bb: fb, position: o) }
   init(_ t: Table) { __t = t }
 
-  func weapon(at index: Int32) -> Weapon? { let o = __t
-    .offset(4); return o == 0 ? nil : Weapon.assign(
-      __t.indirect(__t.vector(at: o) + (index * 4)),
-      __t.bb) }
+  func weapon(at index: Int32) -> Weapon? {
+    let o =
+      __t
+      .offset(4)
+    return o == 0
+      ? nil
+      : Weapon.assign(
+        __t.indirect(__t.vector(at: o) + (index * 4)),
+        __t.bb)
+  }
 
   func equiped<T: FlatBufferObject>() -> T? {
-    let o = __t.offset(8); return o == 0 ? nil : __t.union(o)
+    let o = __t.offset(8)
+    return o == 0 ? nil : __t.union(o)
   }
 
   static func getRootAsMonster(bb: ByteBuffer) -> LocalMonster {
-    LocalMonster(Table(
-      bb: bb,
-      position: Int32(bb.read(def: UOffset.self, position: 0))))
+    LocalMonster(
+      Table(
+        bb: bb,
+        position: Int32(bb.read(def: UOffset.self, position: 0))))
   }
 
   @inlinable
@@ -364,8 +416,8 @@
     builder: inout FlatBufferBuilder,
     offset: Offset,
     equipment: Equipment = .none,
-    equippedOffset: UOffset) -> Offset
-  {
+    equippedOffset: UOffset
+  ) -> Offset {
     let start = builder.startTable(with: 3)
     builder.add(element: equippedOffset, def: 0, at: 8)
     builder.add(offset: offset, at: 4)
@@ -385,25 +437,35 @@
   private var __t: Table
 
   init(_ t: Table) { __t = t }
-  init(_ fb: ByteBuffer, o: Int32) { __t = Table(bb: fb, position: o)}
+  init(_ fb: ByteBuffer, o: Int32) { __t = Table(bb: fb, position: o) }
 
-  var dmg: Int16 { let o = __t.offset(6); return o == 0 ? 0 : __t.readBuffer(
-    of: Int16.self,
-    at: o) }
+  var dmg: Int16 {
+    let o = __t.offset(6)
+    return o == 0
+      ? 0
+      : __t.readBuffer(
+        of: Int16.self,
+        at: o)
+  }
   var nameVector: [UInt8]? { __t.getVector(at: 4) }
   var name: String? {
-    let o = __t.offset(4); return o == 0 ? nil : __t.string(at: o) }
+    let o = __t.offset(4)
+    return o == 0 ? nil : __t.string(at: o)
+  }
 
-  static func assign(_ i: Int32, _ bb: ByteBuffer) -> Weapon { Weapon(Table(
-    bb: bb,
-    position: i)) }
+  static func assign(_ i: Int32, _ bb: ByteBuffer) -> Weapon {
+    Weapon(
+      Table(
+        bb: bb,
+        position: i))
+  }
 
   @inlinable
   static func createWeapon(
     builder: inout FlatBufferBuilder,
     offset: Offset,
-    dmg: Int16) -> Offset
-  {
+    dmg: Int16
+  ) -> Offset {
     let _start = builder.startTable(with: 2)
     Weapon.add(builder: &builder, name: offset)
     Weapon.add(builder: &builder, dmg: dmg)
@@ -413,8 +475,8 @@
   @inlinable
   static func end(
     builder: inout FlatBufferBuilder,
-    startOffset: UOffset) -> Offset
-  {
+    startOffset: UOffset
+  ) -> Offset {
     Offset(offset: builder.endTable(at: startOffset))
   }
 
diff --git a/tests/swift/Tests/Flatbuffers/FlatBuffersVectorsTests.swift b/tests/swift/Tests/Flatbuffers/FlatBuffersVectorsTests.swift
index 43c8158..5b5814e 100644
--- a/tests/swift/Tests/Flatbuffers/FlatBuffersVectorsTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatBuffersVectorsTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatBuffersVectors: XCTestCase {
@@ -39,7 +40,14 @@
     let vectorOffset = b.createVector(ofOffsets: vector)
     b.finish(offset: vectorOffset)
     // swiftformat:disable all
-    XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 2, 0, 0, 0, 48, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 18, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 40, 0, 0, 0, 100, 0, 0, 0, 200, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10, 0, 0, 0, 24, 0, 0, 0, 188, 2, 0, 0, 120, 3, 0, 0, 7, 0, 0, 0, 68, 101, 110, 109, 97, 114, 107, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0])
+    XCTAssertEqual(
+      b.sizedByteArray,
+      [
+        4, 0, 0, 0, 2, 0, 0, 0, 48, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 18, 0, 4, 0, 8, 0, 12, 0, 10,
+        0, 0, 0, 40, 0, 0, 0, 100, 0, 0, 0, 200, 0, 0, 0, 0, 0, 10, 0, 16, 0, 4, 0, 8, 0, 12, 0, 10,
+        0, 0, 0, 24, 0, 0, 0, 188, 2, 0, 0, 120, 3, 0, 0, 7, 0, 0, 0, 68, 101, 110, 109, 97, 114,
+        107, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
+      ])
     // swiftformat:enable all
   }
 
@@ -49,7 +57,9 @@
     let o = b.createVector(numbers, size: numbers.count)
     b.finish(offset: o)
     // swiftformat:disable all
-    XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0])
+    XCTAssertEqual(
+      b.sizedByteArray,
+      [4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0])
     // swiftformat:enable all
   }
 
@@ -66,7 +76,12 @@
     let o = b.createVector(ofStructs: vector)
     b.finish(offset: o)
     // swiftformat:disable all
-    XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 128, 64, 0, 0, 160, 64, 0, 0, 192, 64, 0, 0, 224, 64, 0, 0, 0, 65, 0, 0, 16, 65])
+    XCTAssertEqual(
+      b.sizedByteArray,
+      [
+        4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 128, 64, 0, 0, 160,
+        64, 0, 0, 192, 64, 0, 0, 224, 64, 0, 0, 0, 65, 0, 0, 16, 65,
+      ])
     // swiftformat:enable all
   }
 
@@ -84,7 +99,12 @@
     let o = b.createVector(ofStrings: strs)
     b.finish(offset: o)
     // swiftformat:disable all
-    XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 2, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0, 7, 0, 0, 0, 68, 101, 110, 109, 97, 114, 107, 0])
+    XCTAssertEqual(
+      b.sizedByteArray,
+      [
+        4, 0, 0, 0, 2, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0,
+        0, 7, 0, 0, 0, 68, 101, 110, 109, 97, 114, 107, 0,
+      ])
     // swiftformat:enable all
   }
   func testCreateSharedStringVector() {
@@ -99,7 +119,12 @@
     let end = b.createVector(ofOffsets: v)
     b.finish(offset: end)
     // swiftformat:disable all
-    XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 68, 101, 110, 109, 97, 114, 107, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0])
+    XCTAssertEqual(
+      b.sizedByteArray,
+      [
+        4, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 68,
+        101, 110, 109, 97, 114, 107, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
+      ])
     // swiftformat:enable all
   }
 
@@ -144,7 +169,6 @@
     XCTAssertEqual(msg.arrayCount, 3)
     XCTAssertEqual(msg.array, [1, 2, 3])
 
-
     let array = msg.withUnsafePointerToArray { ptr in
       let ptr: UnsafeBufferPointer<UInt64> = UnsafeBufferPointer(
         start: ptr.baseAddress?.bindMemory(
@@ -168,9 +192,10 @@
 
   @inlinable
   static func getRootAsNumbers(_ bb: ByteBuffer) -> Numbers {
-    Numbers(Table(
-      bb: bb,
-      position: Int32(bb.read(def: UOffset.self, position: 0))))
+    Numbers(
+      Table(
+        bb: bb,
+        position: Int32(bb.read(def: UOffset.self, position: 0))))
   }
 
   var vArrayInt: [Int]? { __t.getVector(at: 4) }
@@ -180,29 +205,29 @@
 
   static func createNumbersVector(
     b: inout FlatBufferBuilder,
-    array: [Int]) -> Offset
-  {
+    array: [Int]
+  ) -> Offset {
     b.createVector(array, size: array.count)
   }
 
   static func createNumbersVector(
     b: inout FlatBufferBuilder,
-    array: [Int32]) -> Offset
-  {
+    array: [Int32]
+  ) -> Offset {
     b.createVector(array, size: array.count)
   }
 
   static func createNumbersVector(
     b: inout FlatBufferBuilder,
-    array: [Double]) -> Offset
-  {
+    array: [Double]
+  ) -> Offset {
     b.createVector(array, size: array.count)
   }
 
   static func createNumbersVector(
     b: inout FlatBufferBuilder,
-    array: [Float32]) -> Offset
-  {
+    array: [Float32]
+  ) -> Offset {
     b.createVector(array, size: array.count)
   }
 
diff --git a/tests/swift/Tests/Flatbuffers/FlatbuffersDoubleTests.swift b/tests/swift/Tests/Flatbuffers/FlatbuffersDoubleTests.swift
index 8898391..3856a53 100644
--- a/tests/swift/Tests/Flatbuffers/FlatbuffersDoubleTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatbuffersDoubleTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatBuffersDoubleTests: XCTestCase {
@@ -34,7 +35,7 @@
       16, 0, 0, 0, 0, 0, 10, 0, 28, 0, 4, 0, 8, 0, 16, 0, 10,
       0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 64, 0, 0, 0,
       0, 0, 0, 105, 64, 0, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119,
-      97, 121, 0, 0
+      97, 121, 0, 0,
     ]
     // swiftformat:enable all
     XCTAssertEqual(b.sizedByteArray, v)
@@ -50,10 +51,10 @@
     b.finish(offset: countryOff, addPrefix: true)
     // swiftformat:disable all
     let v: [UInt8] = [
-      60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 28
-      , 0, 4, 0, 8, 0, 16, 0, 10, 0, 0, 0, 24, 0, 0, 0, 0, 0,
+      60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 28, 0, 4, 0, 8, 0, 16, 0, 10, 0, 0, 0, 24,
+      0, 0, 0, 0, 0,
       0, 0, 0, 0, 89, 64, 0, 0, 0, 0, 0, 0, 105, 64, 0, 0, 0,
-      0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0
+      0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0,
     ]
     // swiftformat:enable all
     XCTAssertEqual(b.sizedByteArray, v)
@@ -77,8 +78,8 @@
     builder: inout FlatBufferBuilder,
     name: String,
     log: Double,
-    lan: Double) -> Offset
-  {
+    lan: Double
+  ) -> Offset {
     createCountry(
       builder: &builder,
       offset: builder.create(string: name),
@@ -90,8 +91,8 @@
     builder: inout FlatBufferBuilder,
     offset: Offset,
     log: Double,
-    lan: Double) -> Offset
-  {
+    lan: Double
+  ) -> Offset {
     let _start = builder.startTable(with: 3)
     CountryDouble.add(builder: &builder, lng: log)
     CountryDouble.add(builder: &builder, lan: lan)
@@ -101,8 +102,8 @@
 
   static func end(
     builder: inout FlatBufferBuilder,
-    startOffset: UOffset) -> Offset
-  {
+    startOffset: UOffset
+  ) -> Offset {
     Offset(offset: builder.endTable(at: startOffset))
   }
 
diff --git a/tests/swift/Tests/Flatbuffers/FlatbuffersMoreDefaults.swift b/tests/swift/Tests/Flatbuffers/FlatbuffersMoreDefaults.swift
index 66a106e..0c51fb7 100644
--- a/tests/swift/Tests/Flatbuffers/FlatbuffersMoreDefaults.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatbuffersMoreDefaults.swift
@@ -16,6 +16,7 @@
 
 import Foundation
 import XCTest
+
 @testable import FlatBuffers
 
 class FlatBuffersMoreDefaults: XCTestCase {
diff --git a/tests/swift/Tests/Flatbuffers/FlatbuffersVerifierTests.swift b/tests/swift/Tests/Flatbuffers/FlatbuffersVerifierTests.swift
index 0fc790b..49afa07 100644
--- a/tests/swift/Tests/Flatbuffers/FlatbuffersVerifierTests.swift
+++ b/tests/swift/Tests/Flatbuffers/FlatbuffersVerifierTests.swift
@@ -15,6 +15,7 @@
  */
 
 import XCTest
+
 @testable import FlatBuffers
 
 final class FlatbuffersVerifierTests: XCTestCase {
@@ -32,15 +33,67 @@
     add(buffer: &buffer, v: 4, p: 16)
     add(buffer: &buffer, v: 4, p: 20)
 
-    validFlatbuffersObject = ByteBuffer(bytes: [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    validFlatbuffersObject = ByteBuffer(bytes: [
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116,
+      49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20,
+      0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0,
+      0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108,
+      109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100,
+      111, 0, 0, 0,
+    ])
 
-    invalidFlatbuffersObject = ByteBuffer(bytes: [0, 48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    invalidFlatbuffersObject = ByteBuffer(bytes: [
+      0, 48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+      0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0,
+      0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0,
+      0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0,
+      5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20,
+      0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0,
+      1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115,
+      116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0,
+      20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36,
+      0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105,
+      108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111,
+      100, 111, 0, 0, 0,
+    ])
 
     // Array failure within a the inventory array
-    invalidFlatbuffersObject2 = ByteBuffer(bytes: [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 0x00, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    invalidFlatbuffersObject2 = ByteBuffer(bytes: [
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 0x00, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101,
+      115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0,
+      0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255,
+      255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0,
+      87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70,
+      114, 111, 100, 111, 0, 0, 0,
+    ])
 
     // Array failure within a the strings array
-    invalidFlatbuffersObject3 = ByteBuffer(bytes: [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 0x00, 111, 0, 0, 0])
+    invalidFlatbuffersObject3 = ByteBuffer(bytes: [
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116,
+      49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20,
+      0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0,
+      0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108,
+      109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100,
+      0x00, 111, 0, 0, 0,
+    ])
     // swiftformat:enable all
   }
 
@@ -57,8 +110,8 @@
   }
 
   func testFailingID() {
-    let dutData : [UInt8] = [1,2,3,4,5,6,7]
-    var buff  = ByteBuffer(bytes: dutData)
+    let dutData: [UInt8] = [1, 2, 3, 4, 5, 6, 7]
+    var buff = ByteBuffer(bytes: dutData)
     do {
       let _: Monster = try getCheckedRoot(byteBuffer: &buff, fileId: "ABCD")
       XCTFail("This should always fail")
@@ -130,41 +183,47 @@
     XCTAssertEqual(verifier.depth, 1)
     XCTAssertEqual(verifier.tableCount, 1)
 
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 4,
-      fieldName: "Vec",
-      required: false,
-      type: Vec3.self))
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 8,
-      fieldName: "hp",
-      required: false,
-      type: Int16.self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 4,
+        fieldName: "Vec",
+        required: false,
+        type: Vec3.self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 8,
+        fieldName: "hp",
+        required: false,
+        type: Int16.self))
 
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 10,
-      fieldName: "name",
-      required: true,
-      type: ForwardOffset<String>.self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 10,
+        fieldName: "name",
+        required: true,
+        type: ForwardOffset<String>.self))
 
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 14,
-      fieldName: "inventory",
-      required: false,
-      type: ForwardOffset<Vector<UInt8, UInt8>>.self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 14,
+        fieldName: "inventory",
+        required: false,
+        type: ForwardOffset<Vector<UInt8, UInt8>>.self))
 
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 22,
-      fieldName: "test4",
-      required: false,
-      type: ForwardOffset<Vector<MyGame_Example_Test, MyGame_Example_Test>>
-        .self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 22,
+        fieldName: "test4",
+        required: false,
+        type: ForwardOffset<Vector<MyGame_Example_Test, MyGame_Example_Test>>
+          .self))
 
-    XCTAssertNoThrow(try tableVerifer.visit(
-      field: 24,
-      fieldName: "Vector of strings",
-      required: false,
-      type: ForwardOffset<Vector<ForwardOffset<String>, String>>.self))
+    XCTAssertNoThrow(
+      try tableVerifer.visit(
+        field: 24,
+        fieldName: "Vector of strings",
+        required: false,
+        type: ForwardOffset<Vector<ForwardOffset<String>, String>>.self))
 
     do {
       try tableVerifer.visit(
@@ -212,23 +271,36 @@
 
   func testVerifyUnionVectors() {
     // swiftformat:disable all
-    var byteBuffer = ByteBuffer(bytes: [20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8, 0, 0, 0, 20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0])
+    var byteBuffer = ByteBuffer(bytes: [
+      20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8, 0, 0, 0,
+      20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4, 0, 2, 0,
+      0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0,
+    ])
     // swiftformat:enable all
     XCTAssertNoThrow(try getCheckedRoot(byteBuffer: &byteBuffer) as Movie)
   }
 
   func testErrorWrongFileId() {
     // swiftformat:disable all
-    var byteBuffer = ByteBuffer(bytes: [20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8, 0, 0, 0, 20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0])
+    var byteBuffer = ByteBuffer(bytes: [
+      20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8, 0, 0, 0,
+      20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4, 0, 2, 0,
+      0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0,
+    ])
     // swiftformat:enable all
-    XCTAssertThrowsError(try getCheckedRoot(
-      byteBuffer: &byteBuffer,
-      fileId: "FLEX") as Movie)
+    XCTAssertThrowsError(
+      try getCheckedRoot(
+        byteBuffer: &byteBuffer,
+        fileId: "FLEX") as Movie)
   }
 
   func testVerifyPrefixedBuffer() {
     // swiftformat:disable all
-    var byteBuffer = ByteBuffer(bytes: [0, 0, 0, 1, 20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8, 0, 0, 0, 20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0])
+    var byteBuffer = ByteBuffer(bytes: [
+      0, 0, 0, 1, 20, 0, 0, 0, 77, 79, 86, 73, 12, 0, 12, 0, 0, 0, 0, 0, 8, 0, 4, 0, 12, 0, 0, 0, 8,
+      0, 0, 0, 20, 0, 0, 0, 3, 0, 0, 0, 24, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 3, 1, 4,
+      0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 8, 0, 4, 0, 6, 0, 0, 0, 8, 0, 0, 0,
+    ])
     // swiftformat:enable all
     XCTAssertThrowsError(
       try getCheckedPrefixedSizeRoot(byteBuffer: &byteBuffer) as Movie)
@@ -331,8 +403,8 @@
 
   private func getOffset(
     at value: Int,
-    within verifier: Verifier) throws -> Int
-  {
+    within verifier: Verifier
+  ) throws -> Int {
     let offset: UOffset = try verifier.getValue(at: value)
     return Int(clamping: (Int(offset) &+ 0).magnitude)
   }
diff --git a/tests/swift/Tests/Flexbuffers/FlexBuffersJSONTests.swift b/tests/swift/Tests/Flexbuffers/FlexBuffersJSONTests.swift
index 1c37a60..c254666 100644
--- a/tests/swift/Tests/Flexbuffers/FlexBuffersJSONTests.swift
+++ b/tests/swift/Tests/Flexbuffers/FlexBuffersJSONTests.swift
@@ -32,9 +32,10 @@
     // swiftformat:enable all
 
     let data = json.data(using: .utf8)!
-    let decodedData = try JSONSerialization.jsonObject(
-      with: data,
-      options: []) as! [String: Any]
+    let decodedData =
+      try JSONSerialization.jsonObject(
+        with: data,
+        options: []) as! [String: Any]
 
     XCTAssertEqual(decodedData["bar"] as! [Int], [1, 2, 3])
     XCTAssertEqual(decodedData["bar3"] as! [Int], [1, 2, 3])
diff --git a/tests/swift/Tests/Flexbuffers/FlexBuffersReaderTests.swift b/tests/swift/Tests/Flexbuffers/FlexBuffersReaderTests.swift
index 3abd5eb..0c80379 100644
--- a/tests/swift/Tests/Flexbuffers/FlexBuffersReaderTests.swift
+++ b/tests/swift/Tests/Flexbuffers/FlexBuffersReaderTests.swift
@@ -79,7 +79,7 @@
     XCTAssertEqual(blob?[0], 77)
     XCTAssertEqual(vec[4]?.type, .bool)
     XCTAssertEqual(vec[4]?.bool, false)
-    XCTAssertEqual(vec[5]?.double, 4.0) // Shared with vec[2]
+    XCTAssertEqual(vec[5]?.double, 4.0)  // Shared with vec[2]
 
     let barVec = map["bar"]!.typedVector!
     XCTAssertEqual(barVec.count, 3)
@@ -125,15 +125,15 @@
 
   private var path: String {
     #if os(macOS)
-    // Gets the current path of this test file then
-    // strips out the nested directories.
-    let filePath = URL(filePath: #file)
-      .deletingLastPathComponent()
-      .deletingLastPathComponent()
-      .deletingLastPathComponent()
-    return filePath.absoluteString
+      // Gets the current path of this test file then
+      // strips out the nested directories.
+      let filePath = URL(filePath: #file)
+        .deletingLastPathComponent()
+        .deletingLastPathComponent()
+        .deletingLastPathComponent()
+      return filePath.absoluteString
     #else
-    return FileManager.default.currentDirectoryPath
+      return FileManager.default.currentDirectoryPath
     #endif
   }
 
diff --git a/tests/swift/Tests/Flexbuffers/FlexBuffersWriterTests.swift b/tests/swift/Tests/Flexbuffers/FlexBuffersWriterTests.swift
index f3ad2a8..f085f33 100644
--- a/tests/swift/Tests/Flexbuffers/FlexBuffersWriterTests.swift
+++ b/tests/swift/Tests/Flexbuffers/FlexBuffersWriterTests.swift
@@ -47,7 +47,10 @@
       // swiftformat:disable all
       XCTAssertEqual(
         Array($0),
-        [10, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 20, 0, 0, 0, 1, 41, 46, 2, 40, 1])
+        [
+          10, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0,
+          0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 20, 0, 0, 0, 1, 41, 46, 2, 40, 1,
+        ])
       // swiftformat:enable all
     }
   }
@@ -65,7 +68,12 @@
       // swiftformat:disable all
       XCTAssertEqual(
         Array($0),
-        [10, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 81, 51, 2, 40, 1])
+        [
+          10, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
+          0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+          0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1,
+          81, 51, 2, 40, 1,
+        ])
       // swiftformat:enable all
     }
   }
@@ -100,7 +108,10 @@
       // swiftformat:disable all
       XCTAssertEqual(
         Array($0),
-        [98, 111, 111, 108, 50, 0, 98, 111, 111, 108, 49, 0, 2, 7, 14, 2, 1, 2, 1, 0, 104, 104, 4, 36, 1]
+        [
+          98, 111, 111, 108, 50, 0, 98, 111, 111, 108, 49, 0, 2, 7, 14, 2, 1, 2, 1, 0, 104, 104, 4,
+          36, 1,
+        ]
       )
       // swiftformat:enable all
     }
@@ -119,7 +130,10 @@
       // swiftformat:disable all
       XCTAssertEqual(
         Array($0),
-        [119, 101, 108, 99, 111, 109, 101, 0, 7, 119, 101, 108, 99, 111, 109, 101, 0, 3, 18, 19, 20, 3, 1, 3, 15, 16, 17, 20, 20, 20, 6, 36, 1]
+        [
+          119, 101, 108, 99, 111, 109, 101, 0, 7, 119, 101, 108, 99, 111, 109, 101, 0, 3, 18, 19,
+          20, 3, 1, 3, 15, 16, 17, 20, 20, 20, 6, 36, 1,
+        ]
       )
       // swiftformat:enable all
     }
@@ -191,7 +205,6 @@
 
     fbx.endMap(start: outerMap)
 
-
     fbx.finish()
     let buf: ByteBuffer = fbx.sizedByteBuffer
     buf.withUnsafeBytes {
diff --git a/tests/swift/Tests/Flexbuffers/Mocks.swift b/tests/swift/Tests/Flexbuffers/Mocks.swift
index 1a2b11b..29af80a 100644
--- a/tests/swift/Tests/Flexbuffers/Mocks.swift
+++ b/tests/swift/Tests/Flexbuffers/Mocks.swift
@@ -17,9 +17,24 @@
 import FlexBuffers
 
 // swiftformat:disable all
-let flexbufferGolden: [UInt8] = [118, 101, 99, 0, 4, 70, 114, 101, 100, 0, 0, 0, 0, 0, 128, 64, 1, 77, 6, 156, 15, 9, 5, 0, 12, 4, 20, 34, 100, 104, 34, 98, 97, 114, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 98, 97, 114, 51, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 98, 111, 111, 108, 115, 0, 4, 1, 0, 1, 0, 98, 111, 111, 108, 0, 102, 111, 111, 0, 109, 121, 109, 97, 112, 0, 1, 11, 1, 1, 1, 98, 20, 7, 75, 55, 25, 37, 22, 19, 112, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 88, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 61, 0, 0, 0, 0, 0, 200, 66, 45, 0, 0, 0, 133, 0, 0, 0, 46, 78, 106, 144, 14, 36, 40, 35, 38, 1]
+let flexbufferGolden: [UInt8] = [
+  118, 101, 99, 0, 4, 70, 114, 101, 100, 0, 0, 0, 0, 0, 128, 64, 1, 77, 6, 156, 15, 9, 5, 0, 12, 4,
+  20, 34, 100, 104, 34, 98, 97, 114, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 98, 97,
+  114, 51, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 98, 111, 111, 108, 115, 0, 4, 1, 0, 1, 0,
+  98, 111, 111, 108, 0, 102, 111, 111, 0, 109, 121, 109, 97, 112, 0, 1, 11, 1, 1, 1, 98, 20, 7, 75,
+  55, 25, 37, 22, 19, 112, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 88, 0, 0, 0, 72, 0, 0, 0,
+  1, 0, 0, 0, 61, 0, 0, 0, 0, 0, 200, 66, 45, 0, 0, 0, 133, 0, 0, 0, 46, 78, 106, 144, 14, 36, 40,
+  35, 38, 1,
+]
 
-let allTypesGolden: [UInt8] = [9, 9, 0, 0, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 247, 255, 255, 255, 255, 255, 255, 255, 9, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 3, 64, 0, 0, 0, 64, 51, 51, 3, 64, 51, 51, 51, 51, 51, 51, 3, 192, 0, 0, 0, 64, 51, 51, 3, 192, 24, 28, 34, 34, 3, 107, 7, 7, 11, 15, 15, 15, 15, 117, 43, 1]
+let allTypesGolden: [UInt8] = [
+  9, 9, 0, 0, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
+  0, 31, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 1, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 247, 255, 255, 255, 255, 255, 255, 255, 9, 0,
+  0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 3, 64, 0, 0, 0, 64, 51, 51, 3, 64, 51, 51, 51, 51, 51,
+  51, 3, 192, 0, 0, 0, 64, 51, 51, 3, 192, 24, 28, 34, 34, 3, 107, 7, 7, 11, 15, 15, 15, 15, 117,
+  43, 1,
+]
 // swiftformat:enable all
 
 @inline(__always)
diff --git a/tests/swift/Wasm.tests/Package.swift b/tests/swift/Wasm.tests/Package.swift
index a7573d6..e6134a2 100644
--- a/tests/swift/Wasm.tests/Package.swift
+++ b/tests/swift/Wasm.tests/Package.swift
@@ -20,7 +20,7 @@
 let package = Package(
   name: "FlatBuffers.Test.Swift.Wasm",
   platforms: [
-    .macOS(.v10_14),
+    .macOS(.v10_14)
   ],
   dependencies: [
     .package(path: "../../.."),
@@ -31,6 +31,6 @@
     .testTarget(
       name: "FlatBuffers.Test.Swift.WasmTests",
       dependencies: [
-        .product(name: "FlatBuffers", package: "flatbuffers"),
+        .product(name: "FlatBuffers", package: "flatbuffers")
       ]),
   ])
diff --git a/tests/swift/Wasm.tests/Sources/Wasm/Wasm.swift b/tests/swift/Wasm.tests/Sources/Wasm/Wasm.swift
index e77aa2f..69d9b82 100644
--- a/tests/swift/Wasm.tests/Sources/Wasm/Wasm.swift
+++ b/tests/swift/Wasm.tests/Sources/Wasm/Wasm.swift
@@ -14,4 +14,4 @@
  * limitations under the License.
  */
 
-public struct Wasm {}
\ No newline at end of file
+public struct Wasm {}
diff --git a/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/FlatBuffersMonsterWriterTests.swift b/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/FlatBuffersMonsterWriterTests.swift
index d126b0f..2437176 100644
--- a/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/FlatBuffersMonsterWriterTests.swift
+++ b/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/FlatBuffersMonsterWriterTests.swift
@@ -16,6 +16,7 @@
 
 import Foundation
 import XCTest
+
 @testable import FlatBuffers
 
 typealias Test = MyGame_Example_Test
@@ -27,7 +28,20 @@
 
   func testData() {
     // swiftformat:disable all
-    let data: [UInt8] = [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0]
+    let data: [UInt8] = [
+      48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0,
+      0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0,
+      0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0,
+      80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5,
+      0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0,
+      152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1,
+      2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116,
+      49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20,
+      0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0,
+      0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108,
+      109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100,
+      111, 0, 0, 0,
+    ]
     // swiftformat:enable all
     let _data = ByteBuffer(bytes: data)
     readVerifiedMonster(fb: _data)
@@ -36,7 +50,22 @@
   func testCreateMonster() {
     let bytes = createMonster(withPrefix: false)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
     var buffer = bytes.buffer
     let monster: MyGame_Example_Monster = getRoot(byteBuffer: &buffer)
@@ -48,7 +77,22 @@
   func testCreateMonsterResizedBuffer() {
     let bytes = createMonster(withPrefix: false)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        48, 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
     readVerifiedMonster(fb: bytes.sizedBuffer)
   }
@@ -56,7 +100,22 @@
   func testCreateMonsterPrefixed() {
     let bytes = createMonster(withPrefix: true)
     // swiftformat:disable all
-    XCTAssertEqual(bytes.sizedByteArray, [44, 1, 0, 0, 44, 0, 0, 0, 77, 79, 78, 83, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0])
+    XCTAssertEqual(
+      bytes.sizedByteArray,
+      [
+        44, 1, 0, 0, 44, 0, 0, 0, 77, 79, 78, 83, 36, 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28,
+        0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0,
+        0, 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, 0, 120, 0, 0, 0,
+        0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64,
+        2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10,
+        0, 20, 0, 152, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, 0,
+        0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116,
+        101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0,
+        3, 0, 0, 0, 20, 0, 0, 0, 36, 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255,
+        255, 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0,
+        0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0,
+        0, 70, 114, 111, 100, 111, 0, 0, 0,
+      ])
     // swiftformat:enable all
 
     var buffer = bytes.buffer
@@ -308,7 +367,7 @@
     let array = monster.nameSegmentArray
     XCTAssertEqual(String(bytes: array ?? [], encoding: .utf8), "MyMonster")
 
-    if 0 == monster.testarrayofboolsCount  {
+    if 0 == monster.testarrayofboolsCount {
       XCTAssertEqual(monster.testarrayofbools.isEmpty, true)
     } else {
       XCTAssertEqual(monster.testarrayofbools.isEmpty, false)
diff --git a/tests/swift/fuzzer/Package.swift b/tests/swift/fuzzer/Package.swift
index 1d34d02..ff7e42f 100644
--- a/tests/swift/fuzzer/Package.swift
+++ b/tests/swift/fuzzer/Package.swift
@@ -24,12 +24,12 @@
     .macOS(.v10_14),
   ],
   dependencies: [
-    .package(path: "../../.."),
+    .package(path: "../../..")
   ],
   targets: [
     .executableTarget(
       name: "fuzzer",
       dependencies: [
-        .product(name: "FlatBuffers", package: "flatbuffers"),
-      ]),
+        .product(name: "FlatBuffers", package: "flatbuffers")
+      ])
   ])
diff --git a/tests/swift/fuzzer/Sources/fuzzer/fuzzer_generated.swift b/tests/swift/fuzzer/Sources/fuzzer/fuzzer_generated.swift
index 65c548c..55a4241 100644
--- a/tests/swift/fuzzer/Sources/fuzzer/fuzzer_generated.swift
+++ b/tests/swift/fuzzer/Sources/fuzzer/fuzzer_generated.swift
@@ -57,7 +57,8 @@
   public var a: Int16 { _a }
   public var b: Int8 { _b }
 
-  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
+  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws
+  where T: Verifiable {
     try verifier.inBuffer(position: position, of: Test.self)
   }
 }
@@ -140,7 +141,8 @@
   public var test2: Color { Color(rawValue: _test2)! }
   public var test3: Test { _test3 }
 
-  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
+  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws
+  where T: Verifiable {
     try verifier.inBuffer(position: position, of: Vec3.self)
   }
 }
@@ -188,7 +190,9 @@
   public var y: Float32 { return _accessor.readBuffer(of: Float32.self, at: 4) }
   public var z: Float32 { return _accessor.readBuffer(of: Float32.self, at: 8) }
   public var test1: Double { return _accessor.readBuffer(of: Double.self, at: 16) }
-  public var test2: Color { return Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: 24)) ?? .red }
+  public var test2: Color {
+    return Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: 24)) ?? .red
+  }
   public var test3: Test_Mutable { return Test_Mutable(_accessor.bb, o: _accessor.position + 26) }
 }
 
@@ -214,31 +218,96 @@
     var p: VOffset { self.rawValue }
   }
 
-  public var pos: Vec3? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : _accessor.readBuffer(of: Vec3.self, at: o) }
-  public var mutablePos: Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : Vec3_Mutable(_accessor.bb, o: o + _accessor.position) }
-  public var mana: Int16 { let o = _accessor.offset(VTOFFSET.mana.v); return o == 0 ? 150 : _accessor.readBuffer(of: Int16.self, at: o) }
-  public var hp: Int16 { let o = _accessor.offset(VTOFFSET.hp.v); return o == 0 ? 100 : _accessor.readBuffer(of: Int16.self, at: o) }
-  public var name: String! { let o = _accessor.offset(VTOFFSET.name.v); return _accessor.string(at: o) }
+  public var pos: Vec3? {
+    let o = _accessor.offset(VTOFFSET.pos.v)
+    return o == 0 ? nil : _accessor.readBuffer(of: Vec3.self, at: o)
+  }
+  public var mutablePos: Vec3_Mutable? {
+    let o = _accessor.offset(VTOFFSET.pos.v)
+    return o == 0 ? nil : Vec3_Mutable(_accessor.bb, o: o + _accessor.position)
+  }
+  public var mana: Int16 {
+    let o = _accessor.offset(VTOFFSET.mana.v)
+    return o == 0 ? 150 : _accessor.readBuffer(of: Int16.self, at: o)
+  }
+  public var hp: Int16 {
+    let o = _accessor.offset(VTOFFSET.hp.v)
+    return o == 0 ? 100 : _accessor.readBuffer(of: Int16.self, at: o)
+  }
+  public var name: String! {
+    let o = _accessor.offset(VTOFFSET.name.v)
+    return _accessor.string(at: o)
+  }
   public var nameSegmentArray: [UInt8]! { return _accessor.getVector(at: VTOFFSET.name.v) }
-  public var hasTestarrayoftables: Bool { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? false : true }
-  public var testarrayoftablesCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
-  public func testarrayoftables(at index: Int32) -> Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : Monster(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
-  public func testarrayoftablesBy(key: String) -> Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : Monster.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
-  public var hasInventory: Bool { let o = _accessor.offset(VTOFFSET.inventory.v); return o == 0 ? false : true }
-  public var inventoryCount: Int32 { let o = _accessor.offset(VTOFFSET.inventory.v); return o == 0 ? 0 : _accessor.vector(count: o) }
-  public func inventory(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.inventory.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
+  public var hasTestarrayoftables: Bool {
+    let o = _accessor.offset(VTOFFSET.testarrayoftables.v)
+    return o == 0 ? false : true
+  }
+  public var testarrayoftablesCount: Int32 {
+    let o = _accessor.offset(VTOFFSET.testarrayoftables.v)
+    return o == 0 ? 0 : _accessor.vector(count: o)
+  }
+  public func testarrayoftables(at index: Int32) -> Monster? {
+    let o = _accessor.offset(VTOFFSET.testarrayoftables.v)
+    return o == 0
+      ? nil : Monster(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4))
+  }
+  public func testarrayoftablesBy(key: String) -> Monster? {
+    let o = _accessor.offset(VTOFFSET.testarrayoftables.v)
+    return o == 0
+      ? nil : Monster.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb)
+  }
+  public var hasInventory: Bool {
+    let o = _accessor.offset(VTOFFSET.inventory.v)
+    return o == 0 ? false : true
+  }
+  public var inventoryCount: Int32 {
+    let o = _accessor.offset(VTOFFSET.inventory.v)
+    return o == 0 ? 0 : _accessor.vector(count: o)
+  }
+  public func inventory(at index: Int32) -> UInt8 {
+    let o = _accessor.offset(VTOFFSET.inventory.v)
+    return o == 0
+      ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1)
+  }
   public var inventory: [UInt8] { return _accessor.getVector(at: VTOFFSET.inventory.v) ?? [] }
-  public func withUnsafePointerToInventory<T>(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T? { return try _accessor.withUnsafePointerToSlice(at: VTOFFSET.inventory.v, body: body) }
-  public var color: Color { let o = _accessor.offset(VTOFFSET.color.v); return o == 0 ? .blue : Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .blue }
-  public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 7) }
-  public static func add(pos: Vec3?, _ fbb: inout FlatBufferBuilder) { guard let pos = pos else { return }; fbb.create(struct: pos, position: VTOFFSET.pos.p) }
-  public static func add(mana: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: mana, def: 150, at: VTOFFSET.mana.p) }
-  public static func add(hp: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: hp, def: 100, at: VTOFFSET.hp.p) }
-  public static func add(name: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: name, at: VTOFFSET.name.p) }
-  public static func addVectorOf(testarrayoftables: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayoftables, at: VTOFFSET.testarrayoftables.p) }
-  public static func addVectorOf(inventory: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: inventory, at: VTOFFSET.inventory.p) }
-  public static func add(color: Color, _ fbb: inout FlatBufferBuilder) { fbb.add(element: color.rawValue, def: 8, at: VTOFFSET.color.p) }
-  public static func endMonster(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [10]); return end }
+  public func withUnsafePointerToInventory<T>(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows
+    -> T?
+  { return try _accessor.withUnsafePointerToSlice(at: VTOFFSET.inventory.v, body: body) }
+  public var color: Color {
+    let o = _accessor.offset(VTOFFSET.color.v)
+    return o == 0 ? .blue : Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .blue
+  }
+  public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset {
+    fbb.startTable(with: 7)
+  }
+  public static func add(pos: Vec3?, _ fbb: inout FlatBufferBuilder) {
+    guard let pos = pos else { return }
+    fbb.create(struct: pos, position: VTOFFSET.pos.p)
+  }
+  public static func add(mana: Int16, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(element: mana, def: 150, at: VTOFFSET.mana.p)
+  }
+  public static func add(hp: Int16, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(element: hp, def: 100, at: VTOFFSET.hp.p)
+  }
+  public static func add(name: Offset, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(offset: name, at: VTOFFSET.name.p)
+  }
+  public static func addVectorOf(testarrayoftables: Offset, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(offset: testarrayoftables, at: VTOFFSET.testarrayoftables.p)
+  }
+  public static func addVectorOf(inventory: Offset, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(offset: inventory, at: VTOFFSET.inventory.p)
+  }
+  public static func add(color: Color, _ fbb: inout FlatBufferBuilder) {
+    fbb.add(element: color.rawValue, def: 8, at: VTOFFSET.color.p)
+  }
+  public static func endMonster(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset {
+    let end = Offset(offset: fbb.endTable(at: start))
+    fbb.require(table: end, fields: [10])
+    return end
+  }
   public static func createMonster(
     _ fbb: inout FlatBufferBuilder,
     pos: Vec3? = nil,
@@ -259,9 +328,15 @@
     Monster.add(color: color, &fbb)
     return Monster.endMonster(&fbb, start: __start)
   }
-  public static func sortVectorOfMonster(offsets:[Offset], _ fbb: inout FlatBufferBuilder) -> Offset {
+  public static func sortVectorOfMonster(offsets: [Offset], _ fbb: inout FlatBufferBuilder)
+    -> Offset
+  {
     var off = offsets
-    off.sort { Table.compare(Table.offset(Int32($1.o), vOffset: 10, fbb: &fbb), Table.offset(Int32($0.o), vOffset: 10, fbb: &fbb), fbb: &fbb) < 0 } 
+    off.sort {
+      Table.compare(
+        Table.offset(Int32($1.o), vOffset: 10, fbb: &fbb),
+        Table.offset(Int32($0.o), vOffset: 10, fbb: &fbb), fbb: &fbb) < 0
+    }
     return fbb.createVector(ofOffsets: off)
   }
   fileprivate static func lookupByKey(vector: Int32, key: String, fbb: ByteBuffer) -> Monster? {
@@ -271,7 +346,8 @@
     while span != 0 {
       var middle = span / 2
       let tableOffset = Table.indirect(vector + 4 * (start + middle), fbb)
-      let comp = Table.compare(Table.offset(Int32(fbb.capacity) - tableOffset, vOffset: 10, fbb: fbb), key, fbb: fbb)
+      let comp = Table.compare(
+        Table.offset(Int32(fbb.capacity) - tableOffset, vOffset: 10, fbb: fbb), key, fbb: fbb)
       if comp > 0 {
         span = middle
       } else if comp < 0 {
@@ -285,14 +361,20 @@
     return nil
   }
 
-  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
+  public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws
+  where T: Verifiable {
     var _v = try verifier.visitTable(at: position)
     try _v.visit(field: VTOFFSET.pos.p, fieldName: "pos", required: false, type: Vec3.self)
     try _v.visit(field: VTOFFSET.mana.p, fieldName: "mana", required: false, type: Int16.self)
     try _v.visit(field: VTOFFSET.hp.p, fieldName: "hp", required: false, type: Int16.self)
-    try _v.visit(field: VTOFFSET.name.p, fieldName: "name", required: true, type: ForwardOffset<String>.self)
-    try _v.visit(field: VTOFFSET.testarrayoftables.p, fieldName: "testarrayoftables", required: false, type: ForwardOffset<Vector<ForwardOffset<Monster>, Monster>>.self)
-    try _v.visit(field: VTOFFSET.inventory.p, fieldName: "inventory", required: false, type: ForwardOffset<Vector<UInt8, UInt8>>.self)
+    try _v.visit(
+      field: VTOFFSET.name.p, fieldName: "name", required: true, type: ForwardOffset<String>.self)
+    try _v.visit(
+      field: VTOFFSET.testarrayoftables.p, fieldName: "testarrayoftables", required: false,
+      type: ForwardOffset<Vector<ForwardOffset<Monster>, Monster>>.self)
+    try _v.visit(
+      field: VTOFFSET.inventory.p, fieldName: "inventory", required: false,
+      type: ForwardOffset<Vector<UInt8, UInt8>>.self)
     try _v.visit(field: VTOFFSET.color.p, fieldName: "color", required: false, type: Color.self)
     _v.finish()
   }
@@ -334,4 +416,3 @@
     }
   }
 }
-
diff --git a/tests/test_assert.h b/tests/test_assert.h
index 16048b1..a660ccc 100644
--- a/tests/test_assert.h
+++ b/tests/test_assert.h
@@ -37,9 +37,9 @@
 
 // Listener of TestFail, like 'gtest::OnTestPartResult' event handler.
 // Called in TestFail after a failed assertion.
-typedef bool (*TestFailEventListener)(const char *expval, const char *val,
-                                      const char *exp, const char *file,
-                                      int line, const char *func);
+typedef bool (*TestFailEventListener)(const char* expval, const char* val,
+                                      const char* exp, const char* file,
+                                      int line, const char* func);
 
 // Prepare test engine (MSVC assertion setup, etc).
 // listener - this function will be notified on each TestFail call.
@@ -52,11 +52,11 @@
 int CloseTestEngine(bool force_report = false);
 
 // Write captured state to a log and terminate test run.
-void TestFail(const char *expval, const char *val, const char *exp,
-              const char *file, int line, const char *func = nullptr);
+void TestFail(const char* expval, const char* val, const char* exp,
+              const char* file, int line, const char* func = nullptr);
 
-void TestEqStr(const char *expval, const char *val, const char *exp,
-               const char *file, int line, const char *func = nullptr);
+void TestEqStr(const char* expval, const char* val, const char* exp,
+               const char* file, int line, const char* func = nullptr);
 
 // Workaround for `enum class` printing.
 // There is an issue with the printing of enums with a fixed underlying type.
@@ -66,14 +66,15 @@
 // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1601
 // https://stackoverflow.com/questions/34336024/ambiguous-overload-when-writing-an-enum-with-an-enum-base-but-only-with-clang
 
-template<typename T, bool is_enum_type = flatbuffers::is_enum<T>::value>
+template <typename T, bool is_enum_type = flatbuffers::is_enum<T>::value>
 struct underlying_of_scalar {
   static_assert(flatbuffers::is_scalar<T>::value, "invalid type T");
   typedef T type;
 };
 
-template<typename T> struct underlying_of_scalar<T, true> {
-// clang-format off
+template <typename T>
+struct underlying_of_scalar<T, true> {
+  // clang-format off
   // There are old compilers without full C++11 support (see stl_emulation.h).
   #if defined(FLATBUFFERS_TEMPLATES_ALIASES)
   using type = typename std::underlying_type<T>::type;
@@ -83,14 +84,14 @@
   // clang-format on
 };
 
-template<typename T>
+template <typename T>
 typename underlying_of_scalar<T>::type scalar_as_underlying(T v) {
   return static_cast<typename underlying_of_scalar<T>::type>(v);
 }
 
-template<typename T, typename U>
-void TestEq(T expval, U val, const char *exp, const char *file, int line,
-            const char *func) {
+template <typename T, typename U>
+void TestEq(T expval, U val, const char* exp, const char* file, int line,
+            const char* func) {
   if (static_cast<U>(expval) != val) {
     TestFail(flatbuffers::NumToString(scalar_as_underlying(expval)).c_str(),
              flatbuffers::NumToString(scalar_as_underlying(val)).c_str(), exp,
@@ -98,19 +99,19 @@
   }
 }
 
-template<>
+template <>
 inline void TestEq<std::string, std::string>(std::string expval,
-                                             std::string val, const char *exp,
-                                             const char *file, int line,
-                                             const char *func) {
+                                             std::string val, const char* exp,
+                                             const char* file, int line,
+                                             const char* func) {
   if (expval != val) {
     TestFail(expval.c_str(), val.c_str(), exp, file, line, func);
   }
 }
 
-template<typename T, typename U>
-void TestNe(T expval, U val, const char *exp, const char *file, int line,
-            const char *func) {
+template <typename T, typename U>
+void TestNe(T expval, U val, const char* exp, const char* file, int line,
+            const char* func) {
   if (static_cast<U>(expval) == val) {
     TestFail(flatbuffers::NumToString(scalar_as_underlying(expval)).c_str(),
              flatbuffers::NumToString(scalar_as_underlying(val)).c_str(), exp,
@@ -118,11 +119,11 @@
   }
 }
 
-template<>
+template <>
 inline void TestNe<std::string, std::string>(std::string expval,
-                                             std::string val, const char *exp,
-                                             const char *file, int line,
-                                             const char *func) {
+                                             std::string val, const char* exp,
+                                             const char* file, int line,
+                                             const char* func) {
   if (expval == val) {
     TestFail(expval.c_str(), val.c_str(), exp, file, line, func);
   }
diff --git a/tests/test_builder.h b/tests/test_builder.h
index 8a214ba..c8d411c 100644
--- a/tests/test_builder.h
+++ b/tests/test_builder.h
@@ -19,9 +19,7 @@
 
 inline std::string m1_name() { return "Cyberdemon"; }
 inline std::string m2_name() { return "Imp"; }
-inline MyGame::Example::Color m1_color() {
-  return MyGame::Example::Color_Red;
-}
+inline MyGame::Example::Color m1_color() { return MyGame::Example::Color_Red; }
 inline MyGame::Example::Color m2_color() {
   return MyGame::Example::Color_Green;
 }
@@ -31,38 +29,37 @@
   CheckTestGeneratedIsValid(m1_color());
 }
 
-flatbuffers::Offset<Monster> populate1(flatbuffers::FlatBufferBuilder &builder);
-flatbuffers::Offset<Monster> populate2(flatbuffers::FlatBufferBuilder &builder);
+flatbuffers::Offset<Monster> populate1(flatbuffers::FlatBufferBuilder& builder);
+flatbuffers::Offset<Monster> populate2(flatbuffers::FlatBufferBuilder& builder);
 
-uint8_t *release_raw_base(flatbuffers::FlatBufferBuilder &fbb, size_t &size,
-                          size_t &offset);
+uint8_t* release_raw_base(flatbuffers::FlatBufferBuilder& fbb, size_t& size,
+                          size_t& offset);
 
-void free_raw(flatbuffers::grpc::MessageBuilder &mbb, uint8_t *buf);
-void free_raw(flatbuffers::FlatBufferBuilder &fbb, uint8_t *buf);
+void free_raw(flatbuffers::grpc::MessageBuilder& mbb, uint8_t* buf);
+void free_raw(flatbuffers::FlatBufferBuilder& fbb, uint8_t* buf);
 
-bool verify(const flatbuffers::DetachedBuffer &buf,
-            const std::string &expected_name, Color color);
-bool verify(const uint8_t *buf, size_t offset, const std::string &expected_name,
+bool verify(const flatbuffers::DetachedBuffer& buf,
+            const std::string& expected_name, Color color);
+bool verify(const uint8_t* buf, size_t offset, const std::string& expected_name,
             Color color);
 
-bool release_n_verify(flatbuffers::FlatBufferBuilder &fbb,
-                      const std::string &expected_name, Color color);
-bool release_n_verify(flatbuffers::grpc::MessageBuilder &mbb,
-                      const std::string &expected_name, Color color);
+bool release_n_verify(flatbuffers::FlatBufferBuilder& fbb,
+                      const std::string& expected_name, Color color);
+bool release_n_verify(flatbuffers::grpc::MessageBuilder& mbb,
+                      const std::string& expected_name, Color color);
 
 // Invokes this function when testing the following Builder types
 // FlatBufferBuilder, TestHeapBuilder, and GrpcLikeMessageBuilder
-template<class Builder>
+template <class Builder>
 void builder_move_assign_after_releaseraw_test(Builder b1) {
   auto root_offset1 = populate1(b1);
   b1.Finish(root_offset1);
   size_t size, offset;
 
-  uint8_t *rr = b1.ReleaseRaw(size, offset);
-  std::shared_ptr<uint8_t> raw(
-      rr, [size](uint8_t *ptr) {
-        flatbuffers::DefaultAllocator::dealloc(ptr, size);
-      });
+  uint8_t* rr = b1.ReleaseRaw(size, offset);
+  std::shared_ptr<uint8_t> raw(rr, [size](uint8_t* ptr) {
+    flatbuffers::DefaultAllocator::dealloc(ptr, size);
+  });
   Builder src;
   auto root_offset2 = populate2(src);
   src.Finish(root_offset2);
@@ -77,7 +74,7 @@
 void builder_move_assign_after_releaseraw_test(
     flatbuffers::grpc::MessageBuilder b1);
 
-template<class DestBuilder, class SrcBuilder = DestBuilder>
+template <class DestBuilder, class SrcBuilder = DestBuilder>
 struct BuilderTests {
   static void empty_builder_movector_test() {
     SrcBuilder src;
@@ -226,9 +223,12 @@
 
 typedef std::set<BuilderReuseTestSelector> TestSelector;
 
-template<class DestBuilder, class SrcBuilder> struct BuilderReuseTests {
+template <class DestBuilder, class SrcBuilder>
+struct BuilderReuseTests {
   static void builder_reusable_after_release_test(TestSelector selector) {
-    if (!selector.count(REUSABLE_AFTER_RELEASE)) { return; }
+    if (!selector.count(REUSABLE_AFTER_RELEASE)) {
+      return;
+    }
 
     DestBuilder fbb;
     std::vector<flatbuffers::DetachedBuffer> buffers;
@@ -241,14 +241,16 @@
   }
 
   static void builder_reusable_after_releaseraw_test(TestSelector selector) {
-    if (!selector.count(REUSABLE_AFTER_RELEASE_RAW)) { return; }
+    if (!selector.count(REUSABLE_AFTER_RELEASE_RAW)) {
+      return;
+    }
 
     DestBuilder fbb;
     for (int i = 0; i < 5; ++i) {
       auto root_offset1 = populate1(fbb);
       fbb.Finish(root_offset1);
       size_t size, offset;
-      uint8_t *buf = release_raw_base(fbb, size, offset);
+      uint8_t* buf = release_raw_base(fbb, size, offset);
       TEST_ASSERT_FUNC(verify(buf, offset, m1_name(), m1_color()));
       free_raw(fbb, buf);
     }
@@ -256,7 +258,9 @@
 
   static void builder_reusable_after_release_and_move_assign_test(
       TestSelector selector) {
-    if (!selector.count(REUSABLE_AFTER_RELEASE_AND_MOVE_ASSIGN)) { return; }
+    if (!selector.count(REUSABLE_AFTER_RELEASE_AND_MOVE_ASSIGN)) {
+      return;
+    }
 
     DestBuilder dst;
     std::vector<flatbuffers::DetachedBuffer> buffers;
@@ -273,14 +277,16 @@
 
   static void builder_reusable_after_releaseraw_and_move_assign_test(
       TestSelector selector) {
-    if (!selector.count(REUSABLE_AFTER_RELEASE_RAW_AND_MOVE_ASSIGN)) { return; }
+    if (!selector.count(REUSABLE_AFTER_RELEASE_RAW_AND_MOVE_ASSIGN)) {
+      return;
+    }
 
     DestBuilder dst;
     for (int i = 0; i < 5; ++i) {
       auto root_offset1 = populate1(dst);
       dst.Finish(root_offset1);
       size_t size, offset;
-      uint8_t *buf = release_raw_base(dst, size, offset);
+      uint8_t* buf = release_raw_base(dst, size, offset);
       TEST_ASSERT_FUNC(verify(buf, offset, m1_name(), m1_color()));
       free_raw(dst, buf);
       SrcBuilder src;
diff --git a/tests/ts/JavaScriptComplexArraysTest.js b/tests/ts/JavaScriptComplexArraysTest.js
index 36469e5..c55aaff 100644
--- a/tests/ts/JavaScriptComplexArraysTest.js
+++ b/tests/ts/JavaScriptComplexArraysTest.js
@@ -1,16 +1,18 @@
 /* global BigInt */
 
 import assert from 'assert';
-import { readFileSync, writeFileSync } from 'fs';
 import * as flatbuffers from 'flatbuffers';
-import { ArrayStructT } from './arrays_test_complex/my-game/example/array-struct.js'
-import { ArrayTable, ArrayTableT } from './arrays_test_complex/my-game/example/array-table.js'
-import { InnerStructT } from './arrays_test_complex/my-game/example/inner-struct.js'
-import { NestedStructT } from './arrays_test_complex/my-game/example/nested-struct.js'
-import { OuterStructT } from './arrays_test_complex/my-game/example/outer-struct.js'
-import { TestEnum } from './arrays_test_complex/my-game/example/test-enum.js'
+import {readFileSync, writeFileSync} from 'fs';
+
+import {ArrayStructT} from './arrays_test_complex/my-game/example/array-struct.js'
+import {ArrayTable, ArrayTableT} from './arrays_test_complex/my-game/example/array-table.js'
+import {InnerStructT} from './arrays_test_complex/my-game/example/inner-struct.js'
+import {NestedStructT} from './arrays_test_complex/my-game/example/nested-struct.js'
+import {OuterStructT} from './arrays_test_complex/my-game/example/outer-struct.js'
+import {TestEnum} from './arrays_test_complex/my-game/example/test-enum.js'
+
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
-BigInt.prototype.toJSON = function () {
+BigInt.prototype.toJSON = function() {
   return this.toString();
 };
 function fbObjToObj(fbObj) {
@@ -111,15 +113,26 @@
   const arr = testBuild(null, null);
   const parsed = testParse(null, null, Buffer.from(arr));
   assert.strictEqual(parsed.a, 'Complex Array Test', 'String Test');
-  assert.strictEqual(parsed?.cUnderscore?.aUnderscore, 221.13900756835938, 'Float Test');
-  assert.deepEqual(parsed?.cUnderscore?.bUnderscore, [-700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700], 'Array of signed integers');
-  assert.strictEqual(parsed?.cUnderscore.d?.[0].dOuter[0].d[1].a, 123000987.9876, 'Float in deep');
-  assert.deepEqual(parsed?.cUnderscore?.d[0].dOuter?.[0]?.e, {
-    a: 987654321.9876,
-    b: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
-    c: 19,
-    dUnderscore: '9007199254741000',
-  }, 'Object in deep');
+  assert.strictEqual(
+      parsed?.cUnderscore?.aUnderscore, 221.13900756835938, 'Float Test');
+  assert.deepEqual(
+      parsed?.cUnderscore?.bUnderscore,
+      [
+        -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500,
+        600, 700
+      ],
+      'Array of signed integers');
+  assert.strictEqual(
+      parsed?.cUnderscore.d?.[0].dOuter[0].d[1].a, 123000987.9876,
+      'Float in deep');
+  assert.deepEqual(
+      parsed?.cUnderscore?.d[0].dOuter?.[0]?.e, {
+        a: 987654321.9876,
+        b: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
+        c: 19,
+        dUnderscore: '9007199254741000',
+      },
+      'Object in deep');
   assert.deepEqual(parsed?.cUnderscore.g, ['0', '0'], 'Last object');
 
   console.log('Arrays test: completed successfully');
diff --git a/tests/ts/JavaScriptFlexBuffersTest.js b/tests/ts/JavaScriptFlexBuffersTest.js
index 04e670c..b08e8ff 100644
--- a/tests/ts/JavaScriptFlexBuffersTest.js
+++ b/tests/ts/JavaScriptFlexBuffersTest.js
@@ -1,7 +1,7 @@
 // Run this using JavaScriptTest.sh
 import assert from 'assert'
-import fs from 'fs'
 import * as flexbuffers from 'flatbuffers/js/flexbuffers.js'
+import fs from 'fs'
 
 function main() {
   testSingleValueBuffers();
@@ -25,7 +25,8 @@
   }
 
   function _assert(object, buffer) {
-    assert.deepStrictEqual(flexbuffers.toObject(new Uint8Array(buffer).buffer), object);
+    assert.deepStrictEqual(
+        flexbuffers.toObject(new Uint8Array(buffer).buffer), object);
   }
   _assert(true, [1, 104, 1]);
   _assert(false, [0, 104, 1]);
@@ -40,15 +41,19 @@
   _assert(4294967295n, [255, 255, 255, 255, 0, 0, 0, 0, 7, 8]);
   _assert(9223372036854775807n, [255, 255, 255, 255, 255, 255, 255, 127, 7, 8]);
   _assert(-9223372036854775808n, [0, 0, 0, 0, 0, 0, 0, 128, 7, 8]);
-  _assert(18446744073709551615n, [255, 255, 255, 255, 255, 255, 255, 255, 11, 8]);
+  _assert(
+      18446744073709551615n, [255, 255, 255, 255, 255, 255, 255, 255, 11, 8]);
   _assert(4.5, [0, 0, 144, 64, 14, 4]);
   _assert(0.10000000149011612, [205, 204, 204, 61, 14, 4]);
   _assert(0.1, [154, 153, 153, 153, 153, 153, 185, 63, 15, 8]);
   _assert(-1025, [255, 251, 5, 2]);
-  _assert("Maxim", [5, 77, 97, 120, 105, 109, 0, 6, 20, 1]);
-  _assert("hello 😱", [10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]);
-  _assert({a:12}, [97, 0, 1, 3, 1, 1, 1, 12, 4, 2, 36, 1]);
-  _assert({"":45, "a": 12}, [0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]);
+  _assert('Maxim', [5, 77, 97, 120, 105, 109, 0, 6, 20, 1]);
+  _assert(
+      'hello 😱',
+      [10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]);
+  _assert({a: 12}, [97, 0, 1, 3, 1, 1, 1, 12, 4, 2, 36, 1]);
+  _assert(
+      {'': 45, 'a': 12}, [0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]);
 }
 
 function testEncode() {
@@ -66,81 +71,87 @@
   _assert(0.1, [154, 153, 153, 153, 153, 153, 185, 63, 15, 8]);
   _assert(0.5, [0, 0, 0, 63, 14, 4]);
   _assert(new Uint8Array([1, 2, 3]), [3, 1, 2, 3, 3, 100, 1]);
-  _assert("Maxim", [5, 77, 97, 120, 105, 109, 0, 6, 20, 1]);
-  _assert("hello 😱", [10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]);
+  _assert('Maxim', [5, 77, 97, 120, 105, 109, 0, 6, 20, 1]);
+  _assert(
+      'hello 😱',
+      [10, 104, 101, 108, 108, 111, 32, 240, 159, 152, 177, 0, 11, 20, 1]);
   _assert([1, 2], [1, 2, 2, 64, 1]);
   _assert([-1, 256], [255, 255, 0, 1, 4, 65, 1]);
   _assert([-45, 256000], [211, 255, 255, 255, 0, 232, 3, 0, 8, 66, 1]);
-  _assert([1.1, -256.0], [2, 0, 0, 0, 0, 0, 0, 0, 154, 153, 153, 153, 153, 153, 241, 63, 0, 255, 255, 255, 255, 255, 255, 255, 15, 5, 18, 43, 1]);
+  _assert([1.1, -256.0], [
+    2,  0, 0,   0,   0,   0,   0,   0,   154, 153, 153, 153, 153, 153, 241,
+    63, 0, 255, 255, 255, 255, 255, 255, 255, 15,  5,   18,  43,  1
+  ]);
   _assert([1, 2, 4], [1, 2, 4, 3, 76, 1]);
   _assert([-1, 256, 4], [255, 255, 0, 1, 4, 0, 6, 77, 1]);
   _assert([[61], 64], [1, 61, 2, 2, 64, 44, 4, 4, 40, 1]);
-  _assert(["foo", "bar", "baz"], [3, 102, 111, 111, 0, 3, 98, 97, 114, 0, 3, 98, 97, 122, 0, 3, 15, 11, 7, 3, 60, 1]);
-  _assert(["foo", "bar", "baz", "foo", "bar", "baz"], [3, 102, 111, 111, 0, 3, 98, 97, 114, 0, 3, 98, 97, 122, 0, 6, 15, 11, 7, 18, 14, 10, 6, 60, 1]);
+  _assert(['foo', 'bar', 'baz'], [
+    3,  102, 111, 111, 0, 3,  98, 97, 114, 0,  3,
+    98, 97,  122, 0,   3, 15, 11, 7,  3,   60, 1
+  ]);
+  _assert(['foo', 'bar', 'baz', 'foo', 'bar', 'baz'], [
+    3,   102, 111, 111, 0,  3, 98, 97, 114, 0, 3,  98, 97,
+    122, 0,   6,   15,  11, 7, 18, 14, 10,  6, 60, 1
+  ]);
   _assert([true, false, true], [3, 1, 0, 1, 3, 144, 1]);
   _assert(['foo', 1, -5, 1.3, true], [
-    3, 102, 111, 111, 0, 0, 0, 0,
-    5, 0, 0, 0, 0, 0, 0, 0,
-    15, 0, 0, 0, 0, 0, 0, 0,
-    1, 0, 0, 0, 0, 0, 0, 0,
-    251, 255, 255, 255, 255, 255, 255, 255,
-    205, 204, 204, 204, 204, 204, 244, 63,
-    1, 0, 0, 0, 0, 0, 0, 0,
-    20, 4, 4, 15, 104, 45, 43, 1
+    3,   102, 111, 111, 0,   0,   0,   0,   5,   0,   0,   0,   0,
+    0,   0,   0,   15,  0,   0,   0,   0,   0,   0,   0,   1,   0,
+    0,   0,   0,   0,   0,   0,   251, 255, 255, 255, 255, 255, 255,
+    255, 205, 204, 204, 204, 204, 204, 244, 63,  1,   0,   0,   0,
+    0,   0,   0,   0,   20,  4,   4,   15,  104, 45,  43,  1
   ]);
   _assert([1, 3.3, 'max', true, null, false], [
-    3, 109, 97, 120, 0, 0, 0, 0,
-    6, 0, 0, 0, 0, 0, 0, 0,
-    1, 0, 0, 0, 0, 0, 0, 0,
-    102, 102, 102, 102, 102, 102, 10, 64,
-    31, 0, 0, 0, 0, 0, 0, 0,
-    1, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0,
-    4, 15, 20, 104, 0, 104, 54, 43, 1
+    3,  109, 97, 120, 0, 0,  0,  0,   6, 0,   0,   0,   0,   0,   0,
+    0,  1,   0,  0,   0, 0,  0,  0,   0, 102, 102, 102, 102, 102, 102,
+    10, 64,  31, 0,   0, 0,  0,  0,   0, 0,   1,   0,   0,   0,   0,
+    0,  0,   0,  0,   0, 0,  0,  0,   0, 0,   0,   0,   0,   0,   0,
+    0,  0,   0,  0,   4, 15, 20, 104, 0, 104, 54,  43,  1
   ]);
-  _assert({"a": 12}, [97, 0, 1, 3, 1, 1, 1, 12, 4, 2, 36, 1]);
-  _assert({"a": 12, "":45}, [0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]);
+  _assert({'a': 12}, [97, 0, 1, 3, 1, 1, 1, 12, 4, 2, 36, 1]);
+  _assert(
+      {'a': 12, '': 45}, [0, 97, 0, 2, 4, 4, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]);
   // JS currently does not support key vector offset sharing
-  _assert([{'something':12}, {'something': 45}], [
-    115, 111, 109, 101, 116, 104, 105, 110, 103, 0,
-    1, 11, 1, 1, 1, 12, 4, 6, 1, 1, 45, 4, 2, 8, 4, 36, 36, 4, 40, 1
+  _assert([{'something': 12}, {'something': 45}], [
+    115, 111, 109, 101, 116, 104, 105, 110, 103, 0, 1,  11, 1, 1,  1,
+    12,  4,   6,   1,   1,   45,  4,   2,   8,   4, 36, 36, 4, 40, 1
   ]);
 }
 
 function testDeduplicationOff() {
-  let buffer = flexbuffers.encode([{'something':12}, {'something': 45}], 1, true, true, false);
-  assert.deepStrictEqual(buffer, new Uint8Array([
-    115, 111, 109, 101, 116, 104, 105, 110, 103,
-    0,   1,  11,   1,   1,   1,  12,   4,   1,
-    18,   1,   1,   1,  45,   4,   2,  10,   4,
-    36,  36,   4,  40,   1
-  ]));
+  let buffer = flexbuffers.encode(
+      [{'something': 12}, {'something': 45}], 1, true, true, false);
+  assert.deepStrictEqual(
+      buffer, new Uint8Array([
+        115, 111, 109, 101, 116, 104, 105, 110, 103, 0,  1, 11, 1,  1, 1,  12,
+        4,   1,   18,  1,   1,   1,   45,  4,   2,   10, 4, 36, 36, 4, 40, 1
+      ]));
 
-  buffer = flexbuffers.encode([{'something':12}, {'something': 45}], 1, true, false, false);
-  assert.deepStrictEqual(buffer, new Uint8Array([
-    115, 111, 109, 101, 116, 104, 105, 110, 103,   0,
-    1,  11,   1,   1,   1,  12,   4, 115, 111, 109,
-    101, 116, 104, 105, 110, 103,   0,   1,  11,   1,
-    1,   1,  45,   4,   2,  20,   4,  36,  36,   4,
-    40,   1
-  ]));
+  buffer = flexbuffers.encode(
+      [{'something': 12}, {'something': 45}], 1, true, false, false);
+  assert.deepStrictEqual(
+      buffer, new Uint8Array([
+        115, 111, 109, 101, 116, 104, 105, 110, 103, 0,   1,   11,  1,  1,
+        1,   12,  4,   115, 111, 109, 101, 116, 104, 105, 110, 103, 0,  1,
+        11,  1,   1,   1,   45,  4,   2,   20,  4,   36,  36,  4,   40, 1
+      ]));
 
-  buffer = flexbuffers.encode(['something', 'something', 'dark'], 1, true, false, false);
-  assert.deepStrictEqual(buffer, new Uint8Array([
-    9, 115, 111, 109, 101, 116, 104,
-    105, 110, 103,   0,   4, 100,  97,
-    114, 107,   0,   3,  17,  18,   8,
-    3,  60,   1
-  ]));
+  buffer = flexbuffers.encode(
+      ['something', 'something', 'dark'], 1, true, false, false);
+  assert.deepStrictEqual(
+      buffer, new Uint8Array([
+        9,   115, 111, 109, 101, 116, 104, 105, 110, 103, 0,  4,
+        100, 97,  114, 107, 0,   3,   17,  18,  8,   3,   60, 1
+      ]));
 
-  buffer = flexbuffers.encode(['something', 'something', 'dark'], 1, false, false, false);
-  assert.deepStrictEqual(buffer, new Uint8Array([
-    9, 115, 111, 109, 101, 116, 104, 105, 110,
-    103,   0,   9, 115, 111, 109, 101, 116, 104,
-    105, 110, 103,   0,   4, 100,  97, 114, 107,
-    0,   3,  28,  18,   8,   3,  60,   1
-  ]));
+  buffer = flexbuffers.encode(
+      ['something', 'something', 'dark'], 1, false, false, false);
+  assert.deepStrictEqual(
+      buffer, new Uint8Array([
+        9,   115, 111, 109, 101, 116, 104, 105, 110, 103, 0, 9,
+        115, 111, 109, 101, 116, 104, 105, 110, 103, 0,   4, 100,
+        97,  114, 107, 0,   3,   28,  18,  8,   3,   60,  1
+      ]));
 }
 
 function testIndirectAdd() {
@@ -171,9 +182,11 @@
   _assertUInt([255, 8, 1], 255);
 
   _assertUInt([185, 115, 175, 118, 250, 84, 8, 0, 11, 8], 2345234523452345);
-  _assertUInt([185, 115, 175, 118, 250, 84, 8, 0, 8, 31, 1], 2345234523452345, true);
+  _assertUInt(
+      [185, 115, 175, 118, 250, 84, 8, 0, 8, 31, 1], 2345234523452345, true);
   _assertInt([185, 115, 175, 118, 250, 84, 8, 0, 7, 8], 2345234523452345);
-  _assertInt([185, 115, 175, 118, 250, 84, 8, 0, 8, 27, 1], 2345234523452345, true);
+  _assertInt(
+      [185, 115, 175, 118, 250, 84, 8, 0, 8, 27, 1], 2345234523452345, true);
 
   _assertFloat([154, 153, 153, 153, 153, 153, 185, 63, 15, 8], 0.1);
   _assertFloat([154, 153, 153, 153, 153, 153, 185, 63, 8, 35, 1], 0.1, true);
@@ -185,9 +198,7 @@
   function _assertInt(buffer, values) {
     const builder = flexbuffers.builder();
     builder.startVector();
-    values.forEach(v => {
-      builder.addInt(v, true, true)
-    });
+    values.forEach(v => {builder.addInt(v, true, true)});
     builder.end();
     const data = builder.finish();
     assert.deepStrictEqual(data, new Uint8Array(buffer));
@@ -216,19 +227,25 @@
   }
 
   _assertInt(
-    [185, 115, 175, 118, 250, 84, 8, 0, 4, 9, 10, 11, 12, 27, 27, 27, 27, 8, 40, 1],
-    [2345234523452345, 2345234523452345, 2345234523452345, 2345234523452345]
-  );
+      [
+        185, 115, 175, 118, 250, 84, 8,  0, 4,  9,
+        10,  11,  12,  27,  27,  27, 27, 8, 40, 1
+      ],
+      [2345234523452345, 2345234523452345, 2345234523452345, 2345234523452345]);
 
   _assertUInt(
-    [185, 115, 175, 118, 250, 84, 8, 0, 4, 9, 10, 11, 12, 31, 31, 31, 31, 8, 40, 1],
-    [2345234523452345, 2345234523452345, 2345234523452345, 2345234523452345]
-  );
+      [
+        185, 115, 175, 118, 250, 84, 8,  0, 4,  9,
+        10,  11,  12,  31,  31,  31, 31, 8, 40, 1
+      ],
+      [2345234523452345, 2345234523452345, 2345234523452345, 2345234523452345]);
 
   _assertFloat(
-    [154, 153, 153, 153, 153, 153, 185, 63, 4, 9, 10, 11, 12, 35, 35, 35, 35, 8, 40, 1],
-    [0.1, 0.1, 0.1, 0.1]
-  );
+      [
+        154, 153, 153, 153, 153, 153, 185, 63, 4,  9,
+        10,  11,  12,  35,  35,  35,  35,  8,  40, 1
+      ],
+      [0.1, 0.1, 0.1, 0.1]);
 }
 
 function testMapBuilder() {
@@ -240,19 +257,21 @@
   builder.add(45);
   builder.end();
   const data = builder.finish();
-  assert.deepStrictEqual(data, new Uint8Array([97, 0, 0, 2, 2, 5, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]));
+  assert.deepStrictEqual(
+      data,
+      new Uint8Array([97, 0, 0, 2, 2, 5, 2, 1, 2, 45, 12, 4, 4, 4, 36, 1]));
 }
 
 function testRoundTrip() {
   const example = {
-    "age": 35,
-    "flags": [true, false, true, true],
-    "weight": 72.5,
-    "name": "Maxim",
-    "address": {
-      "city": "Bla",
-      "zip": "12345",
-      "countryCode": "XX",
+    'age': 35,
+    'flags': [true, false, true, true],
+    'weight': 72.5,
+    'name': 'Maxim',
+    'address': {
+      'city': 'Bla',
+      'zip': '12345',
+      'countryCode': 'XX',
     }
   };
 
@@ -264,19 +283,19 @@
 
   _assert(example);
   _assert(0x100000001n);
-  _assert({ test_number: 72.6 })
+  _assert({test_number: 72.6})
 }
 
 function testRoundTripWithBuilder() {
   const example = {
-    "age": 35,
-    "flags": [true, false, true, true],
-    "weight": 72.5,
-    "name": "Maxim",
-    "address": {
-      "city": "Bla",
-      "zip": "12345",
-      "countryCode": "XX",
+    'age': 35,
+    'flags': [true, false, true, true],
+    'weight': 72.5,
+    'name': 'Maxim',
+    'address': {
+      'city': 'Bla',
+      'zip': '12345',
+      'countryCode': 'XX',
     }
   };
 
@@ -294,21 +313,21 @@
   builder.add(true);
   builder.end();
 
-  builder.addKey("weight");
+  builder.addKey('weight');
   builder.add(72.5);
 
-  builder.addKey("name");
-  builder.add("Maxim");
+  builder.addKey('name');
+  builder.add('Maxim');
 
-  builder.addKey("address");
+  builder.addKey('address');
 
   builder.startMap();
-  builder.addKey("city");
-  builder.add("Bla");
-  builder.addKey("zip");
-  builder.add("12345");
-  builder.addKey("countryCode");
-  builder.add("XX");
+  builder.addKey('city');
+  builder.add('Bla');
+  builder.addKey('zip');
+  builder.add('12345');
+  builder.addKey('countryCode');
+  builder.add('XX');
   builder.end();
 
   builder.end();
@@ -319,12 +338,12 @@
 
   let root = flexbuffers.toReference(data.buffer);
   assert.strictEqual(root.isMap(), true);
-  assert.strictEqual(root.get("age").numericValue(), 35);
-  assert.strictEqual(root.get("age").intValue(), 35);
-  assert.strictEqual(root.get("name").stringValue(), "Maxim");
-  assert.strictEqual(root.get("weight").floatValue(), 72.5);
-  assert.strictEqual(root.get("weight").numericValue(), 72.5);
-  let flags = root.get("flags");
+  assert.strictEqual(root.get('age').numericValue(), 35);
+  assert.strictEqual(root.get('age').intValue(), 35);
+  assert.strictEqual(root.get('name').stringValue(), 'Maxim');
+  assert.strictEqual(root.get('weight').floatValue(), 72.5);
+  assert.strictEqual(root.get('weight').numericValue(), 72.5);
+  let flags = root.get('flags');
   assert.strictEqual(flags.isVector(), true);
   assert.strictEqual(flags.length(), 4);
   assert.strictEqual(flags.get(0).boolValue(), true);
@@ -332,21 +351,22 @@
   assert.strictEqual(flags.get(2).boolValue(), true);
   assert.strictEqual(flags.get(3).boolValue(), true);
 
-  let address = root.get("address");
+  let address = root.get('address');
   assert.strictEqual(address.isMap(), true);
   assert.strictEqual(address.length(), 3);
-  assert.strictEqual(address.get("city").stringValue(), "Bla");
-  assert.strictEqual(address.get("zip").stringValue(), "12345");
-  assert.strictEqual(address.get("countryCode").stringValue(), "XX");
+  assert.strictEqual(address.get('city').stringValue(), 'Bla');
+  assert.strictEqual(address.get('zip').stringValue(), '12345');
+  assert.strictEqual(address.get('countryCode').stringValue(), 'XX');
 }
 
 function testGoldBuffer() {
-  const data = new Uint8Array(fs.readFileSync('../gold_flexbuffer_example.bin')).buffer;
-  const b1 = flexbuffers.toReference(data).get("bools").get(1);
+  const data =
+      new Uint8Array(fs.readFileSync('../gold_flexbuffer_example.bin')).buffer;
+  const b1 = flexbuffers.toReference(data).get('bools').get(1);
   assert.strictEqual(b1.isBool(), true);
   assert.strictEqual(b1.boolValue(), false);
 
-  const blob = flexbuffers.toReference(data).get("vec").get(3);
+  const blob = flexbuffers.toReference(data).get('vec').get(3);
   assert.strictEqual(blob.isBlob(), true);
   assert.deepStrictEqual(blob.blobValue(), new Uint8Array([77]));
 
@@ -357,23 +377,38 @@
     bar: [1, 2, 3],
     bar3: [1, 2, 3],
     foo: 100,
-    mymap: {foo:'Fred'},
+    mymap: {foo: 'Fred'},
     vec: [-100, 'Fred', 4, new Uint8Array([77]), false, 4]
   });
 }
 
 function testBugWhereOffestWereStoredAsIntInsteadOfUInt() {
-  // Reported in https://github.com/google/flatbuffers/issues/5949#issuecomment-688421193
-  const object = {'channels_in': 64, 'dilation_height_factor': 1, 'dilation_width_factor': 1, 'fused_activation_function': 1, 'pad_values': 1, 'padding': 0, 'stride_height': 1, 'stride_width': 1};
+  // Reported in
+  // https://github.com/google/flatbuffers/issues/5949#issuecomment-688421193
+  const object = {
+    'channels_in': 64,
+    'dilation_height_factor': 1,
+    'dilation_width_factor': 1,
+    'fused_activation_function': 1,
+    'pad_values': 1,
+    'padding': 0,
+    'stride_height': 1,
+    'stride_width': 1
+  };
   let data1 = flexbuffers.encode(object);
-  const data = [99, 104, 97, 110, 110, 101, 108, 115, 95, 105, 110, 0,
-    100, 105, 108, 97, 116, 105, 111, 110, 95, 104, 101, 105, 103, 104, 116, 95, 102, 97, 99, 116, 111, 114, 0,
-    100, 105, 108, 97, 116, 105, 111, 110, 95, 119, 105, 100, 116, 104, 95, 102, 97, 99, 116, 111, 114, 0,
-    102, 117, 115, 101, 100, 95, 97, 99, 116, 105, 118, 97, 116, 105, 111, 110, 95, 102, 117, 110, 99, 116, 105, 111, 110, 0,
-    112, 97, 100, 95, 118, 97, 108, 117, 101, 115, 0, 112, 97, 100, 100, 105, 110, 103, 0,
-    115, 116, 114, 105, 100, 101, 95, 104, 101, 105, 103, 104, 116, 0,
-    115, 116, 114, 105, 100, 101, 95, 119, 105, 100, 116, 104, 0,
-    8, 130, 119, 97, 76, 51, 41, 34, 21, 8, 1, 8, 64, 1, 1, 1, 1, 0, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 16, 36, 1];
+  const data = [
+    99,  104, 97,  110, 110, 101, 108, 115, 95,  105, 110, 0,   100, 105, 108,
+    97,  116, 105, 111, 110, 95,  104, 101, 105, 103, 104, 116, 95,  102, 97,
+    99,  116, 111, 114, 0,   100, 105, 108, 97,  116, 105, 111, 110, 95,  119,
+    105, 100, 116, 104, 95,  102, 97,  99,  116, 111, 114, 0,   102, 117, 115,
+    101, 100, 95,  97,  99,  116, 105, 118, 97,  116, 105, 111, 110, 95,  102,
+    117, 110, 99,  116, 105, 111, 110, 0,   112, 97,  100, 95,  118, 97,  108,
+    117, 101, 115, 0,   112, 97,  100, 100, 105, 110, 103, 0,   115, 116, 114,
+    105, 100, 101, 95,  104, 101, 105, 103, 104, 116, 0,   115, 116, 114, 105,
+    100, 101, 95,  119, 105, 100, 116, 104, 0,   8,   130, 119, 97,  76,  51,
+    41,  34,  21,  8,   1,   8,   64,  1,   1,   1,   1,   0,   1,   1,   4,
+    4,   4,   4,   4,   4,   4,   4,   16,  36,  1
+  ];
   let object2 = flexbuffers.toObject(new Uint8Array(data).buffer);
   let object1 = flexbuffers.toObject(new Uint8Array(data1).buffer);
   assert.deepStrictEqual(object, object2);
@@ -382,9 +417,8 @@
   let ref = flexbuffers.toReference(new Uint8Array(data).buffer);
   assert.strictEqual(ref.isMap(), true);
   assert.strictEqual(ref.length(), 8);
-  assert.strictEqual(ref.get("channels_in").numericValue(), 64);
-  assert.strictEqual(ref.get("padding").isNumber(), true);
+  assert.strictEqual(ref.get('channels_in').numericValue(), 64);
+  assert.strictEqual(ref.get('padding').isNumber(), true);
 }
 
 main();
-
diff --git a/tests/ts/JavaScriptRequiredStringTest.js b/tests/ts/JavaScriptRequiredStringTest.js
index 6023ef8..538afd4 100644
--- a/tests/ts/JavaScriptRequiredStringTest.js
+++ b/tests/ts/JavaScriptRequiredStringTest.js
@@ -1,6 +1,7 @@
 import assert from 'assert'
 import * as flatbuffers from 'flatbuffers';
-import { Foo } from './required-strings/foo.js';
+
+import {Foo} from './required-strings/foo.js';
 
 
 var builder = new flatbuffers.Builder();
@@ -12,21 +13,17 @@
 }
 
 function testMissingFirstRequiredString() {
-	const undefined_string = builder.createString(undefined);
-	const defined_string = builder.createString('cat');
+  const undefined_string = builder.createString(undefined);
+  const defined_string = builder.createString('cat');
 
-	assert.throws(() => Foo.createFoo(
-		builder, undefined_string, defined_string
-	));
+  assert.throws(() => Foo.createFoo(builder, undefined_string, defined_string));
 }
 
 function testMissingSecondRequiredString() {
-	const defined_string = builder.createString('cat');
-	const undefined_string = builder.createString(undefined);
+  const defined_string = builder.createString('cat');
+  const undefined_string = builder.createString(undefined);
 
-	assert.throws(() => Foo.createFoo(
-		builder, defined_string, undefined_string
-	));
+  assert.throws(() => Foo.createFoo(builder, defined_string, undefined_string));
 }
 
 main();
diff --git a/tests/ts/JavaScriptTest.js b/tests/ts/JavaScriptTest.js
index 1226e2e..d51fa2a 100644
--- a/tests/ts/JavaScriptTest.js
+++ b/tests/ts/JavaScriptTest.js
@@ -1,17 +1,16 @@
 // Run this using JavaScriptTest.sh
 import assert from 'assert'
-import fs from 'fs'
 import * as flatbuffers from 'flatbuffers'
+import fs from 'fs'
 
-import { Monster, MonsterT } from './my-game/example/monster.js'
-import { Test, TestT } from './my-game/example/test.js'
-import { Stat } from './my-game/example/stat.js'
-import { Vec3 } from './my-game/example/vec3.js'
-import { Color } from './my-game/example/color.js';
-import { Any } from './my-game/example/any.js';
+import {Any} from './my-game/example/any.js';
+import {Color} from './my-game/example/color.js';
+import {Monster, MonsterT} from './my-game/example/monster.js'
+import {Stat} from './my-game/example/stat.js'
+import {Test, TestT} from './my-game/example/test.js'
+import {Vec3} from './my-game/example/vec3.js'
 
 function main() {
-
   // First, let's test reading a FlatBuffer generated by C++ code:
   // This file was generated from monsterdata_test.json
   var data = new Uint8Array(fs.readFileSync('../monsterdata_test.mon'));
@@ -21,8 +20,8 @@
   var bb = new flatbuffers.ByteBuffer(data);
   testBuffer(bb);
 
-  // Second, let's create a FlatBuffer from scratch in JavaScript, and test it also.
-  // We use an initial size of 1 to exercise the reallocation algorithm,
+  // Second, let's create a FlatBuffer from scratch in JavaScript, and test it
+  // also. We use an initial size of 1 to exercise the reallocation algorithm,
   // normally a size larger than the typical FlatBuffer you generate would be
   // better for performance.
   var fbb = new flatbuffers.Builder(1);
@@ -70,15 +69,11 @@
   Test.createTest(fbb, 30, 40);
   var test4 = fbb.endVector();
 
-  var testArrayOfString = Monster.createTestarrayofstringVector(fbb, [
-    fbb.createString('test1'),
-    fbb.createString('test2')
-  ]);
+  var testArrayOfString = Monster.createTestarrayofstringVector(
+      fbb, [fbb.createString('test1'), fbb.createString('test2')]);
 
-  var testVectorOfLongs = Monster.createVectorOfLongsVector(fbb, [
-    1n,
-    101010100n
-  ]);
+  var testVectorOfLongs =
+      Monster.createVectorOfLongsVector(fbb, [1n, 101010100n]);
 
   Monster.startMonster(fbb);
   Monster.addPos(fbb, Vec3.createVec3(fbb, 1, 2, 3, 3, Color.Green, 5, 6));
@@ -102,7 +97,8 @@
   // parser may serialize in a slightly different order than the above
   // JavaScript code. They are functionally equivalent though.
 
-  fs.writeFileSync('monsterdata_javascript_wire.mon', Buffer.from(fbb.asUint8Array()));
+  fs.writeFileSync(
+      'monsterdata_javascript_wire.mon', Buffer.from(fbb.asUint8Array()));
 
   // Tests mutation first.  This will verify that we did not trample any other
   // part of the byte buffer.
@@ -121,7 +117,8 @@
   assert.strictEqual(monster.hp(), 80);
 
   var manaRes = monster.mutate_mana(10);
-  assert.strictEqual(manaRes, false);  // Field was NOT present, because default value.
+  assert.strictEqual(
+      manaRes, false);  // Field was NOT present, because default value.
 
   // TODO: There is not the availability to mutate structs or vectors.
 }
@@ -137,7 +134,7 @@
 
 function testObjApiUnpack(monster) {
   assert.strictEqual(monster.hp, 80);
-  assert.strictEqual(monster.mana, 150); // default
+  assert.strictEqual(monster.mana, 150);  // default
 
   assert.strictEqual(monster.name, 'MyMonster');
 
@@ -182,7 +179,7 @@
   var monster = Monster.getRootAsMonster(bb);
 
   assert.strictEqual(monster.hp(), 80);
-  assert.strictEqual(monster.mana(), 150); // default
+  assert.strictEqual(monster.mana(), 150);  // default
 
   assert.strictEqual(monster.name(), 'MyMonster');
 
@@ -282,7 +279,7 @@
   stat = mon2.testempty();
   assert.strictEqual(stat != null, true);
   assert.strictEqual(stat.val() != null, true);
-  assert.strictEqual(stat.val(), 0n); // default value
+  assert.strictEqual(stat.val(), 0n);  // default value
 }
 
 function testUnicode() {
@@ -293,17 +290,26 @@
   function testReadingUnicode(bb) {
     var monster = Monster.getRootAsMonster(bb);
     assert.strictEqual(monster.name(), json.name);
-    assert.deepEqual(Buffer.from(monster.name(flatbuffers.Encoding.UTF8_BYTES)), Buffer.from(json.name));
-    assert.strictEqual(monster.testarrayoftablesLength(), json.testarrayoftables.length);
+    assert.deepEqual(
+        Buffer.from(monster.name(flatbuffers.Encoding.UTF8_BYTES)),
+        Buffer.from(json.name));
+    assert.strictEqual(
+        monster.testarrayoftablesLength(), json.testarrayoftables.length);
     json.testarrayoftables.forEach(function(table, i) {
       var value = monster.testarrayoftables(i);
       assert.strictEqual(value.name(), table.name);
-      assert.deepEqual(Buffer.from(value.name(flatbuffers.Encoding.UTF8_BYTES)), Buffer.from(table.name));
+      assert.deepEqual(
+          Buffer.from(value.name(flatbuffers.Encoding.UTF8_BYTES)),
+          Buffer.from(table.name));
     });
-    assert.strictEqual(monster.testarrayofstringLength(), json.testarrayofstring.length);
+    assert.strictEqual(
+        monster.testarrayofstringLength(), json.testarrayofstring.length);
     json.testarrayofstring.forEach(function(string, i) {
       assert.strictEqual(monster.testarrayofstring(i), string);
-      assert.deepEqual(Buffer.from(monster.testarrayofstring(i, flatbuffers.Encoding.UTF8_BYTES)), Buffer.from(string));
+      assert.deepEqual(
+          Buffer.from(
+              monster.testarrayofstring(i, flatbuffers.Encoding.UTF8_BYTES)),
+          Buffer.from(string));
     });
   }
   testReadingUnicode(new flatbuffers.ByteBuffer(new Uint8Array(correct)));
@@ -317,10 +323,12 @@
     Monster.addName(fbb, name);
     return Monster.endMonster(fbb);
   });
-  var testarrayoftablesOffset = Monster.createTestarrayoftablesVector(fbb,
-    testarrayoftablesOffsets);
-  var testarrayofstringOffset = Monster.createTestarrayofstringVector(fbb,
-    json.testarrayofstring.map(function(string) { return fbb.createString(string); }));
+  var testarrayoftablesOffset =
+      Monster.createTestarrayoftablesVector(fbb, testarrayoftablesOffsets);
+  var testarrayofstringOffset = Monster.createTestarrayofstringVector(
+      fbb, json.testarrayofstring.map(function(string) {
+        return fbb.createString(string);
+      }));
   Monster.startMonster(fbb);
   Monster.addTestarrayofstring(fbb, testarrayofstringOffset);
   Monster.addTestarrayoftables(fbb, testarrayoftablesOffset);
@@ -362,19 +370,18 @@
 // Low level stress/fuzz test: serialize/deserialize a variety of
 // different kinds of data in different combinations
 function fuzzTest1() {
-
   // Values we're testing against: chosen to ensure no bits get chopped
   // off anywhere, and also be different from eachother.
-  var bool_val   = true;
-  var char_val   = -127;  // 0x81
-  var uchar_val  = 0xFF;
-  var short_val  = -32222; // 0x8222;
+  var bool_val = true;
+  var char_val = -127;  // 0x81
+  var uchar_val = 0xFF;
+  var short_val = -32222;  // 0x8222;
   var ushort_val = 0xFEEE;
-  var int_val    = 0x83333333 | 0;
-  var uint_val   = 0xFDDDDDDD;
-  var long_val   = BigInt.asIntN(64, 0x8444444444444444n);
-  var ulong_val  = BigInt.asUintN(64, 0xFCCCCCCCCCCCCCCCn);
-  var float_val  = new Float32Array([3.14159])[0];
+  var int_val = 0x83333333 | 0;
+  var uint_val = 0xFDDDDDDD;
+  var long_val = BigInt.asIntN(64, 0x8444444444444444n);
+  var ulong_val = BigInt.asUintN(64, 0xFCCCCCCCCCCCCCCCn);
+  var float_val = new Float32Array([3.14159])[0];
   var double_val = 3.14159265359;
 
   var test_values_max = 11;
@@ -394,17 +401,39 @@
     for (var f = 0; f < fields_per_object; f++) {
       var choice = lcg_rand() % test_values_max;
       switch (choice) {
-        case 0:  builder.addFieldInt8(f, bool_val, 0); break;
-        case 1:  builder.addFieldInt8(f, char_val, 0); break;
-        case 2:  builder.addFieldInt8(f, uchar_val, 0); break;
-        case 3:  builder.addFieldInt16(f, short_val, 0); break;
-        case 4:  builder.addFieldInt16(f, ushort_val, 0); break;
-        case 5:  builder.addFieldInt32(f, int_val, 0); break;
-        case 6:  builder.addFieldInt32(f, uint_val, 0); break;
-        case 7:  builder.addFieldInt64(f, long_val, 0n); break;
-        case 8:  builder.addFieldInt64(f, ulong_val, 0n); break;
-        case 9:  builder.addFieldFloat32(f, float_val, 0); break;
-        case 10: builder.addFieldFloat64(f, double_val, 0); break;
+        case 0:
+          builder.addFieldInt8(f, bool_val, 0);
+          break;
+        case 1:
+          builder.addFieldInt8(f, char_val, 0);
+          break;
+        case 2:
+          builder.addFieldInt8(f, uchar_val, 0);
+          break;
+        case 3:
+          builder.addFieldInt16(f, short_val, 0);
+          break;
+        case 4:
+          builder.addFieldInt16(f, ushort_val, 0);
+          break;
+        case 5:
+          builder.addFieldInt32(f, int_val, 0);
+          break;
+        case 6:
+          builder.addFieldInt32(f, uint_val, 0);
+          break;
+        case 7:
+          builder.addFieldInt64(f, long_val, 0n);
+          break;
+        case 8:
+          builder.addFieldInt64(f, ulong_val, 0n);
+          break;
+        case 9:
+          builder.addFieldFloat32(f, float_val, 0);
+          break;
+        case 10:
+          builder.addFieldFloat64(f, double_val, 0);
+          break;
       }
     }
     objects.push(builder.endObject());
@@ -429,24 +458,46 @@
       assert.ok(vtable_offset < view.getInt16(vtable, true));
       var field_offset = offset + view.getInt16(vtable + vtable_offset, true);
       switch (choice) {
-        case 0:  assert.strictEqual(!!view.getInt8(field_offset), bool_val); break;
-        case 1:  assert.strictEqual(view.getInt8(field_offset), char_val); break;
-        case 2:  assert.strictEqual(view.getUint8(field_offset), uchar_val); break;
-        case 3:  assert.strictEqual(view.getInt16(field_offset, true), short_val); break;
-        case 4:  assert.strictEqual(view.getUint16(field_offset, true), ushort_val); break;
-        case 5:  assert.strictEqual(view.getInt32(field_offset, true), int_val); break;
-        case 6:  assert.strictEqual(view.getUint32(field_offset, true), uint_val); break;
-        case 7:  assert.strictEqual(view.getBigInt64(field_offset, true), long_val); break;
-        case 8:  assert.strictEqual(view.getBigUint64(field_offset, true), ulong_val); break;
-        case 9:  assert.strictEqual(view.getFloat32(field_offset, true), float_val); break;
-        case 10: assert.strictEqual(view.getFloat64(field_offset, true), double_val); break;
+        case 0:
+          assert.strictEqual(!!view.getInt8(field_offset), bool_val);
+          break;
+        case 1:
+          assert.strictEqual(view.getInt8(field_offset), char_val);
+          break;
+        case 2:
+          assert.strictEqual(view.getUint8(field_offset), uchar_val);
+          break;
+        case 3:
+          assert.strictEqual(view.getInt16(field_offset, true), short_val);
+          break;
+        case 4:
+          assert.strictEqual(view.getUint16(field_offset, true), ushort_val);
+          break;
+        case 5:
+          assert.strictEqual(view.getInt32(field_offset, true), int_val);
+          break;
+        case 6:
+          assert.strictEqual(view.getUint32(field_offset, true), uint_val);
+          break;
+        case 7:
+          assert.strictEqual(view.getBigInt64(field_offset, true), long_val);
+          break;
+        case 8:
+          assert.strictEqual(view.getBigUint64(field_offset, true), ulong_val);
+          break;
+        case 9:
+          assert.strictEqual(view.getFloat32(field_offset, true), float_val);
+          break;
+        case 10:
+          assert.strictEqual(view.getFloat64(field_offset, true), double_val);
+          break;
       }
     }
   }
 }
 
 function testSharedStrings() {
-  var shared_string = "Hello world";
+  var shared_string = 'Hello world';
   var builder = new flatbuffers.Builder();
   let mainOffset = builder.createSharedString(shared_string);
   assert.strictEqual(builder.createSharedString(shared_string), mainOffset);
@@ -463,10 +514,7 @@
 function testVectorOfStructs() {
   let monster = new MonsterT();
   monster.name = 'testVectorOfStructs';
-  monster.test4 = [
-    new TestT(1, 2),
-    new TestT(3, 4)
-  ];
+  monster.test4 = [new TestT(1, 2), new TestT(3, 4)];
 
   let builder = new flatbuffers.Builder();
   builder.finish(monster.pack(builder));
@@ -482,9 +530,9 @@
   const data = Uint8Array.from([1, 2, 3, 4, 5]);
 
   const builder = new flatbuffers.Builder();
-  const required = builder.createString("required");
+  const required = builder.createString('required');
   const offset = builder.createByteVector(data);
-  
+
   Monster.startMonster(builder);
   Monster.addName(builder, required);
   Monster.addInventory(builder, offset)
diff --git a/tests/ts/JavaScriptUnionUnderlyingTypeTest.js b/tests/ts/JavaScriptUnionUnderlyingTypeTest.js
index 6a324ca..c63e1a2 100644
--- a/tests/ts/JavaScriptUnionUnderlyingTypeTest.js
+++ b/tests/ts/JavaScriptUnionUnderlyingTypeTest.js
@@ -1,26 +1,27 @@
 import assert from 'assert'
 import * as flatbuffers from 'flatbuffers'
+
 import {UnionUnderlyingType as Test} from './union_underlying_type_test.js'
 
 function main() {
-    let a = new Test.AT();
-    a.a = 1;
-    let b = new Test.BT();
-    b.b = "foo";
-    let c = new Test.CT();
-    c.c = true;
-    let d = new Test.DT();
-    d.testUnionType = Test.ABC.A;
-    d.testUnion = a;
-    d.testVectorOfUnionType = [Test.ABC.A, Test.ABC.B, Test.ABC.C];
-    d.testVectorOfUnion = [a, b, c];
+  let a = new Test.AT();
+  a.a = 1;
+  let b = new Test.BT();
+  b.b = 'foo';
+  let c = new Test.CT();
+  c.c = true;
+  let d = new Test.DT();
+  d.testUnionType = Test.ABC.A;
+  d.testUnion = a;
+  d.testVectorOfUnionType = [Test.ABC.A, Test.ABC.B, Test.ABC.C];
+  d.testVectorOfUnion = [a, b, c];
 
-    let fbb = new flatbuffers.Builder();
-    let offset = d.pack(fbb);
-    fbb.finish(offset);
+  let fbb = new flatbuffers.Builder();
+  let offset = d.pack(fbb);
+  fbb.finish(offset);
 
-    let unpacked = Test.D.getRootAsD(fbb.dataBuffer()).unpack();
-    assert.equal(JSON.stringify(unpacked), JSON.stringify(d));
+  let unpacked = Test.D.getRootAsD(fbb.dataBuffer()).unpack();
+  assert.equal(JSON.stringify(unpacked), JSON.stringify(d));
 }
 
 main()
\ No newline at end of file
diff --git a/tests/ts/JavaScriptUnionVectorTest.js b/tests/ts/JavaScriptUnionVectorTest.js
index 18857d6..3e75149 100644
--- a/tests/ts/JavaScriptUnionVectorTest.js
+++ b/tests/ts/JavaScriptUnionVectorTest.js
@@ -1,17 +1,13 @@
 import assert from 'assert'
 import * as flatbuffers from 'flatbuffers'
 
-import { Character } from './union_vector/character.js'
-import { BookReader, BookReaderT } from './union_vector/book-reader.js'
-import { Attacker, AttackerT } from './union_vector/attacker.js'
-import { Movie, MovieT } from './union_vector/movie.js'
+import {Attacker, AttackerT} from './union_vector/attacker.js'
+import {BookReader, BookReaderT} from './union_vector/book-reader.js'
+import {Character} from './union_vector/character.js'
+import {Movie, MovieT} from './union_vector/movie.js'
 
-var charTypes = [
-  Character.Belle,
-  Character.MuLan,
-  Character.BookFan,
-  Character.Other
-];
+var charTypes =
+    [Character.Belle, Character.MuLan, Character.BookFan, Character.Other];
 
 function testMovieBuf(movie) {
   assert.strictEqual(movie.charactersTypeLength(), charTypes.length);
@@ -31,7 +27,7 @@
   assert.strictEqual(bookReader2.booksRead(), 2);
 
   var other = movie.characters(3, '');
-  assert.strictEqual(other, "I am other");
+  assert.strictEqual(other, 'I am other');
 }
 
 function testMovieUnpack(movie) {
@@ -55,7 +51,7 @@
   assert.strictEqual(bookReader2.booksRead, 2);
 
   var other = movie.characters[3];
-  assert.strictEqual(other, "I am other");
+  assert.strictEqual(other, 'I am other');
 }
 
 function createMovie(fbb) {
@@ -66,17 +62,12 @@
   var charTypesOffset = Movie.createCharactersTypeVector(fbb, charTypes);
   var charsOffset = 0;
 
-  let otherOffset = fbb.createString("I am other");
+  let otherOffset = fbb.createString('I am other');
 
-  charsOffset = Movie.createCharactersVector(
-    fbb,
-    [
-      BookReader.createBookReader(fbb, 7),
-      attackerOffset,
-      BookReader.createBookReader(fbb, 2),
-      otherOffset
-    ]
-  );
+  charsOffset = Movie.createCharactersVector(fbb, [
+    BookReader.createBookReader(fbb, 7), attackerOffset,
+    BookReader.createBookReader(fbb, 2), otherOffset
+  ]);
 
   Movie.startMovie(fbb);
   Movie.addCharactersType(fbb, charTypesOffset);
@@ -104,7 +95,7 @@
   Movie.finishMovieBuffer(fbb, movie_to.pack(fbb));
   var unpackBuf = new flatbuffers.ByteBuffer(fbb.asUint8Array());
   testMovieBuf(Movie.getRootAsMovie(unpackBuf));
-  
+
   console.log('FlatBuffers union vector test: completed successfully');
 }
 
diff --git a/tests/ts/TypeScriptTest.py b/tests/ts/TypeScriptTest.py
index a9ffe95..aba6ffc 100755
--- a/tests/ts/TypeScriptTest.py
+++ b/tests/ts/TypeScriptTest.py
@@ -14,11 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from pathlib import Path
 import platform
 import shutil
 import subprocess
 import sys
-from pathlib import Path
 
 # Get the path where this script is located so we can invoke the script from
 # any directory and have the paths work correctly.
@@ -35,31 +35,37 @@
 
 # Find and assert flatc compiler is present.
 if root_path in flatc_exe.parents:
-    flatc_exe = flatc_exe.relative_to(root_path)
+  flatc_exe = flatc_exe.relative_to(root_path)
 flatc_path = Path(root_path, flatc_exe)
 assert flatc_path.exists(), "Cannot find the flatc compiler " + str(flatc_path)
 
+
 def check_call(args, cwd=tests_path):
-    subprocess.check_call(args, cwd=str(cwd), shell=is_windows)
+  subprocess.check_call(args, cwd=str(cwd), shell=is_windows)
+
 
 # Execute the flatc compiler with the specified parameters
-def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path):
-    print("Invoking flatc on schema " + str(schema))
-    cmd = [str(flatc_path)] + options
-    if prefix:
-        cmd += ["-o"] + [prefix]
-    if include:
-        cmd += ["-I"] + [include]
-    cmd += [schema] if isinstance(schema, str) else schema
-    if data:
-        cmd += [data] if isinstance(data, str) else data
-    check_call(cmd)
+def flatc(
+    options, schema, prefix=None, include=None, data=None, cwd=tests_path
+):
+  print("Invoking flatc on schema " + str(schema))
+  cmd = [str(flatc_path)] + options
+  if prefix:
+    cmd += ["-o"] + [prefix]
+  if include:
+    cmd += ["-I"] + [include]
+  cmd += [schema] if isinstance(schema, str) else schema
+  if data:
+    cmd += [data] if isinstance(data, str) else data
+  check_call(cmd)
+
 
 # Execute esbuild with the specified parameters
 def esbuild(input, output):
-    cmd = ["esbuild", input, "--outfile=" + output]
-    cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"]
-    check_call(cmd)
+  cmd = ["esbuild", input, "--outfile=" + output]
+  cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"]
+  check_call(cmd)
+
 
 print("Removing node_modules/ directory...")
 shutil.rmtree(Path(tests_path, "node_modules"), ignore_errors=True)
@@ -67,7 +73,15 @@
 check_call(["npm", "install", "--silent"])
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--gen-mutable",
+        "--gen-object-api",
+        "--ts-entry-points",
+        "--ts-flat-files",
+    ],
     schema="../monster_test.fbs",
     include="../include_test",
 )
@@ -81,11 +95,21 @@
 )
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--gen-mutable",
+        "--gen-object-api",
+        "--ts-entry-points",
+        "--ts-flat-files",
+    ],
     schema="../union_vector/union_vector.fbs",
     prefix="union_vector",
 )
-esbuild("union_vector/union_vector.ts", "union_vector/union_vector_generated.cjs")
+esbuild(
+    "union_vector/union_vector.ts", "union_vector/union_vector_generated.cjs"
+)
 
 flatc(
     options=["--ts", "--reflect-names", "--gen-name-strings"],
@@ -93,20 +117,43 @@
 )
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--ts-no-import-ext"],
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--ts-no-import-ext",
+    ],
     schema="../optional_scalars.fbs",
     prefix="no_import_ext",
 )
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--gen-object-api",
+        "--ts-entry-points",
+        "--ts-flat-files",
+    ],
     schema="arrays_test_complex/arrays_test_complex.fbs",
-    prefix="arrays_test_complex"
+    prefix="arrays_test_complex",
 )
-esbuild("arrays_test_complex/my-game/example.ts", "arrays_test_complex/arrays_test_complex_generated.cjs")
+esbuild(
+    "arrays_test_complex/my-game/example.ts",
+    "arrays_test_complex/arrays_test_complex_generated.cjs",
+)
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--gen-mutable",
+        "--gen-object-api",
+        "--ts-entry-points",
+        "--ts-flat-files",
+    ],
     schema=[
         "typescript_keywords.fbs",
         "test_dir/typescript_include.fbs",
@@ -118,8 +165,16 @@
 esbuild("typescript_keywords.ts", "typescript_keywords_generated.cjs")
 
 flatc(
-    options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
-    schema="../union_underlying_type_test.fbs"
+    options=[
+        "--ts",
+        "--reflect-names",
+        "--gen-name-strings",
+        "--gen-mutable",
+        "--gen-object-api",
+        "--ts-entry-points",
+        "--ts-flat-files",
+    ],
+    schema="../union_underlying_type_test.fbs",
 )
 
 flatc(options=["--ts"], schema="../long_namespace.fbs")
@@ -127,7 +182,10 @@
 
 print("Running TypeScript Compiler...")
 check_call(["tsc"])
-print("Running TypeScript Compiler in old node resolution mode for no_import_ext...")
+print(
+    "Running TypeScript Compiler in old node resolution mode for"
+    " no_import_ext..."
+)
 check_call(["tsc", "-p", "./tsconfig.node.json"])
 
 NODE_CMD = ["node"]
diff --git a/tests/ts/arrays_test_complex/my-game/example.d.ts b/tests/ts/arrays_test_complex/my-game/example.d.ts
index a3c1a81..9f165bd 100644
--- a/tests/ts/arrays_test_complex/my-game/example.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example.d.ts
@@ -1,6 +1,6 @@
-export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
-export { ArrayTable, ArrayTableT } from './example/array-table.js';
-export { InnerStruct, InnerStructT } from './example/inner-struct.js';
-export { NestedStruct, NestedStructT } from './example/nested-struct.js';
-export { OuterStruct, OuterStructT } from './example/outer-struct.js';
-export { TestEnum } from './example/test-enum.js';
+export {ArrayStruct, ArrayStructT} from './example/array-struct.js';
+export {ArrayTable, ArrayTableT} from './example/array-table.js';
+export {InnerStruct, InnerStructT} from './example/inner-struct.js';
+export {NestedStruct, NestedStructT} from './example/nested-struct.js';
+export {OuterStruct, OuterStructT} from './example/outer-struct.js';
+export {TestEnum} from './example/test-enum.js';
diff --git a/tests/ts/arrays_test_complex/my-game/example.js b/tests/ts/arrays_test_complex/my-game/example.js
index d9405e1..90f6f0c 100644
--- a/tests/ts/arrays_test_complex/my-game/example.js
+++ b/tests/ts/arrays_test_complex/my-game/example.js
@@ -1,8 +1,9 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
-export { ArrayTable, ArrayTableT } from './example/array-table.js';
-export { InnerStruct, InnerStructT } from './example/inner-struct.js';
-export { NestedStruct, NestedStructT } from './example/nested-struct.js';
-export { OuterStruct, OuterStructT } from './example/outer-struct.js';
-export { TestEnum } from './example/test-enum.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {ArrayStruct, ArrayStructT} from './example/array-struct.js';
+export {ArrayTable, ArrayTableT} from './example/array-table.js';
+export {InnerStruct, InnerStructT} from './example/inner-struct.js';
+export {NestedStruct, NestedStructT} from './example/nested-struct.js';
+export {OuterStruct, OuterStructT} from './example/outer-struct.js';
+export {TestEnum} from './example/test-enum.js';
diff --git a/tests/ts/arrays_test_complex/my-game/example.ts b/tests/ts/arrays_test_complex/my-game/example.ts
index 4f1d63b..eb01ee1 100644
--- a/tests/ts/arrays_test_complex/my-game/example.ts
+++ b/tests/ts/arrays_test_complex/my-game/example.ts
@@ -2,9 +2,9 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
-export { ArrayTable, ArrayTableT } from './example/array-table.js';
-export { InnerStruct, InnerStructT } from './example/inner-struct.js';
-export { NestedStruct, NestedStructT } from './example/nested-struct.js';
-export { OuterStruct, OuterStructT } from './example/outer-struct.js';
-export { TestEnum } from './example/test-enum.js';
+export {ArrayStruct, ArrayStructT} from './example/array-struct.js';
+export {ArrayTable, ArrayTableT} from './example/array-table.js';
+export {InnerStruct, InnerStructT} from './example/inner-struct.js';
+export {NestedStruct, NestedStructT} from './example/nested-struct.js';
+export {OuterStruct, OuterStructT} from './example/outer-struct.js';
+export {TestEnum} from './example/test-enum.js';
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-struct.d.ts b/tests/ts/arrays_test_complex/my-game/example/array-struct.d.ts
index 80acd75..b8b8703 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-struct.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/array-struct.d.ts
@@ -1,31 +1,53 @@
 import * as flatbuffers from 'flatbuffers';
-import { NestedStruct, NestedStructT } from '../../my-game/example/nested-struct.js';
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
-export declare class ArrayStruct implements flatbuffers.IUnpackableObject<ArrayStructT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): ArrayStruct;
-    aUnderscore(): number;
-    bUnderscore(index: number): number | null;
-    c(): number;
-    d(index: number, obj?: NestedStruct): NestedStruct | null;
-    e(): number;
-    f(index: number, obj?: OuterStruct): OuterStruct | null;
-    g(index: number): bigint | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createArrayStruct(builder: flatbuffers.Builder, a_underscore: number, b_underscore: number[] | null, c: number, d: (any | NestedStructT)[] | null, e: number, f: (any | OuterStructT)[] | null, g: bigint[] | null): flatbuffers.Offset;
-    unpack(): ArrayStructT;
-    unpackTo(_o: ArrayStructT): void;
+import {
+  NestedStruct,
+  NestedStructT,
+} from '../../my-game/example/nested-struct.js';
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
+export declare class ArrayStruct
+  implements flatbuffers.IUnpackableObject<ArrayStructT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): ArrayStruct;
+  aUnderscore(): number;
+  bUnderscore(index: number): number | null;
+  c(): number;
+  d(index: number, obj?: NestedStruct): NestedStruct | null;
+  e(): number;
+  f(index: number, obj?: OuterStruct): OuterStruct | null;
+  g(index: number): bigint | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createArrayStruct(
+    builder: flatbuffers.Builder,
+    a_underscore: number,
+    b_underscore: number[] | null,
+    c: number,
+    d: (any | NestedStructT)[] | null,
+    e: number,
+    f: (any | OuterStructT)[] | null,
+    g: bigint[] | null,
+  ): flatbuffers.Offset;
+  unpack(): ArrayStructT;
+  unpackTo(_o: ArrayStructT): void;
 }
 export declare class ArrayStructT implements flatbuffers.IGeneratedObject {
-    aUnderscore: number;
-    bUnderscore: (number)[];
-    c: number;
-    d: (NestedStructT)[];
-    e: number;
-    f: (OuterStructT)[];
-    g: (bigint)[];
-    constructor(aUnderscore?: number, bUnderscore?: (number)[], c?: number, d?: (NestedStructT)[], e?: number, f?: (OuterStructT)[], g?: (bigint)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  aUnderscore: number;
+  bUnderscore: number[];
+  c: number;
+  d: NestedStructT[];
+  e: number;
+  f: OuterStructT[];
+  g: bigint[];
+  constructor(
+    aUnderscore?: number,
+    bUnderscore?: number[],
+    c?: number,
+    d?: NestedStructT[],
+    e?: number,
+    f?: OuterStructT[],
+    g?: bigint[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-struct.js b/tests/ts/arrays_test_complex/my-game/example/array-struct.js
index 9350571..9a62528 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-struct.js
+++ b/tests/ts/arrays_test_complex/my-game/example/array-struct.js
@@ -1,98 +1,115 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { NestedStruct, NestedStructT } from '../../my-game/example/nested-struct.js';
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
+import {NestedStruct, NestedStructT} from '../../my-game/example/nested-struct.js';
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
 export class ArrayStruct {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  aUnderscore() {
+    return this.bb.readFloat32(this.bb_pos);
+  }
+  bUnderscore(index) {
+    return this.bb.readInt32(this.bb_pos + 4 + index * 4);
+  }
+  c() {
+    return this.bb.readInt8(this.bb_pos + 64);
+  }
+  d(index, obj) {
+    return (obj || new NestedStruct())
+        .__init(this.bb_pos + 72 + index * 1072, this.bb);
+  }
+  e() {
+    return this.bb.readInt32(this.bb_pos + 2216);
+  }
+  f(index, obj) {
+    return (obj || new OuterStruct())
+        .__init(this.bb_pos + 2224 + index * 208, this.bb);
+  }
+  g(index) {
+    return this.bb.readInt64(this.bb_pos + 2640 + index * 8);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.ArrayStruct';
+  }
+  static sizeOf() {
+    return 2656;
+  }
+  static createArrayStruct(builder, a_underscore, b_underscore, c, d, e, f, g) {
+    builder.prep(8, 2656);
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt64(BigInt(g?.[i] ?? 0));
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    for (let i = 1; i >= 0; --i) {
+      const item = f?.[i];
+      if (item instanceof OuterStructT) {
+        item.pack(builder);
+        continue;
+      }
+      OuterStruct.createOuterStruct(
+          builder, item?.a, item?.b, (item?.cUnderscore?.a ?? 0),
+          (item?.cUnderscore?.b ?? []), (item?.cUnderscore?.c ?? 0),
+          (item?.cUnderscore?.dUnderscore ?? BigInt(0)), item?.d,
+          (item?.e?.a ?? 0), (item?.e?.b ?? []), (item?.e?.c ?? 0),
+          (item?.e?.dUnderscore ?? BigInt(0)), item?.f);
     }
-    aUnderscore() {
-        return this.bb.readFloat32(this.bb_pos);
+    builder.pad(4);
+    builder.writeInt32(e);
+    for (let i = 1; i >= 0; --i) {
+      const item = d?.[i];
+      if (item instanceof NestedStructT) {
+        item.pack(builder);
+        continue;
+      }
+      NestedStruct.createNestedStruct(
+          builder, item?.a, item?.b, item?.cUnderscore, item?.dOuter, item?.e);
     }
-    bUnderscore(index) {
-        return this.bb.readInt32(this.bb_pos + 4 + index * 4);
+    builder.pad(7);
+    builder.writeInt8(c);
+    for (let i = 14; i >= 0; --i) {
+      builder.writeInt32((b_underscore?.[i] ?? 0));
     }
-    c() {
-        return this.bb.readInt8(this.bb_pos + 64);
-    }
-    d(index, obj) {
-        return (obj || new NestedStruct()).__init(this.bb_pos + 72 + index * 1072, this.bb);
-    }
-    e() {
-        return this.bb.readInt32(this.bb_pos + 2216);
-    }
-    f(index, obj) {
-        return (obj || new OuterStruct()).__init(this.bb_pos + 2224 + index * 208, this.bb);
-    }
-    g(index) {
-        return this.bb.readInt64(this.bb_pos + 2640 + index * 8);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.ArrayStruct';
-    }
-    static sizeOf() {
-        return 2656;
-    }
-    static createArrayStruct(builder, a_underscore, b_underscore, c, d, e, f, g) {
-        builder.prep(8, 2656);
-        for (let i = 1; i >= 0; --i) {
-            builder.writeInt64(BigInt(g?.[i] ?? 0));
-        }
-        for (let i = 1; i >= 0; --i) {
-            const item = f?.[i];
-            if (item instanceof OuterStructT) {
-                item.pack(builder);
-                continue;
-            }
-            OuterStruct.createOuterStruct(builder, item?.a, item?.b, (item?.cUnderscore?.a ?? 0), (item?.cUnderscore?.b ?? []), (item?.cUnderscore?.c ?? 0), (item?.cUnderscore?.dUnderscore ?? BigInt(0)), item?.d, (item?.e?.a ?? 0), (item?.e?.b ?? []), (item?.e?.c ?? 0), (item?.e?.dUnderscore ?? BigInt(0)), item?.f);
-        }
-        builder.pad(4);
-        builder.writeInt32(e);
-        for (let i = 1; i >= 0; --i) {
-            const item = d?.[i];
-            if (item instanceof NestedStructT) {
-                item.pack(builder);
-                continue;
-            }
-            NestedStruct.createNestedStruct(builder, item?.a, item?.b, item?.cUnderscore, item?.dOuter, item?.e);
-        }
-        builder.pad(7);
-        builder.writeInt8(c);
-        for (let i = 14; i >= 0; --i) {
-            builder.writeInt32((b_underscore?.[i] ?? 0));
-        }
-        builder.writeFloat32(a_underscore);
-        return builder.offset();
-    }
-    unpack() {
-        return new ArrayStructT(this.aUnderscore(), this.bb.createScalarList(this.bUnderscore.bind(this), 15), this.c(), this.bb.createObjList(this.d.bind(this), 2), this.e(), this.bb.createObjList(this.f.bind(this), 2), this.bb.createScalarList(this.g.bind(this), 2));
-    }
-    unpackTo(_o) {
-        _o.aUnderscore = this.aUnderscore();
-        _o.bUnderscore = this.bb.createScalarList(this.bUnderscore.bind(this), 15);
-        _o.c = this.c();
-        _o.d = this.bb.createObjList(this.d.bind(this), 2);
-        _o.e = this.e();
-        _o.f = this.bb.createObjList(this.f.bind(this), 2);
-        _o.g = this.bb.createScalarList(this.g.bind(this), 2);
-    }
+    builder.writeFloat32(a_underscore);
+    return builder.offset();
+  }
+  unpack() {
+    return new ArrayStructT(
+        this.aUnderscore(),
+        this.bb.createScalarList(this.bUnderscore.bind(this), 15), this.c(),
+        this.bb.createObjList(this.d.bind(this), 2), this.e(),
+        this.bb.createObjList(this.f.bind(this), 2),
+        this.bb.createScalarList(this.g.bind(this), 2));
+  }
+  unpackTo(_o) {
+    _o.aUnderscore = this.aUnderscore();
+    _o.bUnderscore = this.bb.createScalarList(this.bUnderscore.bind(this), 15);
+    _o.c = this.c();
+    _o.d = this.bb.createObjList(this.d.bind(this), 2);
+    _o.e = this.e();
+    _o.f = this.bb.createObjList(this.f.bind(this), 2);
+    _o.g = this.bb.createScalarList(this.g.bind(this), 2);
+  }
 }
 export class ArrayStructT {
-    constructor(aUnderscore = 0.0, bUnderscore = [], c = 0, d = [], e = 0, f = [], g = []) {
-        this.aUnderscore = aUnderscore;
-        this.bUnderscore = bUnderscore;
-        this.c = c;
-        this.d = d;
-        this.e = e;
-        this.f = f;
-        this.g = g;
-    }
-    pack(builder) {
-        return ArrayStruct.createArrayStruct(builder, this.aUnderscore, this.bUnderscore, this.c, this.d, this.e, this.f, this.g);
-    }
+  constructor(
+      aUnderscore = 0.0, bUnderscore = [], c = 0, d = [], e = 0, f = [],
+      g = []) {
+    this.aUnderscore = aUnderscore;
+    this.bUnderscore = bUnderscore;
+    this.c = c;
+    this.d = d;
+    this.e = e;
+    this.f = f;
+    this.g = g;
+  }
+  pack(builder) {
+    return ArrayStruct.createArrayStruct(
+        builder, this.aUnderscore, this.bUnderscore, this.c, this.d, this.e,
+        this.f, this.g);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-struct.ts b/tests/ts/arrays_test_complex/my-game/example/array-struct.ts
index 6d54244..bfb65df 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-struct.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/array-struct.ts
@@ -4,165 +4,191 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { NestedStruct, NestedStructT } from '../../my-game/example/nested-struct.js';
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
+import {
+  NestedStruct,
+  NestedStructT,
+} from '../../my-game/example/nested-struct.js';
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
 
-
-export class ArrayStruct implements flatbuffers.IUnpackableObject<ArrayStructT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+export class ArrayStruct
+  implements flatbuffers.IUnpackableObject<ArrayStructT>
+{
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):ArrayStruct {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): ArrayStruct {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-aUnderscore():number {
-  return this.bb!.readFloat32(this.bb_pos);
-}
+  aUnderscore(): number {
+    return this.bb!.readFloat32(this.bb_pos);
+  }
 
-bUnderscore(index: number):number|null {
+  bUnderscore(index: number): number | null {
     return this.bb!.readInt32(this.bb_pos + 4 + index * 4);
-}
+  }
 
-c():number {
-  return this.bb!.readInt8(this.bb_pos + 64);
-}
+  c(): number {
+    return this.bb!.readInt8(this.bb_pos + 64);
+  }
 
-d(index: number, obj?:NestedStruct):NestedStruct|null {
-    return (obj || new NestedStruct()).__init(this.bb_pos + 72 + index * 1072, this.bb!);
-}
+  d(index: number, obj?: NestedStruct): NestedStruct | null {
+    return (obj || new NestedStruct()).__init(
+      this.bb_pos + 72 + index * 1072,
+      this.bb!,
+    );
+  }
 
-e():number {
-  return this.bb!.readInt32(this.bb_pos + 2216);
-}
+  e(): number {
+    return this.bb!.readInt32(this.bb_pos + 2216);
+  }
 
-f(index: number, obj?:OuterStruct):OuterStruct|null {
-    return (obj || new OuterStruct()).__init(this.bb_pos + 2224 + index * 208, this.bb!);
-}
+  f(index: number, obj?: OuterStruct): OuterStruct | null {
+    return (obj || new OuterStruct()).__init(
+      this.bb_pos + 2224 + index * 208,
+      this.bb!,
+    );
+  }
 
-g(index: number):bigint|null {
+  g(index: number): bigint | null {
     return this.bb!.readInt64(this.bb_pos + 2640 + index * 8);
-}
-
-static getFullyQualifiedName():string {
-  return 'MyGame.Example.ArrayStruct';
-}
-
-static sizeOf():number {
-  return 2656;
-}
-
-static createArrayStruct(builder:flatbuffers.Builder, a_underscore: number, b_underscore: number[]|null, c: number, d: (any|NestedStructT)[]|null, e: number, f: (any|OuterStructT)[]|null, g: bigint[]|null):flatbuffers.Offset {
-  builder.prep(8, 2656);
-
-  for (let i = 1; i >= 0; --i) {
-    builder.writeInt64(BigInt(g?.[i] ?? 0));
   }
 
+  static getFullyQualifiedName(): string {
+    return 'MyGame.Example.ArrayStruct';
+  }
 
-  for (let i = 1; i >= 0; --i) {
-    const item = f?.[i];
+  static sizeOf(): number {
+    return 2656;
+  }
 
-    if (item instanceof OuterStructT) {
-      item.pack(builder);
-      continue;
+  static createArrayStruct(
+    builder: flatbuffers.Builder,
+    a_underscore: number,
+    b_underscore: number[] | null,
+    c: number,
+    d: (any | NestedStructT)[] | null,
+    e: number,
+    f: (any | OuterStructT)[] | null,
+    g: bigint[] | null,
+  ): flatbuffers.Offset {
+    builder.prep(8, 2656);
+
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt64(BigInt(g?.[i] ?? 0));
     }
 
-    OuterStruct.createOuterStruct(builder,
-    item?.a,
-    item?.b,
-    (item?.cUnderscore?.a ?? 0),
-    (item?.cUnderscore?.b ?? []),
-    (item?.cUnderscore?.c ?? 0),
-    (item?.cUnderscore?.dUnderscore ?? BigInt(0)),
-    item?.d,
-    (item?.e?.a ?? 0),
-    (item?.e?.b ?? []),
-    (item?.e?.c ?? 0),
-    (item?.e?.dUnderscore ?? BigInt(0)),
-    item?.f
+    for (let i = 1; i >= 0; --i) {
+      const item = f?.[i];
+
+      if (item instanceof OuterStructT) {
+        item.pack(builder);
+        continue;
+      }
+
+      OuterStruct.createOuterStruct(
+        builder,
+        item?.a,
+        item?.b,
+        item?.cUnderscore?.a ?? 0,
+        item?.cUnderscore?.b ?? [],
+        item?.cUnderscore?.c ?? 0,
+        item?.cUnderscore?.dUnderscore ?? BigInt(0),
+        item?.d,
+        item?.e?.a ?? 0,
+        item?.e?.b ?? [],
+        item?.e?.c ?? 0,
+        item?.e?.dUnderscore ?? BigInt(0),
+        item?.f,
+      );
+    }
+
+    builder.pad(4);
+    builder.writeInt32(e);
+
+    for (let i = 1; i >= 0; --i) {
+      const item = d?.[i];
+
+      if (item instanceof NestedStructT) {
+        item.pack(builder);
+        continue;
+      }
+
+      NestedStruct.createNestedStruct(
+        builder,
+        item?.a,
+        item?.b,
+        item?.cUnderscore,
+        item?.dOuter,
+        item?.e,
+      );
+    }
+
+    builder.pad(7);
+    builder.writeInt8(c);
+
+    for (let i = 14; i >= 0; --i) {
+      builder.writeInt32(b_underscore?.[i] ?? 0);
+    }
+
+    builder.writeFloat32(a_underscore);
+    return builder.offset();
+  }
+
+  unpack(): ArrayStructT {
+    return new ArrayStructT(
+      this.aUnderscore(),
+      this.bb!.createScalarList<number>(this.bUnderscore.bind(this), 15),
+      this.c(),
+      this.bb!.createObjList<NestedStruct, NestedStructT>(this.d.bind(this), 2),
+      this.e(),
+      this.bb!.createObjList<OuterStruct, OuterStructT>(this.f.bind(this), 2),
+      this.bb!.createScalarList<bigint>(this.g.bind(this), 2),
     );
   }
 
-  builder.pad(4);
-  builder.writeInt32(e);
-
-  for (let i = 1; i >= 0; --i) {
-    const item = d?.[i];
-
-    if (item instanceof NestedStructT) {
-      item.pack(builder);
-      continue;
-    }
-
-    NestedStruct.createNestedStruct(builder,
-    item?.a,
-    item?.b,
-    item?.cUnderscore,
-    item?.dOuter,
-    item?.e
+  unpackTo(_o: ArrayStructT): void {
+    _o.aUnderscore = this.aUnderscore();
+    _o.bUnderscore = this.bb!.createScalarList<number>(
+      this.bUnderscore.bind(this),
+      15,
     );
+    _o.c = this.c();
+    _o.d = this.bb!.createObjList<NestedStruct, NestedStructT>(
+      this.d.bind(this),
+      2,
+    );
+    _o.e = this.e();
+    _o.f = this.bb!.createObjList<OuterStruct, OuterStructT>(
+      this.f.bind(this),
+      2,
+    );
+    _o.g = this.bb!.createScalarList<bigint>(this.g.bind(this), 2);
   }
-
-  builder.pad(7);
-  builder.writeInt8(c);
-
-  for (let i = 14; i >= 0; --i) {
-    builder.writeInt32((b_underscore?.[i] ?? 0));
-
-  }
-
-  builder.writeFloat32(a_underscore);
-  return builder.offset();
-}
-
-
-unpack(): ArrayStructT {
-  return new ArrayStructT(
-    this.aUnderscore(),
-    this.bb!.createScalarList<number>(this.bUnderscore.bind(this), 15),
-    this.c(),
-    this.bb!.createObjList<NestedStruct, NestedStructT>(this.d.bind(this), 2),
-    this.e(),
-    this.bb!.createObjList<OuterStruct, OuterStructT>(this.f.bind(this), 2),
-    this.bb!.createScalarList<bigint>(this.g.bind(this), 2)
-  );
-}
-
-
-unpackTo(_o: ArrayStructT): void {
-  _o.aUnderscore = this.aUnderscore();
-  _o.bUnderscore = this.bb!.createScalarList<number>(this.bUnderscore.bind(this), 15);
-  _o.c = this.c();
-  _o.d = this.bb!.createObjList<NestedStruct, NestedStructT>(this.d.bind(this), 2);
-  _o.e = this.e();
-  _o.f = this.bb!.createObjList<OuterStruct, OuterStructT>(this.f.bind(this), 2);
-  _o.g = this.bb!.createScalarList<bigint>(this.g.bind(this), 2);
-}
 }
 
 export class ArrayStructT implements flatbuffers.IGeneratedObject {
-constructor(
-  public aUnderscore: number = 0.0,
-  public bUnderscore: (number)[] = [],
-  public c: number = 0,
-  public d: (NestedStructT)[] = [],
-  public e: number = 0,
-  public f: (OuterStructT)[] = [],
-  public g: (bigint)[] = []
-){}
+  constructor(
+    public aUnderscore: number = 0.0,
+    public bUnderscore: number[] = [],
+    public c: number = 0,
+    public d: NestedStructT[] = [],
+    public e: number = 0,
+    public f: OuterStructT[] = [],
+    public g: bigint[] = [],
+  ) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return ArrayStruct.createArrayStruct(builder,
-    this.aUnderscore,
-    this.bUnderscore,
-    this.c,
-    this.d,
-    this.e,
-    this.f,
-    this.g
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return ArrayStruct.createArrayStruct(
+      builder,
+      this.aUnderscore,
+      this.bUnderscore,
+      this.c,
+      this.d,
+      this.e,
+      this.f,
+      this.g,
+    );
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-table.d.ts b/tests/ts/arrays_test_complex/my-game/example/array-table.d.ts
index d4ddd06..86668d9 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-table.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/array-table.d.ts
@@ -1,28 +1,48 @@
 import * as flatbuffers from 'flatbuffers';
-import { ArrayStruct, ArrayStructT } from '../../my-game/example/array-struct.js';
-export declare class ArrayTable implements flatbuffers.IUnpackableObject<ArrayTableT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): ArrayTable;
-    static getRootAsArrayTable(bb: flatbuffers.ByteBuffer, obj?: ArrayTable): ArrayTable;
-    static getSizePrefixedRootAsArrayTable(bb: flatbuffers.ByteBuffer, obj?: ArrayTable): ArrayTable;
-    static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
-    a(): string | null;
-    a(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    cUnderscore(obj?: ArrayStruct): ArrayStruct | null;
-    static getFullyQualifiedName(): string;
-    static startArrayTable(builder: flatbuffers.Builder): void;
-    static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset): void;
-    static addCUnderscore(builder: flatbuffers.Builder, cUnderscoreOffset: flatbuffers.Offset): void;
-    static endArrayTable(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishArrayTableBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedArrayTableBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    unpack(): ArrayTableT;
-    unpackTo(_o: ArrayTableT): void;
+import {ArrayStruct, ArrayStructT} from '../../my-game/example/array-struct.js';
+export declare class ArrayTable
+  implements flatbuffers.IUnpackableObject<ArrayTableT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): ArrayTable;
+  static getRootAsArrayTable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ArrayTable,
+  ): ArrayTable;
+  static getSizePrefixedRootAsArrayTable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ArrayTable,
+  ): ArrayTable;
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
+  a(): string | null;
+  a(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  cUnderscore(obj?: ArrayStruct): ArrayStruct | null;
+  static getFullyQualifiedName(): string;
+  static startArrayTable(builder: flatbuffers.Builder): void;
+  static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset): void;
+  static addCUnderscore(
+    builder: flatbuffers.Builder,
+    cUnderscoreOffset: flatbuffers.Offset,
+  ): void;
+  static endArrayTable(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishArrayTableBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedArrayTableBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  unpack(): ArrayTableT;
+  unpackTo(_o: ArrayTableT): void;
 }
 export declare class ArrayTableT implements flatbuffers.IGeneratedObject {
-    a: string | Uint8Array | null;
-    cUnderscore: ArrayStructT | null;
-    constructor(a?: string | Uint8Array | null, cUnderscore?: ArrayStructT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: string | Uint8Array | null;
+  cUnderscore: ArrayStructT | null;
+  constructor(
+    a?: string | Uint8Array | null,
+    cUnderscore?: ArrayStructT | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-table.js b/tests/ts/arrays_test_complex/my-game/example/array-table.js
index 9dc6ffd..01457b7 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-table.js
+++ b/tests/ts/arrays_test_complex/my-game/example/array-table.js
@@ -1,75 +1,88 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { ArrayStruct } from '../../my-game/example/array-struct.js';
+
+import {ArrayStruct} from '../../my-game/example/array-struct.js';
+
 export class ArrayTable {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsArrayTable(bb, obj) {
-        return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsArrayTable(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static bufferHasIdentifier(bb) {
-        return bb.__has_identifier('RHUB');
-    }
-    a(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    cUnderscore(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.ArrayTable';
-    }
-    static startArrayTable(builder) {
-        builder.startObject(2);
-    }
-    static addA(builder, aOffset) {
-        builder.addFieldOffset(0, aOffset, 0);
-    }
-    static addCUnderscore(builder, cUnderscoreOffset) {
-        builder.addFieldStruct(1, cUnderscoreOffset, 0);
-    }
-    static endArrayTable(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static finishArrayTableBuffer(builder, offset) {
-        builder.finish(offset, 'RHUB');
-    }
-    static finishSizePrefixedArrayTableBuffer(builder, offset) {
-        builder.finish(offset, 'RHUB', true);
-    }
-    unpack() {
-        return new ArrayTableT(this.a(), (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-        _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsArrayTable(bb, obj) {
+    return (obj || new ArrayTable())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsArrayTable(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new ArrayTable())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static bufferHasIdentifier(bb) {
+    return bb.__has_identifier('RHUB');
+  }
+  a(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  cUnderscore(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb) :
+        null;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.ArrayTable';
+  }
+  static startArrayTable(builder) {
+    builder.startObject(2);
+  }
+  static addA(builder, aOffset) {
+    builder.addFieldOffset(0, aOffset, 0);
+  }
+  static addCUnderscore(builder, cUnderscoreOffset) {
+    builder.addFieldStruct(1, cUnderscoreOffset, 0);
+  }
+  static endArrayTable(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static finishArrayTableBuffer(builder, offset) {
+    builder.finish(offset, 'RHUB');
+  }
+  static finishSizePrefixedArrayTableBuffer(builder, offset) {
+    builder.finish(offset, 'RHUB', true);
+  }
+  unpack() {
+    return new ArrayTableT(
+        this.a(),
+        (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+    _o.cUnderscore =
+        (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null);
+  }
 }
 export class ArrayTableT {
-    constructor(a = null, cUnderscore = null) {
-        this.a = a;
-        this.cUnderscore = cUnderscore;
-    }
-    pack(builder) {
-        const a = (this.a !== null ? builder.createString(this.a) : 0);
-        ArrayTable.startArrayTable(builder);
-        ArrayTable.addA(builder, a);
-        ArrayTable.addCUnderscore(builder, (this.cUnderscore !== null ? this.cUnderscore.pack(builder) : 0));
-        return ArrayTable.endArrayTable(builder);
-    }
+  constructor(a = null, cUnderscore = null) {
+    this.a = a;
+    this.cUnderscore = cUnderscore;
+  }
+  pack(builder) {
+    const a = (this.a !== null ? builder.createString(this.a) : 0);
+    ArrayTable.startArrayTable(builder);
+    ArrayTable.addA(builder, a);
+    ArrayTable.addCUnderscore(
+        builder,
+        (this.cUnderscore !== null ? this.cUnderscore.pack(builder) : 0));
+    return ArrayTable.endArrayTable(builder);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/array-table.ts b/tests/ts/arrays_test_complex/my-game/example/array-table.ts
index ef94eaa..1128fc3 100644
--- a/tests/ts/arrays_test_complex/my-game/example/array-table.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/array-table.ts
@@ -4,101 +4,126 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { ArrayStruct, ArrayStructT } from '../../my-game/example/array-struct.js';
-
+import {ArrayStruct, ArrayStructT} from '../../my-game/example/array-struct.js';
 
 export class ArrayTable implements flatbuffers.IUnpackableObject<ArrayTableT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):ArrayTable {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): ArrayTable {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsArrayTable(bb:flatbuffers.ByteBuffer, obj?:ArrayTable):ArrayTable {
-  return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsArrayTable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ArrayTable,
+  ): ArrayTable {
+    return (obj || new ArrayTable()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsArrayTable(bb:flatbuffers.ByteBuffer, obj?:ArrayTable):ArrayTable {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsArrayTable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ArrayTable,
+  ): ArrayTable {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new ArrayTable()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
-  return bb.__has_identifier('RHUB');
-}
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean {
+    return bb.__has_identifier('RHUB');
+  }
 
-a():string|null
-a(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-a(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  a(): string | null;
+  a(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  a(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-cUnderscore(obj?:ArrayStruct):ArrayStruct|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb!) : null;
-}
+  cUnderscore(obj?: ArrayStruct): ArrayStruct | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb!)
+      : null;
+  }
 
-static getFullyQualifiedName():string {
-  return 'MyGame.Example.ArrayTable';
-}
+  static getFullyQualifiedName(): string {
+    return 'MyGame.Example.ArrayTable';
+  }
 
-static startArrayTable(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
+  static startArrayTable(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
 
-static addA(builder:flatbuffers.Builder, aOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, aOffset, 0);
-}
+  static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, aOffset, 0);
+  }
 
-static addCUnderscore(builder:flatbuffers.Builder, cUnderscoreOffset:flatbuffers.Offset) {
-  builder.addFieldStruct(1, cUnderscoreOffset, 0);
-}
+  static addCUnderscore(
+    builder: flatbuffers.Builder,
+    cUnderscoreOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldStruct(1, cUnderscoreOffset, 0);
+  }
 
-static endArrayTable(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endArrayTable(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static finishArrayTableBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'RHUB');
-}
+  static finishArrayTableBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'RHUB');
+  }
 
-static finishSizePrefixedArrayTableBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'RHUB', true);
-}
+  static finishSizePrefixedArrayTableBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'RHUB', true);
+  }
 
+  unpack(): ArrayTableT {
+    return new ArrayTableT(
+      this.a(),
+      this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null,
+    );
+  }
 
-unpack(): ArrayTableT {
-  return new ArrayTableT(
-    this.a(),
-    (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null)
-  );
-}
-
-
-unpackTo(_o: ArrayTableT): void {
-  _o.a = this.a();
-  _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null);
-}
+  unpackTo(_o: ArrayTableT): void {
+    _o.a = this.a();
+    _o.cUnderscore =
+      this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null;
+  }
 }
 
 export class ArrayTableT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: string|Uint8Array|null = null,
-  public cUnderscore: ArrayStructT|null = null
-){}
+  constructor(
+    public a: string | Uint8Array | null = null,
+    public cUnderscore: ArrayStructT | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const a = this.a !== null ? builder.createString(this.a!) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const a = (this.a !== null ? builder.createString(this.a!) : 0);
+    ArrayTable.startArrayTable(builder);
+    ArrayTable.addA(builder, a);
+    ArrayTable.addCUnderscore(
+      builder,
+      this.cUnderscore !== null ? this.cUnderscore!.pack(builder) : 0,
+    );
 
-  ArrayTable.startArrayTable(builder);
-  ArrayTable.addA(builder, a);
-  ArrayTable.addCUnderscore(builder, (this.cUnderscore !== null ? this.cUnderscore!.pack(builder) : 0));
-
-  return ArrayTable.endArrayTable(builder);
-}
+    return ArrayTable.endArrayTable(builder);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/inner-struct.d.ts b/tests/ts/arrays_test_complex/my-game/example/inner-struct.d.ts
index a54d02b..b1a47ea 100644
--- a/tests/ts/arrays_test_complex/my-game/example/inner-struct.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/inner-struct.d.ts
@@ -1,23 +1,31 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class InnerStruct implements flatbuffers.IUnpackableObject<InnerStructT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): InnerStruct;
-    a(): number;
-    b(index: number): number | null;
-    c(): number;
-    dUnderscore(): bigint;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createInnerStruct(builder: flatbuffers.Builder, a: number, b: number[] | null, c: number, d_underscore: bigint): flatbuffers.Offset;
-    unpack(): InnerStructT;
-    unpackTo(_o: InnerStructT): void;
+export declare class InnerStruct
+  implements flatbuffers.IUnpackableObject<InnerStructT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): InnerStruct;
+  a(): number;
+  b(index: number): number | null;
+  c(): number;
+  dUnderscore(): bigint;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createInnerStruct(
+    builder: flatbuffers.Builder,
+    a: number,
+    b: number[] | null,
+    c: number,
+    d_underscore: bigint,
+  ): flatbuffers.Offset;
+  unpack(): InnerStructT;
+  unpackTo(_o: InnerStructT): void;
 }
 export declare class InnerStructT implements flatbuffers.IGeneratedObject {
-    a: number;
-    b: (number)[];
-    c: number;
-    dUnderscore: bigint;
-    constructor(a?: number, b?: (number)[], c?: number, dUnderscore?: bigint);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: number;
+  b: number[];
+  c: number;
+  dUnderscore: bigint;
+  constructor(a?: number, b?: number[], c?: number, dUnderscore?: bigint);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/inner-struct.js b/tests/ts/arrays_test_complex/my-game/example/inner-struct.js
index e8ed973..4af8c1e 100644
--- a/tests/ts/arrays_test_complex/my-game/example/inner-struct.js
+++ b/tests/ts/arrays_test_complex/my-game/example/inner-struct.js
@@ -1,61 +1,64 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class InnerStruct {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a() {
+    return this.bb.readFloat64(this.bb_pos);
+  }
+  b(index) {
+    return this.bb.readUint8(this.bb_pos + 8 + index);
+  }
+  c() {
+    return this.bb.readInt8(this.bb_pos + 21);
+  }
+  dUnderscore() {
+    return this.bb.readInt64(this.bb_pos + 24);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.InnerStruct';
+  }
+  static sizeOf() {
+    return 32;
+  }
+  static createInnerStruct(builder, a, b, c, d_underscore) {
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(c);
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8((b?.[i] ?? 0));
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    a() {
-        return this.bb.readFloat64(this.bb_pos);
-    }
-    b(index) {
-        return this.bb.readUint8(this.bb_pos + 8 + index);
-    }
-    c() {
-        return this.bb.readInt8(this.bb_pos + 21);
-    }
-    dUnderscore() {
-        return this.bb.readInt64(this.bb_pos + 24);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.InnerStruct';
-    }
-    static sizeOf() {
-        return 32;
-    }
-    static createInnerStruct(builder, a, b, c, d_underscore) {
-        builder.prep(8, 32);
-        builder.writeInt64(BigInt(d_underscore ?? 0));
-        builder.pad(2);
-        builder.writeInt8(c);
-        for (let i = 12; i >= 0; --i) {
-            builder.writeInt8((b?.[i] ?? 0));
-        }
-        builder.writeFloat64(a);
-        return builder.offset();
-    }
-    unpack() {
-        return new InnerStructT(this.a(), this.bb.createScalarList(this.b.bind(this), 13), this.c(), this.dUnderscore());
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-        _o.b = this.bb.createScalarList(this.b.bind(this), 13);
-        _o.c = this.c();
-        _o.dUnderscore = this.dUnderscore();
-    }
+    builder.writeFloat64(a);
+    return builder.offset();
+  }
+  unpack() {
+    return new InnerStructT(
+        this.a(), this.bb.createScalarList(this.b.bind(this), 13), this.c(),
+        this.dUnderscore());
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+    _o.b = this.bb.createScalarList(this.b.bind(this), 13);
+    _o.c = this.c();
+    _o.dUnderscore = this.dUnderscore();
+  }
 }
 export class InnerStructT {
-    constructor(a = 0.0, b = [], c = 0, dUnderscore = BigInt('0')) {
-        this.a = a;
-        this.b = b;
-        this.c = c;
-        this.dUnderscore = dUnderscore;
-    }
-    pack(builder) {
-        return InnerStruct.createInnerStruct(builder, this.a, this.b, this.c, this.dUnderscore);
-    }
+  constructor(a = 0.0, b = [], c = 0, dUnderscore = BigInt('0')) {
+    this.a = a;
+    this.b = b;
+    this.c = c;
+    this.dUnderscore = dUnderscore;
+  }
+  pack(builder) {
+    return InnerStruct.createInnerStruct(
+        builder, this.a, this.b, this.c, this.dUnderscore);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/inner-struct.ts b/tests/ts/arrays_test_complex/my-game/example/inner-struct.ts
index cff7a58..dcc0e29 100644
--- a/tests/ts/arrays_test_complex/my-game/example/inner-struct.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/inner-struct.ts
@@ -4,90 +4,93 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
-export class InnerStruct implements flatbuffers.IUnpackableObject<InnerStructT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+export class InnerStruct
+  implements flatbuffers.IUnpackableObject<InnerStructT>
+{
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):InnerStruct {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-a():number {
-  return this.bb!.readFloat64(this.bb_pos);
-}
-
-b(index: number):number|null {
-    return this.bb!.readUint8(this.bb_pos + 8 + index);
-}
-
-c():number {
-  return this.bb!.readInt8(this.bb_pos + 21);
-}
-
-dUnderscore():bigint {
-  return this.bb!.readInt64(this.bb_pos + 24);
-}
-
-static getFullyQualifiedName():string {
-  return 'MyGame.Example.InnerStruct';
-}
-
-static sizeOf():number {
-  return 32;
-}
-
-static createInnerStruct(builder:flatbuffers.Builder, a: number, b: number[]|null, c: number, d_underscore: bigint):flatbuffers.Offset {
-  builder.prep(8, 32);
-  builder.writeInt64(BigInt(d_underscore ?? 0));
-  builder.pad(2);
-  builder.writeInt8(c);
-
-  for (let i = 12; i >= 0; --i) {
-    builder.writeInt8((b?.[i] ?? 0));
-
+  __init(i: number, bb: flatbuffers.ByteBuffer): InnerStruct {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  builder.writeFloat64(a);
-  return builder.offset();
-}
+  a(): number {
+    return this.bb!.readFloat64(this.bb_pos);
+  }
 
+  b(index: number): number | null {
+    return this.bb!.readUint8(this.bb_pos + 8 + index);
+  }
 
-unpack(): InnerStructT {
-  return new InnerStructT(
-    this.a(),
-    this.bb!.createScalarList<number>(this.b.bind(this), 13),
-    this.c(),
-    this.dUnderscore()
-  );
-}
+  c(): number {
+    return this.bb!.readInt8(this.bb_pos + 21);
+  }
 
+  dUnderscore(): bigint {
+    return this.bb!.readInt64(this.bb_pos + 24);
+  }
 
-unpackTo(_o: InnerStructT): void {
-  _o.a = this.a();
-  _o.b = this.bb!.createScalarList<number>(this.b.bind(this), 13);
-  _o.c = this.c();
-  _o.dUnderscore = this.dUnderscore();
-}
+  static getFullyQualifiedName(): string {
+    return 'MyGame.Example.InnerStruct';
+  }
+
+  static sizeOf(): number {
+    return 32;
+  }
+
+  static createInnerStruct(
+    builder: flatbuffers.Builder,
+    a: number,
+    b: number[] | null,
+    c: number,
+    d_underscore: bigint,
+  ): flatbuffers.Offset {
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(c);
+
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8(b?.[i] ?? 0);
+    }
+
+    builder.writeFloat64(a);
+    return builder.offset();
+  }
+
+  unpack(): InnerStructT {
+    return new InnerStructT(
+      this.a(),
+      this.bb!.createScalarList<number>(this.b.bind(this), 13),
+      this.c(),
+      this.dUnderscore(),
+    );
+  }
+
+  unpackTo(_o: InnerStructT): void {
+    _o.a = this.a();
+    _o.b = this.bb!.createScalarList<number>(this.b.bind(this), 13);
+    _o.c = this.c();
+    _o.dUnderscore = this.dUnderscore();
+  }
 }
 
 export class InnerStructT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: number = 0.0,
-  public b: (number)[] = [],
-  public c: number = 0,
-  public dUnderscore: bigint = BigInt('0')
-){}
+  constructor(
+    public a: number = 0.0,
+    public b: number[] = [],
+    public c: number = 0,
+    public dUnderscore: bigint = BigInt('0'),
+  ) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return InnerStruct.createInnerStruct(builder,
-    this.a,
-    this.b,
-    this.c,
-    this.dUnderscore
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return InnerStruct.createInnerStruct(
+      builder,
+      this.a,
+      this.b,
+      this.c,
+      this.dUnderscore,
+    );
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/nested-struct.d.ts b/tests/ts/arrays_test_complex/my-game/example/nested-struct.d.ts
index 98fe48d..8e3faca 100644
--- a/tests/ts/arrays_test_complex/my-game/example/nested-struct.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/nested-struct.d.ts
@@ -1,27 +1,42 @@
 import * as flatbuffers from 'flatbuffers';
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
-import { TestEnum } from '../../my-game/example/test-enum.js';
-export declare class NestedStruct implements flatbuffers.IUnpackableObject<NestedStructT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): NestedStruct;
-    a(index: number): number | null;
-    b(): TestEnum;
-    cUnderscore(index: number): TestEnum | null;
-    dOuter(index: number, obj?: OuterStruct): OuterStruct | null;
-    e(index: number): bigint | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createNestedStruct(builder: flatbuffers.Builder, a: number[] | null, b: TestEnum, c_underscore: number[] | null, d_outer: (any | OuterStructT)[] | null, e: bigint[] | null): flatbuffers.Offset;
-    unpack(): NestedStructT;
-    unpackTo(_o: NestedStructT): void;
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
+import {TestEnum} from '../../my-game/example/test-enum.js';
+export declare class NestedStruct
+  implements flatbuffers.IUnpackableObject<NestedStructT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): NestedStruct;
+  a(index: number): number | null;
+  b(): TestEnum;
+  cUnderscore(index: number): TestEnum | null;
+  dOuter(index: number, obj?: OuterStruct): OuterStruct | null;
+  e(index: number): bigint | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createNestedStruct(
+    builder: flatbuffers.Builder,
+    a: number[] | null,
+    b: TestEnum,
+    c_underscore: number[] | null,
+    d_outer: (any | OuterStructT)[] | null,
+    e: bigint[] | null,
+  ): flatbuffers.Offset;
+  unpack(): NestedStructT;
+  unpackTo(_o: NestedStructT): void;
 }
 export declare class NestedStructT implements flatbuffers.IGeneratedObject {
-    a: (number)[];
-    b: TestEnum;
-    cUnderscore: (TestEnum)[];
-    dOuter: (OuterStructT)[];
-    e: (bigint)[];
-    constructor(a?: (number)[], b?: TestEnum, cUnderscore?: (TestEnum)[], dOuter?: (OuterStructT)[], e?: (bigint)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: number[];
+  b: TestEnum;
+  cUnderscore: TestEnum[];
+  dOuter: OuterStructT[];
+  e: bigint[];
+  constructor(
+    a?: number[],
+    b?: TestEnum,
+    cUnderscore?: TestEnum[],
+    dOuter?: OuterStructT[],
+    e?: bigint[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/nested-struct.js b/tests/ts/arrays_test_complex/my-game/example/nested-struct.js
index 0670617..4c57081 100644
--- a/tests/ts/arrays_test_complex/my-game/example/nested-struct.js
+++ b/tests/ts/arrays_test_complex/my-game/example/nested-struct.js
@@ -1,80 +1,93 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
-import { TestEnum } from '../../my-game/example/test-enum.js';
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
+import {TestEnum} from '../../my-game/example/test-enum.js';
 export class NestedStruct {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a(index) {
+    return this.bb.readInt32(this.bb_pos + 0 + index * 4);
+  }
+  b() {
+    return this.bb.readInt8(this.bb_pos + 8);
+  }
+  cUnderscore(index) {
+    return this.bb.readInt8(this.bb_pos + 9 + index);
+  }
+  dOuter(index, obj) {
+    return (obj || new OuterStruct())
+        .__init(this.bb_pos + 16 + index * 208, this.bb);
+  }
+  e(index) {
+    return this.bb.readInt64(this.bb_pos + 1056 + index * 8);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.NestedStruct';
+  }
+  static sizeOf() {
+    return 1072;
+  }
+  static createNestedStruct(builder, a, b, c_underscore, d_outer, e) {
+    builder.prep(8, 1072);
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt64(BigInt(e?.[i] ?? 0));
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    for (let i = 4; i >= 0; --i) {
+      const item = d_outer?.[i];
+      if (item instanceof OuterStructT) {
+        item.pack(builder);
+        continue;
+      }
+      OuterStruct.createOuterStruct(
+          builder, item?.a, item?.b, (item?.cUnderscore?.a ?? 0),
+          (item?.cUnderscore?.b ?? []), (item?.cUnderscore?.c ?? 0),
+          (item?.cUnderscore?.dUnderscore ?? BigInt(0)), item?.d,
+          (item?.e?.a ?? 0), (item?.e?.b ?? []), (item?.e?.c ?? 0),
+          (item?.e?.dUnderscore ?? BigInt(0)), item?.f);
     }
-    a(index) {
-        return this.bb.readInt32(this.bb_pos + 0 + index * 4);
+    builder.pad(5);
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt8((c_underscore?.[i] ?? 0));
     }
-    b() {
-        return this.bb.readInt8(this.bb_pos + 8);
+    builder.writeInt8(b);
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt32((a?.[i] ?? 0));
     }
-    cUnderscore(index) {
-        return this.bb.readInt8(this.bb_pos + 9 + index);
-    }
-    dOuter(index, obj) {
-        return (obj || new OuterStruct()).__init(this.bb_pos + 16 + index * 208, this.bb);
-    }
-    e(index) {
-        return this.bb.readInt64(this.bb_pos + 1056 + index * 8);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.NestedStruct';
-    }
-    static sizeOf() {
-        return 1072;
-    }
-    static createNestedStruct(builder, a, b, c_underscore, d_outer, e) {
-        builder.prep(8, 1072);
-        for (let i = 1; i >= 0; --i) {
-            builder.writeInt64(BigInt(e?.[i] ?? 0));
-        }
-        for (let i = 4; i >= 0; --i) {
-            const item = d_outer?.[i];
-            if (item instanceof OuterStructT) {
-                item.pack(builder);
-                continue;
-            }
-            OuterStruct.createOuterStruct(builder, item?.a, item?.b, (item?.cUnderscore?.a ?? 0), (item?.cUnderscore?.b ?? []), (item?.cUnderscore?.c ?? 0), (item?.cUnderscore?.dUnderscore ?? BigInt(0)), item?.d, (item?.e?.a ?? 0), (item?.e?.b ?? []), (item?.e?.c ?? 0), (item?.e?.dUnderscore ?? BigInt(0)), item?.f);
-        }
-        builder.pad(5);
-        for (let i = 1; i >= 0; --i) {
-            builder.writeInt8((c_underscore?.[i] ?? 0));
-        }
-        builder.writeInt8(b);
-        for (let i = 1; i >= 0; --i) {
-            builder.writeInt32((a?.[i] ?? 0));
-        }
-        return builder.offset();
-    }
-    unpack() {
-        return new NestedStructT(this.bb.createScalarList(this.a.bind(this), 2), this.b(), this.bb.createScalarList(this.cUnderscore.bind(this), 2), this.bb.createObjList(this.dOuter.bind(this), 5), this.bb.createScalarList(this.e.bind(this), 2));
-    }
-    unpackTo(_o) {
-        _o.a = this.bb.createScalarList(this.a.bind(this), 2);
-        _o.b = this.b();
-        _o.cUnderscore = this.bb.createScalarList(this.cUnderscore.bind(this), 2);
-        _o.dOuter = this.bb.createObjList(this.dOuter.bind(this), 5);
-        _o.e = this.bb.createScalarList(this.e.bind(this), 2);
-    }
+    return builder.offset();
+  }
+  unpack() {
+    return new NestedStructT(
+        this.bb.createScalarList(this.a.bind(this), 2), this.b(),
+        this.bb.createScalarList(this.cUnderscore.bind(this), 2),
+        this.bb.createObjList(this.dOuter.bind(this), 5),
+        this.bb.createScalarList(this.e.bind(this), 2));
+  }
+  unpackTo(_o) {
+    _o.a = this.bb.createScalarList(this.a.bind(this), 2);
+    _o.b = this.b();
+    _o.cUnderscore = this.bb.createScalarList(this.cUnderscore.bind(this), 2);
+    _o.dOuter = this.bb.createObjList(this.dOuter.bind(this), 5);
+    _o.e = this.bb.createScalarList(this.e.bind(this), 2);
+  }
 }
 export class NestedStructT {
-    constructor(a = [], b = TestEnum.A, cUnderscore = [TestEnum.A, TestEnum.A], dOuter = [], e = []) {
-        this.a = a;
-        this.b = b;
-        this.cUnderscore = cUnderscore;
-        this.dOuter = dOuter;
-        this.e = e;
-    }
-    pack(builder) {
-        return NestedStruct.createNestedStruct(builder, this.a, this.b, this.cUnderscore, this.dOuter, this.e);
-    }
+  constructor(
+      a = [], b = TestEnum.A, cUnderscore = [TestEnum.A, TestEnum.A],
+      dOuter = [], e = []) {
+    this.a = a;
+    this.b = b;
+    this.cUnderscore = cUnderscore;
+    this.dOuter = dOuter;
+    this.e = e;
+  }
+  pack(builder) {
+    return NestedStruct.createNestedStruct(
+        builder, this.a, this.b, this.cUnderscore, this.dOuter, this.e);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/nested-struct.ts b/tests/ts/arrays_test_complex/my-game/example/nested-struct.ts
index 3e98918..711eaa7 100644
--- a/tests/ts/arrays_test_complex/my-game/example/nested-struct.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/nested-struct.ts
@@ -4,134 +4,150 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { OuterStruct, OuterStructT } from '../../my-game/example/outer-struct.js';
-import { TestEnum } from '../../my-game/example/test-enum.js';
+import {OuterStruct, OuterStructT} from '../../my-game/example/outer-struct.js';
+import {TestEnum} from '../../my-game/example/test-enum.js';
 
-
-export class NestedStruct implements flatbuffers.IUnpackableObject<NestedStructT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+export class NestedStruct
+  implements flatbuffers.IUnpackableObject<NestedStructT>
+{
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):NestedStruct {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-a(index: number):number|null {
-    return this.bb!.readInt32(this.bb_pos + 0 + index * 4);
-}
-
-b():TestEnum {
-  return this.bb!.readInt8(this.bb_pos + 8);
-}
-
-cUnderscore(index: number):TestEnum|null {
-    return this.bb!.readInt8(this.bb_pos + 9 + index);
-}
-
-dOuter(index: number, obj?:OuterStruct):OuterStruct|null {
-    return (obj || new OuterStruct()).__init(this.bb_pos + 16 + index * 208, this.bb!);
-}
-
-e(index: number):bigint|null {
-    return this.bb!.readInt64(this.bb_pos + 1056 + index * 8);
-}
-
-static getFullyQualifiedName():string {
-  return 'MyGame.Example.NestedStruct';
-}
-
-static sizeOf():number {
-  return 1072;
-}
-
-static createNestedStruct(builder:flatbuffers.Builder, a: number[]|null, b: TestEnum, c_underscore: number[]|null, d_outer: (any|OuterStructT)[]|null, e: bigint[]|null):flatbuffers.Offset {
-  builder.prep(8, 1072);
-
-  for (let i = 1; i >= 0; --i) {
-    builder.writeInt64(BigInt(e?.[i] ?? 0));
+  __init(i: number, bb: flatbuffers.ByteBuffer): NestedStruct {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
+  a(index: number): number | null {
+    return this.bb!.readInt32(this.bb_pos + 0 + index * 4);
+  }
 
-  for (let i = 4; i >= 0; --i) {
-    const item = d_outer?.[i];
+  b(): TestEnum {
+    return this.bb!.readInt8(this.bb_pos + 8);
+  }
 
-    if (item instanceof OuterStructT) {
-      item.pack(builder);
-      continue;
-    }
+  cUnderscore(index: number): TestEnum | null {
+    return this.bb!.readInt8(this.bb_pos + 9 + index);
+  }
 
-    OuterStruct.createOuterStruct(builder,
-    item?.a,
-    item?.b,
-    (item?.cUnderscore?.a ?? 0),
-    (item?.cUnderscore?.b ?? []),
-    (item?.cUnderscore?.c ?? 0),
-    (item?.cUnderscore?.dUnderscore ?? BigInt(0)),
-    item?.d,
-    (item?.e?.a ?? 0),
-    (item?.e?.b ?? []),
-    (item?.e?.c ?? 0),
-    (item?.e?.dUnderscore ?? BigInt(0)),
-    item?.f
+  dOuter(index: number, obj?: OuterStruct): OuterStruct | null {
+    return (obj || new OuterStruct()).__init(
+      this.bb_pos + 16 + index * 208,
+      this.bb!,
     );
   }
 
-  builder.pad(5);
-
-  for (let i = 1; i >= 0; --i) {
-    builder.writeInt8((c_underscore?.[i] ?? 0));
-
+  e(index: number): bigint | null {
+    return this.bb!.readInt64(this.bb_pos + 1056 + index * 8);
   }
 
-  builder.writeInt8(b);
-
-  for (let i = 1; i >= 0; --i) {
-    builder.writeInt32((a?.[i] ?? 0));
-
+  static getFullyQualifiedName(): string {
+    return 'MyGame.Example.NestedStruct';
   }
 
-  return builder.offset();
-}
+  static sizeOf(): number {
+    return 1072;
+  }
 
+  static createNestedStruct(
+    builder: flatbuffers.Builder,
+    a: number[] | null,
+    b: TestEnum,
+    c_underscore: number[] | null,
+    d_outer: (any | OuterStructT)[] | null,
+    e: bigint[] | null,
+  ): flatbuffers.Offset {
+    builder.prep(8, 1072);
 
-unpack(): NestedStructT {
-  return new NestedStructT(
-    this.bb!.createScalarList<number>(this.a.bind(this), 2),
-    this.b(),
-    this.bb!.createScalarList<TestEnum>(this.cUnderscore.bind(this), 2),
-    this.bb!.createObjList<OuterStruct, OuterStructT>(this.dOuter.bind(this), 5),
-    this.bb!.createScalarList<bigint>(this.e.bind(this), 2)
-  );
-}
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt64(BigInt(e?.[i] ?? 0));
+    }
 
+    for (let i = 4; i >= 0; --i) {
+      const item = d_outer?.[i];
 
-unpackTo(_o: NestedStructT): void {
-  _o.a = this.bb!.createScalarList<number>(this.a.bind(this), 2);
-  _o.b = this.b();
-  _o.cUnderscore = this.bb!.createScalarList<TestEnum>(this.cUnderscore.bind(this), 2);
-  _o.dOuter = this.bb!.createObjList<OuterStruct, OuterStructT>(this.dOuter.bind(this), 5);
-  _o.e = this.bb!.createScalarList<bigint>(this.e.bind(this), 2);
-}
+      if (item instanceof OuterStructT) {
+        item.pack(builder);
+        continue;
+      }
+
+      OuterStruct.createOuterStruct(
+        builder,
+        item?.a,
+        item?.b,
+        item?.cUnderscore?.a ?? 0,
+        item?.cUnderscore?.b ?? [],
+        item?.cUnderscore?.c ?? 0,
+        item?.cUnderscore?.dUnderscore ?? BigInt(0),
+        item?.d,
+        item?.e?.a ?? 0,
+        item?.e?.b ?? [],
+        item?.e?.c ?? 0,
+        item?.e?.dUnderscore ?? BigInt(0),
+        item?.f,
+      );
+    }
+
+    builder.pad(5);
+
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt8(c_underscore?.[i] ?? 0);
+    }
+
+    builder.writeInt8(b);
+
+    for (let i = 1; i >= 0; --i) {
+      builder.writeInt32(a?.[i] ?? 0);
+    }
+
+    return builder.offset();
+  }
+
+  unpack(): NestedStructT {
+    return new NestedStructT(
+      this.bb!.createScalarList<number>(this.a.bind(this), 2),
+      this.b(),
+      this.bb!.createScalarList<TestEnum>(this.cUnderscore.bind(this), 2),
+      this.bb!.createObjList<OuterStruct, OuterStructT>(
+        this.dOuter.bind(this),
+        5,
+      ),
+      this.bb!.createScalarList<bigint>(this.e.bind(this), 2),
+    );
+  }
+
+  unpackTo(_o: NestedStructT): void {
+    _o.a = this.bb!.createScalarList<number>(this.a.bind(this), 2);
+    _o.b = this.b();
+    _o.cUnderscore = this.bb!.createScalarList<TestEnum>(
+      this.cUnderscore.bind(this),
+      2,
+    );
+    _o.dOuter = this.bb!.createObjList<OuterStruct, OuterStructT>(
+      this.dOuter.bind(this),
+      5,
+    );
+    _o.e = this.bb!.createScalarList<bigint>(this.e.bind(this), 2);
+  }
 }
 
 export class NestedStructT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: (number)[] = [],
-  public b: TestEnum = TestEnum.A,
-  public cUnderscore: (TestEnum)[] = [TestEnum.A, TestEnum.A],
-  public dOuter: (OuterStructT)[] = [],
-  public e: (bigint)[] = []
-){}
+  constructor(
+    public a: number[] = [],
+    public b: TestEnum = TestEnum.A,
+    public cUnderscore: TestEnum[] = [TestEnum.A, TestEnum.A],
+    public dOuter: OuterStructT[] = [],
+    public e: bigint[] = [],
+  ) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return NestedStruct.createNestedStruct(builder,
-    this.a,
-    this.b,
-    this.cUnderscore,
-    this.dOuter,
-    this.e
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return NestedStruct.createNestedStruct(
+      builder,
+      this.a,
+      this.b,
+      this.cUnderscore,
+      this.dOuter,
+      this.e,
+    );
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/outer-struct.d.ts b/tests/ts/arrays_test_complex/my-game/example/outer-struct.d.ts
index 9c62cea..e02653a 100644
--- a/tests/ts/arrays_test_complex/my-game/example/outer-struct.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/outer-struct.d.ts
@@ -1,28 +1,51 @@
 import * as flatbuffers from 'flatbuffers';
-import { InnerStruct, InnerStructT } from '../../my-game/example/inner-struct.js';
-export declare class OuterStruct implements flatbuffers.IUnpackableObject<OuterStructT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): OuterStruct;
-    a(): boolean;
-    b(): number;
-    cUnderscore(obj?: InnerStruct): InnerStruct | null;
-    d(index: number, obj?: InnerStruct): InnerStruct | null;
-    e(obj?: InnerStruct): InnerStruct | null;
-    f(index: number): number | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createOuterStruct(builder: flatbuffers.Builder, a: boolean, b: number, c_underscore_a: number, c_underscore_b: number[] | null, c_underscore_c: number, c_underscore_d_underscore: bigint, d: (any | InnerStructT)[] | null, e_a: number, e_b: number[] | null, e_c: number, e_d_underscore: bigint, f: number[] | null): flatbuffers.Offset;
-    unpack(): OuterStructT;
-    unpackTo(_o: OuterStructT): void;
+import {InnerStruct, InnerStructT} from '../../my-game/example/inner-struct.js';
+export declare class OuterStruct
+  implements flatbuffers.IUnpackableObject<OuterStructT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): OuterStruct;
+  a(): boolean;
+  b(): number;
+  cUnderscore(obj?: InnerStruct): InnerStruct | null;
+  d(index: number, obj?: InnerStruct): InnerStruct | null;
+  e(obj?: InnerStruct): InnerStruct | null;
+  f(index: number): number | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createOuterStruct(
+    builder: flatbuffers.Builder,
+    a: boolean,
+    b: number,
+    c_underscore_a: number,
+    c_underscore_b: number[] | null,
+    c_underscore_c: number,
+    c_underscore_d_underscore: bigint,
+    d: (any | InnerStructT)[] | null,
+    e_a: number,
+    e_b: number[] | null,
+    e_c: number,
+    e_d_underscore: bigint,
+    f: number[] | null,
+  ): flatbuffers.Offset;
+  unpack(): OuterStructT;
+  unpackTo(_o: OuterStructT): void;
 }
 export declare class OuterStructT implements flatbuffers.IGeneratedObject {
-    a: boolean;
-    b: number;
-    cUnderscore: InnerStructT | null;
-    d: (InnerStructT)[];
-    e: InnerStructT | null;
-    f: (number)[];
-    constructor(a?: boolean, b?: number, cUnderscore?: InnerStructT | null, d?: (InnerStructT)[], e?: InnerStructT | null, f?: (number)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: boolean;
+  b: number;
+  cUnderscore: InnerStructT | null;
+  d: InnerStructT[];
+  e: InnerStructT | null;
+  f: number[];
+  constructor(
+    a?: boolean,
+    b?: number,
+    cUnderscore?: InnerStructT | null,
+    d?: InnerStructT[],
+    e?: InnerStructT | null,
+    f?: number[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/outer-struct.js b/tests/ts/arrays_test_complex/my-game/example/outer-struct.js
index fab2c96..9a93faa 100644
--- a/tests/ts/arrays_test_complex/my-game/example/outer-struct.js
+++ b/tests/ts/arrays_test_complex/my-game/example/outer-struct.js
@@ -1,95 +1,111 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { InnerStruct, InnerStructT } from '../../my-game/example/inner-struct.js';
+import {InnerStruct, InnerStructT} from '../../my-game/example/inner-struct.js';
 export class OuterStruct {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a() {
+    return !!this.bb.readInt8(this.bb_pos);
+  }
+  b() {
+    return this.bb.readFloat64(this.bb_pos + 8);
+  }
+  cUnderscore(obj) {
+    return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb);
+  }
+  d(index, obj) {
+    return (obj || new InnerStruct())
+        .__init(this.bb_pos + 48 + index * 32, this.bb);
+  }
+  e(obj) {
+    return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb);
+  }
+  f(index) {
+    return this.bb.readFloat64(this.bb_pos + 176 + index * 8);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.OuterStruct';
+  }
+  static sizeOf() {
+    return 208;
+  }
+  static createOuterStruct(
+      builder, a, b, c_underscore_a, c_underscore_b, c_underscore_c,
+      c_underscore_d_underscore, d, e_a, e_b, e_c, e_d_underscore, f) {
+    builder.prep(8, 208);
+    for (let i = 3; i >= 0; --i) {
+      builder.writeFloat64((f?.[i] ?? 0));
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(e_d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(e_c);
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8((e_b?.[i] ?? 0));
     }
-    a() {
-        return !!this.bb.readInt8(this.bb_pos);
+    builder.writeFloat64(e_a);
+    for (let i = 2; i >= 0; --i) {
+      const item = d?.[i];
+      if (item instanceof InnerStructT) {
+        item.pack(builder);
+        continue;
+      }
+      InnerStruct.createInnerStruct(
+          builder, item?.a, item?.b, item?.c, item?.dUnderscore);
     }
-    b() {
-        return this.bb.readFloat64(this.bb_pos + 8);
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(c_underscore_d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(c_underscore_c);
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8((c_underscore_b?.[i] ?? 0));
     }
-    cUnderscore(obj) {
-        return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb);
-    }
-    d(index, obj) {
-        return (obj || new InnerStruct()).__init(this.bb_pos + 48 + index * 32, this.bb);
-    }
-    e(obj) {
-        return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb);
-    }
-    f(index) {
-        return this.bb.readFloat64(this.bb_pos + 176 + index * 8);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.OuterStruct';
-    }
-    static sizeOf() {
-        return 208;
-    }
-    static createOuterStruct(builder, a, b, c_underscore_a, c_underscore_b, c_underscore_c, c_underscore_d_underscore, d, e_a, e_b, e_c, e_d_underscore, f) {
-        builder.prep(8, 208);
-        for (let i = 3; i >= 0; --i) {
-            builder.writeFloat64((f?.[i] ?? 0));
-        }
-        builder.prep(8, 32);
-        builder.writeInt64(BigInt(e_d_underscore ?? 0));
-        builder.pad(2);
-        builder.writeInt8(e_c);
-        for (let i = 12; i >= 0; --i) {
-            builder.writeInt8((e_b?.[i] ?? 0));
-        }
-        builder.writeFloat64(e_a);
-        for (let i = 2; i >= 0; --i) {
-            const item = d?.[i];
-            if (item instanceof InnerStructT) {
-                item.pack(builder);
-                continue;
-            }
-            InnerStruct.createInnerStruct(builder, item?.a, item?.b, item?.c, item?.dUnderscore);
-        }
-        builder.prep(8, 32);
-        builder.writeInt64(BigInt(c_underscore_d_underscore ?? 0));
-        builder.pad(2);
-        builder.writeInt8(c_underscore_c);
-        for (let i = 12; i >= 0; --i) {
-            builder.writeInt8((c_underscore_b?.[i] ?? 0));
-        }
-        builder.writeFloat64(c_underscore_a);
-        builder.writeFloat64(b);
-        builder.pad(7);
-        builder.writeInt8(Number(Boolean(a)));
-        return builder.offset();
-    }
-    unpack() {
-        return new OuterStructT(this.a(), this.b(), (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null), this.bb.createObjList(this.d.bind(this), 3), (this.e() !== null ? this.e().unpack() : null), this.bb.createScalarList(this.f.bind(this), 4));
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-        _o.b = this.b();
-        _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null);
-        _o.d = this.bb.createObjList(this.d.bind(this), 3);
-        _o.e = (this.e() !== null ? this.e().unpack() : null);
-        _o.f = this.bb.createScalarList(this.f.bind(this), 4);
-    }
+    builder.writeFloat64(c_underscore_a);
+    builder.writeFloat64(b);
+    builder.pad(7);
+    builder.writeInt8(Number(Boolean(a)));
+    return builder.offset();
+  }
+  unpack() {
+    return new OuterStructT(
+        this.a(), this.b(),
+        (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null),
+        this.bb.createObjList(this.d.bind(this), 3),
+        (this.e() !== null ? this.e().unpack() : null),
+        this.bb.createScalarList(this.f.bind(this), 4));
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+    _o.b = this.b();
+    _o.cUnderscore =
+        (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null);
+    _o.d = this.bb.createObjList(this.d.bind(this), 3);
+    _o.e = (this.e() !== null ? this.e().unpack() : null);
+    _o.f = this.bb.createScalarList(this.f.bind(this), 4);
+  }
 }
 export class OuterStructT {
-    constructor(a = false, b = 0.0, cUnderscore = null, d = [], e = null, f = []) {
-        this.a = a;
-        this.b = b;
-        this.cUnderscore = cUnderscore;
-        this.d = d;
-        this.e = e;
-        this.f = f;
-    }
-    pack(builder) {
-        return OuterStruct.createOuterStruct(builder, this.a, this.b, (this.cUnderscore?.a ?? 0), (this.cUnderscore?.b ?? []), (this.cUnderscore?.c ?? 0), (this.cUnderscore?.dUnderscore ?? BigInt(0)), this.d, (this.e?.a ?? 0), (this.e?.b ?? []), (this.e?.c ?? 0), (this.e?.dUnderscore ?? BigInt(0)), this.f);
-    }
+  constructor(
+      a = false, b = 0.0, cUnderscore = null, d = [], e = null, f = []) {
+    this.a = a;
+    this.b = b;
+    this.cUnderscore = cUnderscore;
+    this.d = d;
+    this.e = e;
+    this.f = f;
+  }
+  pack(builder) {
+    return OuterStruct.createOuterStruct(
+        builder, this.a, this.b, (this.cUnderscore?.a ?? 0),
+        (this.cUnderscore?.b ?? []), (this.cUnderscore?.c ?? 0),
+        (this.cUnderscore?.dUnderscore ?? BigInt(0)), this.d, (this.e?.a ?? 0),
+        (this.e?.b ?? []), (this.e?.c ?? 0), (this.e?.dUnderscore ?? BigInt(0)),
+        this.f);
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/outer-struct.ts b/tests/ts/arrays_test_complex/my-game/example/outer-struct.ts
index 39fc0a7..baad94b 100644
--- a/tests/ts/arrays_test_complex/my-game/example/outer-struct.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/outer-struct.ts
@@ -4,151 +4,169 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { InnerStruct, InnerStructT } from '../../my-game/example/inner-struct.js';
+import {InnerStruct, InnerStructT} from '../../my-game/example/inner-struct.js';
 
-
-export class OuterStruct implements flatbuffers.IUnpackableObject<OuterStructT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+export class OuterStruct
+  implements flatbuffers.IUnpackableObject<OuterStructT>
+{
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):OuterStruct {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-a():boolean {
-  return !!this.bb!.readInt8(this.bb_pos);
-}
-
-b():number {
-  return this.bb!.readFloat64(this.bb_pos + 8);
-}
-
-cUnderscore(obj?:InnerStruct):InnerStruct|null {
-  return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb!);
-}
-
-d(index: number, obj?:InnerStruct):InnerStruct|null {
-    return (obj || new InnerStruct()).__init(this.bb_pos + 48 + index * 32, this.bb!);
-}
-
-e(obj?:InnerStruct):InnerStruct|null {
-  return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb!);
-}
-
-f(index: number):number|null {
-    return this.bb!.readFloat64(this.bb_pos + 176 + index * 8);
-}
-
-static getFullyQualifiedName():string {
-  return 'MyGame.Example.OuterStruct';
-}
-
-static sizeOf():number {
-  return 208;
-}
-
-static createOuterStruct(builder:flatbuffers.Builder, a: boolean, b: number, c_underscore_a: number, c_underscore_b: number[]|null, c_underscore_c: number, c_underscore_d_underscore: bigint, d: (any|InnerStructT)[]|null, e_a: number, e_b: number[]|null, e_c: number, e_d_underscore: bigint, f: number[]|null):flatbuffers.Offset {
-  builder.prep(8, 208);
-
-  for (let i = 3; i >= 0; --i) {
-    builder.writeFloat64((f?.[i] ?? 0));
-
+  __init(i: number, bb: flatbuffers.ByteBuffer): OuterStruct {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  builder.prep(8, 32);
-  builder.writeInt64(BigInt(e_d_underscore ?? 0));
-  builder.pad(2);
-  builder.writeInt8(e_c);
-
-  for (let i = 12; i >= 0; --i) {
-    builder.writeInt8((e_b?.[i] ?? 0));
-
+  a(): boolean {
+    return !!this.bb!.readInt8(this.bb_pos);
   }
 
-  builder.writeFloat64(e_a);
+  b(): number {
+    return this.bb!.readFloat64(this.bb_pos + 8);
+  }
 
-  for (let i = 2; i >= 0; --i) {
-    const item = d?.[i];
+  cUnderscore(obj?: InnerStruct): InnerStruct | null {
+    return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb!);
+  }
 
-    if (item instanceof InnerStructT) {
-      item.pack(builder);
-      continue;
-    }
-
-    InnerStruct.createInnerStruct(builder,
-    item?.a,
-    item?.b,
-    item?.c,
-    item?.dUnderscore
+  d(index: number, obj?: InnerStruct): InnerStruct | null {
+    return (obj || new InnerStruct()).__init(
+      this.bb_pos + 48 + index * 32,
+      this.bb!,
     );
   }
 
-  builder.prep(8, 32);
-  builder.writeInt64(BigInt(c_underscore_d_underscore ?? 0));
-  builder.pad(2);
-  builder.writeInt8(c_underscore_c);
-
-  for (let i = 12; i >= 0; --i) {
-    builder.writeInt8((c_underscore_b?.[i] ?? 0));
-
+  e(obj?: InnerStruct): InnerStruct | null {
+    return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb!);
   }
 
-  builder.writeFloat64(c_underscore_a);
-  builder.writeFloat64(b);
-  builder.pad(7);
-  builder.writeInt8(Number(Boolean(a)));
-  return builder.offset();
-}
+  f(index: number): number | null {
+    return this.bb!.readFloat64(this.bb_pos + 176 + index * 8);
+  }
 
+  static getFullyQualifiedName(): string {
+    return 'MyGame.Example.OuterStruct';
+  }
 
-unpack(): OuterStructT {
-  return new OuterStructT(
-    this.a(),
-    this.b(),
-    (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null),
-    this.bb!.createObjList<InnerStruct, InnerStructT>(this.d.bind(this), 3),
-    (this.e() !== null ? this.e()!.unpack() : null),
-    this.bb!.createScalarList<number>(this.f.bind(this), 4)
-  );
-}
+  static sizeOf(): number {
+    return 208;
+  }
 
+  static createOuterStruct(
+    builder: flatbuffers.Builder,
+    a: boolean,
+    b: number,
+    c_underscore_a: number,
+    c_underscore_b: number[] | null,
+    c_underscore_c: number,
+    c_underscore_d_underscore: bigint,
+    d: (any | InnerStructT)[] | null,
+    e_a: number,
+    e_b: number[] | null,
+    e_c: number,
+    e_d_underscore: bigint,
+    f: number[] | null,
+  ): flatbuffers.Offset {
+    builder.prep(8, 208);
 
-unpackTo(_o: OuterStructT): void {
-  _o.a = this.a();
-  _o.b = this.b();
-  _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null);
-  _o.d = this.bb!.createObjList<InnerStruct, InnerStructT>(this.d.bind(this), 3);
-  _o.e = (this.e() !== null ? this.e()!.unpack() : null);
-  _o.f = this.bb!.createScalarList<number>(this.f.bind(this), 4);
-}
+    for (let i = 3; i >= 0; --i) {
+      builder.writeFloat64(f?.[i] ?? 0);
+    }
+
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(e_d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(e_c);
+
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8(e_b?.[i] ?? 0);
+    }
+
+    builder.writeFloat64(e_a);
+
+    for (let i = 2; i >= 0; --i) {
+      const item = d?.[i];
+
+      if (item instanceof InnerStructT) {
+        item.pack(builder);
+        continue;
+      }
+
+      InnerStruct.createInnerStruct(
+        builder,
+        item?.a,
+        item?.b,
+        item?.c,
+        item?.dUnderscore,
+      );
+    }
+
+    builder.prep(8, 32);
+    builder.writeInt64(BigInt(c_underscore_d_underscore ?? 0));
+    builder.pad(2);
+    builder.writeInt8(c_underscore_c);
+
+    for (let i = 12; i >= 0; --i) {
+      builder.writeInt8(c_underscore_b?.[i] ?? 0);
+    }
+
+    builder.writeFloat64(c_underscore_a);
+    builder.writeFloat64(b);
+    builder.pad(7);
+    builder.writeInt8(Number(Boolean(a)));
+    return builder.offset();
+  }
+
+  unpack(): OuterStructT {
+    return new OuterStructT(
+      this.a(),
+      this.b(),
+      this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null,
+      this.bb!.createObjList<InnerStruct, InnerStructT>(this.d.bind(this), 3),
+      this.e() !== null ? this.e()!.unpack() : null,
+      this.bb!.createScalarList<number>(this.f.bind(this), 4),
+    );
+  }
+
+  unpackTo(_o: OuterStructT): void {
+    _o.a = this.a();
+    _o.b = this.b();
+    _o.cUnderscore =
+      this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null;
+    _o.d = this.bb!.createObjList<InnerStruct, InnerStructT>(
+      this.d.bind(this),
+      3,
+    );
+    _o.e = this.e() !== null ? this.e()!.unpack() : null;
+    _o.f = this.bb!.createScalarList<number>(this.f.bind(this), 4);
+  }
 }
 
 export class OuterStructT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: boolean = false,
-  public b: number = 0.0,
-  public cUnderscore: InnerStructT|null = null,
-  public d: (InnerStructT)[] = [],
-  public e: InnerStructT|null = null,
-  public f: (number)[] = []
-){}
+  constructor(
+    public a: boolean = false,
+    public b: number = 0.0,
+    public cUnderscore: InnerStructT | null = null,
+    public d: InnerStructT[] = [],
+    public e: InnerStructT | null = null,
+    public f: number[] = [],
+  ) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return OuterStruct.createOuterStruct(builder,
-    this.a,
-    this.b,
-    (this.cUnderscore?.a ?? 0),
-    (this.cUnderscore?.b ?? []),
-    (this.cUnderscore?.c ?? 0),
-    (this.cUnderscore?.dUnderscore ?? BigInt(0)),
-    this.d,
-    (this.e?.a ?? 0),
-    (this.e?.b ?? []),
-    (this.e?.c ?? 0),
-    (this.e?.dUnderscore ?? BigInt(0)),
-    this.f
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return OuterStruct.createOuterStruct(
+      builder,
+      this.a,
+      this.b,
+      this.cUnderscore?.a ?? 0,
+      this.cUnderscore?.b ?? [],
+      this.cUnderscore?.c ?? 0,
+      this.cUnderscore?.dUnderscore ?? BigInt(0),
+      this.d,
+      this.e?.a ?? 0,
+      this.e?.b ?? [],
+      this.e?.c ?? 0,
+      this.e?.dUnderscore ?? BigInt(0),
+      this.f,
+    );
+  }
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/test-enum.d.ts b/tests/ts/arrays_test_complex/my-game/example/test-enum.d.ts
index 291e049..6422dd2 100644
--- a/tests/ts/arrays_test_complex/my-game/example/test-enum.d.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/test-enum.d.ts
@@ -1,5 +1,5 @@
 export declare enum TestEnum {
-    A = 0,
-    B = 1,
-    C = 2
+  A = 0,
+  B = 1,
+  C = 2,
 }
diff --git a/tests/ts/arrays_test_complex/my-game/example/test-enum.js b/tests/ts/arrays_test_complex/my-game/example/test-enum.js
index abe1836..7adf3a2 100644
--- a/tests/ts/arrays_test_complex/my-game/example/test-enum.js
+++ b/tests/ts/arrays_test_complex/my-game/example/test-enum.js
@@ -1,8 +1,9 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var TestEnum;
-(function (TestEnum) {
-    TestEnum[TestEnum["A"] = 0] = "A";
-    TestEnum[TestEnum["B"] = 1] = "B";
-    TestEnum[TestEnum["C"] = 2] = "C";
+(function(TestEnum) {
+TestEnum[TestEnum['A'] = 0] = 'A';
+TestEnum[TestEnum['B'] = 1] = 'B';
+TestEnum[TestEnum['C'] = 2] = 'C';
 })(TestEnum || (TestEnum = {}));
diff --git a/tests/ts/arrays_test_complex/my-game/example/test-enum.ts b/tests/ts/arrays_test_complex/my-game/example/test-enum.ts
index d077139..52c64eb 100644
--- a/tests/ts/arrays_test_complex/my-game/example/test-enum.ts
+++ b/tests/ts/arrays_test_complex/my-game/example/test-enum.ts
@@ -5,5 +5,5 @@
 export enum TestEnum {
   A = 0,
   B = 1,
-  C = 2
+  C = 2,
 }
diff --git a/tests/ts/bazel_repository_test_dir/independent_deps_test.js b/tests/ts/bazel_repository_test_dir/independent_deps_test.js
index 02f72b4..6c528e3 100644
--- a/tests/ts/bazel_repository_test_dir/independent_deps_test.js
+++ b/tests/ts/bazel_repository_test_dir/independent_deps_test.js
@@ -5,14 +5,15 @@
 // We pick lodash here not for any particular reason. It could be any package,
 // really. I chose it because it's a relatively simple package.
 
-import assert from 'node:assert/strict'
-
 import _ from 'lodash'
+import assert from 'node:assert/strict'
 
 function main() {
   console.log(_);
-  assert.deepStrictEqual(_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 }), { 'a': 1, 'b': 2 });
-  assert.deepStrictEqual(_.partition([1, 2, 3, 4], n => n % 2), [[1, 3], [2, 4]]);
+  assert.deepStrictEqual(
+      _.defaults({'a': 1}, {'a': 3, 'b': 2}), {'a': 1, 'b': 2});
+  assert.deepStrictEqual(
+      _.partition([1, 2, 3, 4], n => n % 2), [[1, 3], [2, 4]]);
 }
 
 main();
diff --git a/tests/ts/com/company/test.ts b/tests/ts/com/company/test.ts
index 87f26d2..4aa9c55 100644
--- a/tests/ts/com/company/test.ts
+++ b/tests/ts/com/company/test.ts
@@ -2,4 +2,4 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { Person } from './test/person.js';
+export {Person} from './test/person.js';
diff --git a/tests/ts/com/company/test/person.ts b/tests/ts/com/company/test/person.ts
index 98ca2d5..9ac360c 100644
--- a/tests/ts/com/company/test/person.ts
+++ b/tests/ts/com/company/test/person.ts
@@ -4,67 +4,86 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class Person {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Person {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): Person {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsPerson(bb:flatbuffers.ByteBuffer, obj?:Person):Person {
-  return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsPerson(bb: flatbuffers.ByteBuffer, obj?: Person): Person {
+    return (obj || new Person()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsPerson(bb:flatbuffers.ByteBuffer, obj?:Person):Person {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsPerson(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Person,
+  ): Person {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Person()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-age():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
-}
+  age(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
+  }
 
-static startPerson(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
+  static startPerson(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
 
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
 
-static addAge(builder:flatbuffers.Builder, age:number) {
-  builder.addFieldInt16(1, age, 0);
-}
+  static addAge(builder: flatbuffers.Builder, age: number) {
+    builder.addFieldInt16(1, age, 0);
+  }
 
-static endPerson(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endPerson(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static finishPersonBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset);
-}
+  static finishPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset);
+  }
 
-static finishSizePrefixedPersonBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, undefined, true);
-}
+  static finishSizePrefixedPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, undefined, true);
+  }
 
-static createPerson(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, age:number):flatbuffers.Offset {
-  Person.startPerson(builder);
-  Person.addName(builder, nameOffset);
-  Person.addAge(builder, age);
-  return Person.endPerson(builder);
-}
+  static createPerson(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    age: number,
+  ): flatbuffers.Offset {
+    Person.startPerson(builder);
+    Person.addName(builder, nameOffset);
+    Person.addAge(builder, age);
+    return Person.endPerson(builder);
+  }
 }
diff --git a/tests/ts/foobar.d.ts b/tests/ts/foobar.d.ts
index c920a8c..36ea4d7 100644
--- a/tests/ts/foobar.d.ts
+++ b/tests/ts/foobar.d.ts
@@ -1 +1 @@
-export { Abc } from './foobar/abc.js';
+export {Abc} from './foobar/abc.js';
diff --git a/tests/ts/foobar.js b/tests/ts/foobar.js
index fa5fd6d..28853ee 100644
--- a/tests/ts/foobar.js
+++ b/tests/ts/foobar.js
@@ -1,3 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Abc } from './foobar/abc.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {Abc} from './foobar/abc.js';
diff --git a/tests/ts/foobar.ts b/tests/ts/foobar.ts
index e513600..57d1f73 100644
--- a/tests/ts/foobar.ts
+++ b/tests/ts/foobar.ts
@@ -2,4 +2,4 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { Abc } from './foobar/abc.js';
+export {Abc} from './foobar/abc.js';
diff --git a/tests/ts/foobar/abc.d.ts b/tests/ts/foobar/abc.d.ts
index 874a35d..d1d3b9e 100644
--- a/tests/ts/foobar/abc.d.ts
+++ b/tests/ts/foobar/abc.d.ts
@@ -1,3 +1,3 @@
 export declare enum Abc {
-    a = 0
+  a = 0,
 }
diff --git a/tests/ts/foobar/abc.js b/tests/ts/foobar/abc.js
index 8c3aeb9..eedccbd 100644
--- a/tests/ts/foobar/abc.js
+++ b/tests/ts/foobar/abc.js
@@ -1,6 +1,7 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var Abc;
-(function (Abc) {
-    Abc[Abc["a"] = 0] = "a";
+(function(Abc) {
+Abc[Abc['a'] = 0] = 'a';
 })(Abc || (Abc = {}));
diff --git a/tests/ts/foobar/abc.ts b/tests/ts/foobar/abc.ts
index 308713c..c2eb2e1 100644
--- a/tests/ts/foobar/abc.ts
+++ b/tests/ts/foobar/abc.ts
@@ -3,5 +3,5 @@
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
 export enum Abc {
-  a = 0
+  a = 0,
 }
diff --git a/tests/ts/foobar/class.d.ts b/tests/ts/foobar/class.d.ts
index 2815be1..5aa7ad0 100644
--- a/tests/ts/foobar/class.d.ts
+++ b/tests/ts/foobar/class.d.ts
@@ -1,3 +1,3 @@
 export declare enum class_ {
-    arguments_ = 0
+  arguments_ = 0,
 }
diff --git a/tests/ts/foobar/class.js b/tests/ts/foobar/class.js
index 179ab6f..2633c6e 100644
--- a/tests/ts/foobar/class.js
+++ b/tests/ts/foobar/class.js
@@ -1,6 +1,7 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var class_;
-(function (class_) {
-    class_[class_["arguments_"] = 0] = "arguments_";
+(function(class_) {
+class_[class_['arguments_'] = 0] = 'arguments_';
 })(class_ || (class_ = {}));
diff --git a/tests/ts/foobar/class.ts b/tests/ts/foobar/class.ts
index db45d22..0a48a65 100644
--- a/tests/ts/foobar/class.ts
+++ b/tests/ts/foobar/class.ts
@@ -3,5 +3,5 @@
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
 export enum class_ {
-  arguments_ = 0
+  arguments_ = 0,
 }
diff --git a/tests/ts/foobar/tab.ts b/tests/ts/foobar/tab.ts
index 3af76d9..f94c355 100644
--- a/tests/ts/foobar/tab.ts
+++ b/tests/ts/foobar/tab.ts
@@ -4,131 +4,135 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { Abc } from '../foobar/abc.js';
-import { class_ } from '../foobar/class.js';
-
+import {Abc} from '../foobar/abc.js';
+import {class_} from '../foobar/class.js';
 
 export class Tab implements flatbuffers.IUnpackableObject<TabT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Tab {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsTab(bb:flatbuffers.ByteBuffer, obj?:Tab):Tab {
-  return (obj || new Tab()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsTab(bb:flatbuffers.ByteBuffer, obj?:Tab):Tab {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Tab()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-abc():Abc {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : Abc.a;
-}
-
-mutate_abc(value:Abc):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Tab {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-arg():class_ {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : class_.arguments_;
-}
-
-mutate_arg(value:class_):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-
-  if (offset === 0) {
-    return false;
+  static getRootAsTab(bb: flatbuffers.ByteBuffer, obj?: Tab): Tab {
+    return (obj || new Tab()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
+  static getSizePrefixedRootAsTab(bb: flatbuffers.ByteBuffer, obj?: Tab): Tab {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Tab()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  abc(): Abc {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : Abc.a;
+  }
 
-static getFullyQualifiedName():string {
-  return 'foobar.Tab';
-}
+  mutate_abc(value: Abc): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
 
-static startTab(builder:flatbuffers.Builder) {
-  builder.startObject(3);
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static addAbc(builder:flatbuffers.Builder, abc:Abc) {
-  builder.addFieldInt32(0, abc, Abc.a);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-static addArg(builder:flatbuffers.Builder, arg:class_) {
-  builder.addFieldInt32(1, arg, class_.arguments_);
-}
+  arg(): class_ {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? this.bb!.readInt32(this.bb_pos + offset)
+      : class_.arguments_;
+  }
 
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(2, nameOffset, 0);
-}
+  mutate_arg(value: class_): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
 
-static endTab(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static createTab(builder:flatbuffers.Builder, abc:Abc, arg:class_, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
-  Tab.startTab(builder);
-  Tab.addAbc(builder, abc);
-  Tab.addArg(builder, arg);
-  Tab.addName(builder, nameOffset);
-  return Tab.endTab(builder);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-unpack(): TabT {
-  return new TabT(
-    this.abc(),
-    this.arg(),
-    this.name()
-  );
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
+  static getFullyQualifiedName(): string {
+    return 'foobar.Tab';
+  }
 
-unpackTo(_o: TabT): void {
-  _o.abc = this.abc();
-  _o.arg = this.arg();
-  _o.name = this.name();
-}
+  static startTab(builder: flatbuffers.Builder) {
+    builder.startObject(3);
+  }
+
+  static addAbc(builder: flatbuffers.Builder, abc: Abc) {
+    builder.addFieldInt32(0, abc, Abc.a);
+  }
+
+  static addArg(builder: flatbuffers.Builder, arg: class_) {
+    builder.addFieldInt32(1, arg, class_.arguments_);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(2, nameOffset, 0);
+  }
+
+  static endTab(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  static createTab(
+    builder: flatbuffers.Builder,
+    abc: Abc,
+    arg: class_,
+    nameOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    Tab.startTab(builder);
+    Tab.addAbc(builder, abc);
+    Tab.addArg(builder, arg);
+    Tab.addName(builder, nameOffset);
+    return Tab.endTab(builder);
+  }
+
+  unpack(): TabT {
+    return new TabT(this.abc(), this.arg(), this.name());
+  }
+
+  unpackTo(_o: TabT): void {
+    _o.abc = this.abc();
+    _o.arg = this.arg();
+    _o.name = this.name();
+  }
 }
 
 export class TabT implements flatbuffers.IGeneratedObject {
-constructor(
-  public abc: Abc = Abc.a,
-  public arg: class_ = class_.arguments_,
-  public name: string|Uint8Array|null = null
-){}
+  constructor(
+    public abc: Abc = Abc.a,
+    public arg: class_ = class_.arguments_,
+    public name: string | Uint8Array | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-
-  return Tab.createTab(builder,
-    this.abc,
-    this.arg,
-    name
-  );
-}
+    return Tab.createTab(builder, this.abc, this.arg, name);
+  }
 }
diff --git a/tests/ts/longer-namespace/a/b/c.d.ts b/tests/ts/longer-namespace/a/b/c.d.ts
index e570079..cd50050 100644
--- a/tests/ts/longer-namespace/a/b/c.d.ts
+++ b/tests/ts/longer-namespace/a/b/c.d.ts
@@ -1 +1 @@
-export { Person } from './c/person.js';
+export {Person} from './c/person.js';
diff --git a/tests/ts/longer-namespace/a/b/c.js b/tests/ts/longer-namespace/a/b/c.js
index b448f91..a2a45df 100644
--- a/tests/ts/longer-namespace/a/b/c.js
+++ b/tests/ts/longer-namespace/a/b/c.js
@@ -1,3 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Person } from './c/person.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {Person} from './c/person.js';
diff --git a/tests/ts/longer-namespace/a/b/c.ts b/tests/ts/longer-namespace/a/b/c.ts
index a30937e..05f84e1 100644
--- a/tests/ts/longer-namespace/a/b/c.ts
+++ b/tests/ts/longer-namespace/a/b/c.ts
@@ -2,4 +2,4 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { Person } from './c/person.js';
+export {Person} from './c/person.js';
diff --git a/tests/ts/longer-namespace/a/b/c/person.d.ts b/tests/ts/longer-namespace/a/b/c/person.d.ts
index cbd8fcb..aeb6045 100644
--- a/tests/ts/longer-namespace/a/b/c/person.d.ts
+++ b/tests/ts/longer-namespace/a/b/c/person.d.ts
@@ -1,18 +1,34 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class Person {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Person;
-    static getRootAsPerson(bb: flatbuffers.ByteBuffer, obj?: Person): Person;
-    static getSizePrefixedRootAsPerson(bb: flatbuffers.ByteBuffer, obj?: Person): Person;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    age(): number;
-    static startPerson(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addAge(builder: flatbuffers.Builder, age: number): void;
-    static endPerson(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishPersonBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedPersonBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static createPerson(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset, age: number): flatbuffers.Offset;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Person;
+  static getRootAsPerson(bb: flatbuffers.ByteBuffer, obj?: Person): Person;
+  static getSizePrefixedRootAsPerson(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Person,
+  ): Person;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  age(): number;
+  static startPerson(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addAge(builder: flatbuffers.Builder, age: number): void;
+  static endPerson(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static createPerson(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    age: number,
+  ): flatbuffers.Offset;
 }
diff --git a/tests/ts/longer-namespace/a/b/c/person.js b/tests/ts/longer-namespace/a/b/c/person.js
index 2195fc4..355968d 100644
--- a/tests/ts/longer-namespace/a/b/c/person.js
+++ b/tests/ts/longer-namespace/a/b/c/person.js
@@ -1,54 +1,58 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class Person {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsPerson(bb, obj) {
-        return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsPerson(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    age() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
-    }
-    static startPerson(builder) {
-        builder.startObject(2);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addAge(builder, age) {
-        builder.addFieldInt16(1, age, 0);
-    }
-    static endPerson(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static finishPersonBuffer(builder, offset) {
-        builder.finish(offset);
-    }
-    static finishSizePrefixedPersonBuffer(builder, offset) {
-        builder.finish(offset, undefined, true);
-    }
-    static createPerson(builder, nameOffset, age) {
-        Person.startPerson(builder);
-        Person.addName(builder, nameOffset);
-        Person.addAge(builder, age);
-        return Person.endPerson(builder);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsPerson(bb, obj) {
+    return (obj || new Person())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsPerson(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Person())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  age() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
+  }
+  static startPerson(builder) {
+    builder.startObject(2);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addAge(builder, age) {
+    builder.addFieldInt16(1, age, 0);
+  }
+  static endPerson(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static finishPersonBuffer(builder, offset) {
+    builder.finish(offset);
+  }
+  static finishSizePrefixedPersonBuffer(builder, offset) {
+    builder.finish(offset, undefined, true);
+  }
+  static createPerson(builder, nameOffset, age) {
+    Person.startPerson(builder);
+    Person.addName(builder, nameOffset);
+    Person.addAge(builder, age);
+    return Person.endPerson(builder);
+  }
 }
diff --git a/tests/ts/longer-namespace/a/b/c/person.ts b/tests/ts/longer-namespace/a/b/c/person.ts
index 98ca2d5..9ac360c 100644
--- a/tests/ts/longer-namespace/a/b/c/person.ts
+++ b/tests/ts/longer-namespace/a/b/c/person.ts
@@ -4,67 +4,86 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class Person {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Person {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): Person {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsPerson(bb:flatbuffers.ByteBuffer, obj?:Person):Person {
-  return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsPerson(bb: flatbuffers.ByteBuffer, obj?: Person): Person {
+    return (obj || new Person()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsPerson(bb:flatbuffers.ByteBuffer, obj?:Person):Person {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Person()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsPerson(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Person,
+  ): Person {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Person()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-age():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
-}
+  age(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
+  }
 
-static startPerson(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
+  static startPerson(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
 
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
 
-static addAge(builder:flatbuffers.Builder, age:number) {
-  builder.addFieldInt16(1, age, 0);
-}
+  static addAge(builder: flatbuffers.Builder, age: number) {
+    builder.addFieldInt16(1, age, 0);
+  }
 
-static endPerson(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endPerson(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static finishPersonBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset);
-}
+  static finishPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset);
+  }
 
-static finishSizePrefixedPersonBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, undefined, true);
-}
+  static finishSizePrefixedPersonBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, undefined, true);
+  }
 
-static createPerson(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, age:number):flatbuffers.Offset {
-  Person.startPerson(builder);
-  Person.addName(builder, nameOffset);
-  Person.addAge(builder, age);
-  return Person.endPerson(builder);
-}
+  static createPerson(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    age: number,
+  ): flatbuffers.Offset {
+    Person.startPerson(builder);
+    Person.addName(builder, nameOffset);
+    Person.addAge(builder, age);
+    return Person.endPerson(builder);
+  }
 }
diff --git a/tests/ts/monster_test.d.ts b/tests/ts/monster_test.d.ts
index e89d898..7d77f47 100644
--- a/tests/ts/monster_test.d.ts
+++ b/tests/ts/monster_test.d.ts
@@ -1,2 +1,2 @@
-export { TableA, TableAT } from './table-a.js';
 export * as MyGame from './my-game.js';
+export {TableA, TableAT} from './table-a.js';
diff --git a/tests/ts/monster_test.js b/tests/ts/monster_test.js
index 04d2175..ba672f5 100644
--- a/tests/ts/monster_test.js
+++ b/tests/ts/monster_test.js
@@ -1,4 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { TableA, TableAT } from './table-a.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export * as MyGame from './my-game.js';
+export {TableA, TableAT} from './table-a.js';
diff --git a/tests/ts/my-game.d.ts b/tests/ts/my-game.d.ts
index e82f8a3..08dad65 100644
--- a/tests/ts/my-game.d.ts
+++ b/tests/ts/my-game.d.ts
@@ -1,4 +1,7 @@
-export { InParentNamespace, InParentNamespaceT } from './my-game/in-parent-namespace.js';
 export * as Example from './my-game/example.js';
 export * as Example2 from './my-game/example2.js';
+export {
+  InParentNamespace,
+  InParentNamespaceT,
+} from './my-game/in-parent-namespace.js';
 export * as OtherNameSpace from './my-game/other-name-space.js';
diff --git a/tests/ts/my-game.js b/tests/ts/my-game.js
index 59aabe9..a70dacf 100644
--- a/tests/ts/my-game.js
+++ b/tests/ts/my-game.js
@@ -1,6 +1,7 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { InParentNamespace, InParentNamespaceT } from './my-game/in-parent-namespace.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export * as Example from './my-game/example.js';
 export * as Example2 from './my-game/example2.js';
+export {InParentNamespace, InParentNamespaceT} from './my-game/in-parent-namespace.js';
 export * as OtherNameSpace from './my-game/other-name-space.js';
diff --git a/tests/ts/my-game/example.d.ts b/tests/ts/my-game/example.d.ts
index a09b7f8..0411915 100644
--- a/tests/ts/my-game/example.d.ts
+++ b/tests/ts/my-game/example.d.ts
@@ -1,16 +1,25 @@
-export { Ability, AbilityT } from './example/ability.js';
-export { Any } from './example/any.js';
-export { AnyAmbiguousAliases } from './example/any-ambiguous-aliases.js';
-export { AnyUniqueAliases } from './example/any-unique-aliases.js';
-export { Color } from './example/color.js';
-export { LongEnum } from './example/long-enum.js';
-export { Monster, MonsterT } from './example/monster.js';
-export { Race } from './example/race.js';
-export { Referrable, ReferrableT } from './example/referrable.js';
-export { Stat, StatT } from './example/stat.js';
-export { StructOfStructs, StructOfStructsT } from './example/struct-of-structs.js';
-export { StructOfStructsOfStructs, StructOfStructsOfStructsT } from './example/struct-of-structs-of-structs.js';
-export { Test, TestT } from './example/test.js';
-export { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from './example/test-simple-table-with-enum.js';
-export { TypeAliases, TypeAliasesT } from './example/type-aliases.js';
-export { Vec3, Vec3T } from './example/vec3.js';
+export {Ability, AbilityT} from './example/ability.js';
+export {AnyAmbiguousAliases} from './example/any-ambiguous-aliases.js';
+export {AnyUniqueAliases} from './example/any-unique-aliases.js';
+export {Any} from './example/any.js';
+export {Color} from './example/color.js';
+export {LongEnum} from './example/long-enum.js';
+export {Monster, MonsterT} from './example/monster.js';
+export {Race} from './example/race.js';
+export {Referrable, ReferrableT} from './example/referrable.js';
+export {Stat, StatT} from './example/stat.js';
+export {
+  StructOfStructsOfStructs,
+  StructOfStructsOfStructsT,
+} from './example/struct-of-structs-of-structs.js';
+export {
+  StructOfStructs,
+  StructOfStructsT,
+} from './example/struct-of-structs.js';
+export {
+  TestSimpleTableWithEnum,
+  TestSimpleTableWithEnumT,
+} from './example/test-simple-table-with-enum.js';
+export {Test, TestT} from './example/test.js';
+export {TypeAliases, TypeAliasesT} from './example/type-aliases.js';
+export {Vec3, Vec3T} from './example/vec3.js';
diff --git a/tests/ts/my-game/example.js b/tests/ts/my-game/example.js
index d63f78c..b553cd5 100644
--- a/tests/ts/my-game/example.js
+++ b/tests/ts/my-game/example.js
@@ -1,18 +1,19 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Ability, AbilityT } from './example/ability.js';
-export { Any } from './example/any.js';
-export { AnyAmbiguousAliases } from './example/any-ambiguous-aliases.js';
-export { AnyUniqueAliases } from './example/any-unique-aliases.js';
-export { Color } from './example/color.js';
-export { LongEnum } from './example/long-enum.js';
-export { Monster, MonsterT } from './example/monster.js';
-export { Race } from './example/race.js';
-export { Referrable, ReferrableT } from './example/referrable.js';
-export { Stat, StatT } from './example/stat.js';
-export { StructOfStructs, StructOfStructsT } from './example/struct-of-structs.js';
-export { StructOfStructsOfStructs, StructOfStructsOfStructsT } from './example/struct-of-structs-of-structs.js';
-export { Test, TestT } from './example/test.js';
-export { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from './example/test-simple-table-with-enum.js';
-export { TypeAliases, TypeAliasesT } from './example/type-aliases.js';
-export { Vec3, Vec3T } from './example/vec3.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {Ability, AbilityT} from './example/ability.js';
+export {AnyAmbiguousAliases} from './example/any-ambiguous-aliases.js';
+export {AnyUniqueAliases} from './example/any-unique-aliases.js';
+export {Any} from './example/any.js';
+export {Color} from './example/color.js';
+export {LongEnum} from './example/long-enum.js';
+export {Monster, MonsterT} from './example/monster.js';
+export {Race} from './example/race.js';
+export {Referrable, ReferrableT} from './example/referrable.js';
+export {Stat, StatT} from './example/stat.js';
+export {StructOfStructsOfStructs, StructOfStructsOfStructsT} from './example/struct-of-structs-of-structs.js';
+export {StructOfStructs, StructOfStructsT} from './example/struct-of-structs.js';
+export {TestSimpleTableWithEnum, TestSimpleTableWithEnumT} from './example/test-simple-table-with-enum.js';
+export {Test, TestT} from './example/test.js';
+export {TypeAliases, TypeAliasesT} from './example/type-aliases.js';
+export {Vec3, Vec3T} from './example/vec3.js';
diff --git a/tests/ts/my-game/example/ability.d.ts b/tests/ts/my-game/example/ability.d.ts
index bbd00f0..b3391a1 100644
--- a/tests/ts/my-game/example/ability.d.ts
+++ b/tests/ts/my-game/example/ability.d.ts
@@ -1,21 +1,27 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class Ability implements flatbuffers.IUnpackableObject<AbilityT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Ability;
-    id(): number;
-    mutate_id(value: number): boolean;
-    distance(): number;
-    mutate_distance(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createAbility(builder: flatbuffers.Builder, id: number, distance: number): flatbuffers.Offset;
-    unpack(): AbilityT;
-    unpackTo(_o: AbilityT): void;
+export declare class Ability
+  implements flatbuffers.IUnpackableObject<AbilityT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Ability;
+  id(): number;
+  mutate_id(value: number): boolean;
+  distance(): number;
+  mutate_distance(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createAbility(
+    builder: flatbuffers.Builder,
+    id: number,
+    distance: number,
+  ): flatbuffers.Offset;
+  unpack(): AbilityT;
+  unpackTo(_o: AbilityT): void;
 }
 export declare class AbilityT implements flatbuffers.IGeneratedObject {
-    id: number;
-    distance: number;
-    constructor(id?: number, distance?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  id: number;
+  distance: number;
+  constructor(id?: number, distance?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/ability.js b/tests/ts/my-game/example/ability.js
index 9fea3d6..8ade509 100644
--- a/tests/ts/my-game/example/ability.js
+++ b/tests/ts/my-game/example/ability.js
@@ -1,54 +1,54 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class Ability {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    id() {
-        return this.bb.readUint32(this.bb_pos);
-    }
-    mutate_id(value) {
-        this.bb.writeUint32(this.bb_pos + 0, value);
-        return true;
-    }
-    distance() {
-        return this.bb.readUint32(this.bb_pos + 4);
-    }
-    mutate_distance(value) {
-        this.bb.writeUint32(this.bb_pos + 4, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.Ability';
-    }
-    static sizeOf() {
-        return 8;
-    }
-    static createAbility(builder, id, distance) {
-        builder.prep(4, 8);
-        builder.writeInt32(distance);
-        builder.writeInt32(id);
-        return builder.offset();
-    }
-    unpack() {
-        return new AbilityT(this.id(), this.distance());
-    }
-    unpackTo(_o) {
-        _o.id = this.id();
-        _o.distance = this.distance();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  id() {
+    return this.bb.readUint32(this.bb_pos);
+  }
+  mutate_id(value) {
+    this.bb.writeUint32(this.bb_pos + 0, value);
+    return true;
+  }
+  distance() {
+    return this.bb.readUint32(this.bb_pos + 4);
+  }
+  mutate_distance(value) {
+    this.bb.writeUint32(this.bb_pos + 4, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Ability';
+  }
+  static sizeOf() {
+    return 8;
+  }
+  static createAbility(builder, id, distance) {
+    builder.prep(4, 8);
+    builder.writeInt32(distance);
+    builder.writeInt32(id);
+    return builder.offset();
+  }
+  unpack() {
+    return new AbilityT(this.id(), this.distance());
+  }
+  unpackTo(_o) {
+    _o.id = this.id();
+    _o.distance = this.distance();
+  }
 }
 export class AbilityT {
-    constructor(id = 0, distance = 0) {
-        this.id = id;
-        this.distance = distance;
-    }
-    pack(builder) {
-        return Ability.createAbility(builder, this.id, this.distance);
-    }
+  constructor(id = 0, distance = 0) {
+    this.id = id;
+    this.distance = distance;
+  }
+  pack(builder) {
+    return Ability.createAbility(builder, this.id, this.distance);
+  }
 }
diff --git a/tests/ts/my-game/example/any-ambiguous-aliases.d.ts b/tests/ts/my-game/example/any-ambiguous-aliases.d.ts
index d625b0a..06b4092 100644
--- a/tests/ts/my-game/example/any-ambiguous-aliases.d.ts
+++ b/tests/ts/my-game/example/any-ambiguous-aliases.d.ts
@@ -1,9 +1,16 @@
-import { Monster } from '../../my-game/example/monster.js';
+import {Monster} from '../../my-game/example/monster.js';
 export declare enum AnyAmbiguousAliases {
-    NONE = 0,
-    M1 = 1,
-    M2 = 2,
-    M3 = 3
+  NONE = 0,
+  M1 = 1,
+  M2 = 2,
+  M3 = 3,
 }
-export declare function unionToAnyAmbiguousAliases(type: AnyAmbiguousAliases, accessor: (obj: Monster) => Monster | null): Monster | null;
-export declare function unionListToAnyAmbiguousAliases(type: AnyAmbiguousAliases, accessor: (index: number, obj: Monster) => Monster | null, index: number): Monster | null;
+export declare function unionToAnyAmbiguousAliases(
+  type: AnyAmbiguousAliases,
+  accessor: (obj: Monster) => Monster | null,
+): Monster | null;
+export declare function unionListToAnyAmbiguousAliases(
+  type: AnyAmbiguousAliases,
+  accessor: (index: number, obj: Monster) => Monster | null,
+  index: number,
+): Monster | null;
diff --git a/tests/ts/my-game/example/any-ambiguous-aliases.js b/tests/ts/my-game/example/any-ambiguous-aliases.js
index 11b6aac..8156b88 100644
--- a/tests/ts/my-game/example/any-ambiguous-aliases.js
+++ b/tests/ts/my-game/example/any-ambiguous-aliases.js
@@ -1,28 +1,39 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { Monster } from '../../my-game/example/monster.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {Monster} from '../../my-game/example/monster.js';
 export var AnyAmbiguousAliases;
-(function (AnyAmbiguousAliases) {
-    AnyAmbiguousAliases[AnyAmbiguousAliases["NONE"] = 0] = "NONE";
-    AnyAmbiguousAliases[AnyAmbiguousAliases["M1"] = 1] = "M1";
-    AnyAmbiguousAliases[AnyAmbiguousAliases["M2"] = 2] = "M2";
-    AnyAmbiguousAliases[AnyAmbiguousAliases["M3"] = 3] = "M3";
+(function(AnyAmbiguousAliases) {
+AnyAmbiguousAliases[AnyAmbiguousAliases['NONE'] = 0] = 'NONE';
+AnyAmbiguousAliases[AnyAmbiguousAliases['M1'] = 1] = 'M1';
+AnyAmbiguousAliases[AnyAmbiguousAliases['M2'] = 2] = 'M2';
+AnyAmbiguousAliases[AnyAmbiguousAliases['M3'] = 3] = 'M3';
 })(AnyAmbiguousAliases || (AnyAmbiguousAliases = {}));
 export function unionToAnyAmbiguousAliases(type, accessor) {
-    switch (AnyAmbiguousAliases[type]) {
-        case 'NONE': return null;
-        case 'M1': return accessor(new Monster());
-        case 'M2': return accessor(new Monster());
-        case 'M3': return accessor(new Monster());
-        default: return null;
-    }
+  switch (AnyAmbiguousAliases[type]) {
+    case 'NONE':
+      return null;
+    case 'M1':
+      return accessor(new Monster());
+    case 'M2':
+      return accessor(new Monster());
+    case 'M3':
+      return accessor(new Monster());
+    default:
+      return null;
+  }
 }
 export function unionListToAnyAmbiguousAliases(type, accessor, index) {
-    switch (AnyAmbiguousAliases[type]) {
-        case 'NONE': return null;
-        case 'M1': return accessor(index, new Monster());
-        case 'M2': return accessor(index, new Monster());
-        case 'M3': return accessor(index, new Monster());
-        default: return null;
-    }
+  switch (AnyAmbiguousAliases[type]) {
+    case 'NONE':
+      return null;
+    case 'M1':
+      return accessor(index, new Monster());
+    case 'M2':
+      return accessor(index, new Monster());
+    case 'M3':
+      return accessor(index, new Monster());
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/my-game/example/any-unique-aliases.d.ts b/tests/ts/my-game/example/any-unique-aliases.d.ts
index 14463bc..378efca 100644
--- a/tests/ts/my-game/example/any-unique-aliases.d.ts
+++ b/tests/ts/my-game/example/any-unique-aliases.d.ts
@@ -1,11 +1,23 @@
-import { Monster as MyGame_Example2_Monster } from '../../my-game/example2/monster.js';
-import { Monster } from '../../my-game/example/monster.js';
-import { TestSimpleTableWithEnum } from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster} from '../../my-game/example/monster.js';
+import {TestSimpleTableWithEnum} from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster as MyGame_Example2_Monster} from '../../my-game/example2/monster.js';
 export declare enum AnyUniqueAliases {
-    NONE = 0,
-    M = 1,
-    TS = 2,
-    M2 = 3
+  NONE = 0,
+  M = 1,
+  TS = 2,
+  M2 = 3,
 }
-export declare function unionToAnyUniqueAliases(type: AnyUniqueAliases, accessor: (obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
-export declare function unionListToAnyUniqueAliases(type: AnyUniqueAliases, accessor: (index: number, obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null, index: number): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
+export declare function unionToAnyUniqueAliases(
+  type: AnyUniqueAliases,
+  accessor: (
+    obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum,
+  ) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null,
+): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
+export declare function unionListToAnyUniqueAliases(
+  type: AnyUniqueAliases,
+  accessor: (
+    index: number,
+    obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum,
+  ) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null,
+  index: number,
+): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
diff --git a/tests/ts/my-game/example/any-unique-aliases.js b/tests/ts/my-game/example/any-unique-aliases.js
index b254029..c10c8f6 100644
--- a/tests/ts/my-game/example/any-unique-aliases.js
+++ b/tests/ts/my-game/example/any-unique-aliases.js
@@ -1,30 +1,42 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { Monster as MyGame_Example2_Monster } from '../../my-game/example2/monster.js';
-import { Monster } from '../../my-game/example/monster.js';
-import { TestSimpleTableWithEnum } from '../../my-game/example/test-simple-table-with-enum.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {Monster} from '../../my-game/example/monster.js';
+import {TestSimpleTableWithEnum} from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster as MyGame_Example2_Monster} from '../../my-game/example2/monster.js';
+
 export var AnyUniqueAliases;
-(function (AnyUniqueAliases) {
-    AnyUniqueAliases[AnyUniqueAliases["NONE"] = 0] = "NONE";
-    AnyUniqueAliases[AnyUniqueAliases["M"] = 1] = "M";
-    AnyUniqueAliases[AnyUniqueAliases["TS"] = 2] = "TS";
-    AnyUniqueAliases[AnyUniqueAliases["M2"] = 3] = "M2";
+(function(AnyUniqueAliases) {
+AnyUniqueAliases[AnyUniqueAliases['NONE'] = 0] = 'NONE';
+AnyUniqueAliases[AnyUniqueAliases['M'] = 1] = 'M';
+AnyUniqueAliases[AnyUniqueAliases['TS'] = 2] = 'TS';
+AnyUniqueAliases[AnyUniqueAliases['M2'] = 3] = 'M2';
 })(AnyUniqueAliases || (AnyUniqueAliases = {}));
 export function unionToAnyUniqueAliases(type, accessor) {
-    switch (AnyUniqueAliases[type]) {
-        case 'NONE': return null;
-        case 'M': return accessor(new Monster());
-        case 'TS': return accessor(new TestSimpleTableWithEnum());
-        case 'M2': return accessor(new MyGame_Example2_Monster());
-        default: return null;
-    }
+  switch (AnyUniqueAliases[type]) {
+    case 'NONE':
+      return null;
+    case 'M':
+      return accessor(new Monster());
+    case 'TS':
+      return accessor(new TestSimpleTableWithEnum());
+    case 'M2':
+      return accessor(new MyGame_Example2_Monster());
+    default:
+      return null;
+  }
 }
 export function unionListToAnyUniqueAliases(type, accessor, index) {
-    switch (AnyUniqueAliases[type]) {
-        case 'NONE': return null;
-        case 'M': return accessor(index, new Monster());
-        case 'TS': return accessor(index, new TestSimpleTableWithEnum());
-        case 'M2': return accessor(index, new MyGame_Example2_Monster());
-        default: return null;
-    }
+  switch (AnyUniqueAliases[type]) {
+    case 'NONE':
+      return null;
+    case 'M':
+      return accessor(index, new Monster());
+    case 'TS':
+      return accessor(index, new TestSimpleTableWithEnum());
+    case 'M2':
+      return accessor(index, new MyGame_Example2_Monster());
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/my-game/example/any.d.ts b/tests/ts/my-game/example/any.d.ts
index 6d3e84c..a5d1b1c 100644
--- a/tests/ts/my-game/example/any.d.ts
+++ b/tests/ts/my-game/example/any.d.ts
@@ -1,11 +1,23 @@
-import { Monster as MyGame_Example2_Monster } from '../../my-game/example2/monster.js';
-import { Monster } from '../../my-game/example/monster.js';
-import { TestSimpleTableWithEnum } from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster} from '../../my-game/example/monster.js';
+import {TestSimpleTableWithEnum} from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster as MyGame_Example2_Monster} from '../../my-game/example2/monster.js';
 export declare enum Any {
-    NONE = 0,
-    Monster = 1,
-    TestSimpleTableWithEnum = 2,
-    MyGame_Example2_Monster = 3
+  NONE = 0,
+  Monster = 1,
+  TestSimpleTableWithEnum = 2,
+  MyGame_Example2_Monster = 3,
 }
-export declare function unionToAny(type: Any, accessor: (obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
-export declare function unionListToAny(type: Any, accessor: (index: number, obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null, index: number): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
+export declare function unionToAny(
+  type: Any,
+  accessor: (
+    obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum,
+  ) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null,
+): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
+export declare function unionListToAny(
+  type: Any,
+  accessor: (
+    index: number,
+    obj: Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum,
+  ) => Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null,
+  index: number,
+): Monster | MyGame_Example2_Monster | TestSimpleTableWithEnum | null;
diff --git a/tests/ts/my-game/example/any.js b/tests/ts/my-game/example/any.js
index ef2c3e8..495f2e8 100644
--- a/tests/ts/my-game/example/any.js
+++ b/tests/ts/my-game/example/any.js
@@ -1,30 +1,42 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { Monster as MyGame_Example2_Monster } from '../../my-game/example2/monster.js';
-import { Monster } from '../../my-game/example/monster.js';
-import { TestSimpleTableWithEnum } from '../../my-game/example/test-simple-table-with-enum.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {Monster} from '../../my-game/example/monster.js';
+import {TestSimpleTableWithEnum} from '../../my-game/example/test-simple-table-with-enum.js';
+import {Monster as MyGame_Example2_Monster} from '../../my-game/example2/monster.js';
+
 export var Any;
-(function (Any) {
-    Any[Any["NONE"] = 0] = "NONE";
-    Any[Any["Monster"] = 1] = "Monster";
-    Any[Any["TestSimpleTableWithEnum"] = 2] = "TestSimpleTableWithEnum";
-    Any[Any["MyGame_Example2_Monster"] = 3] = "MyGame_Example2_Monster";
+(function(Any) {
+Any[Any['NONE'] = 0] = 'NONE';
+Any[Any['Monster'] = 1] = 'Monster';
+Any[Any['TestSimpleTableWithEnum'] = 2] = 'TestSimpleTableWithEnum';
+Any[Any['MyGame_Example2_Monster'] = 3] = 'MyGame_Example2_Monster';
 })(Any || (Any = {}));
 export function unionToAny(type, accessor) {
-    switch (Any[type]) {
-        case 'NONE': return null;
-        case 'Monster': return accessor(new Monster());
-        case 'TestSimpleTableWithEnum': return accessor(new TestSimpleTableWithEnum());
-        case 'MyGame_Example2_Monster': return accessor(new MyGame_Example2_Monster());
-        default: return null;
-    }
+  switch (Any[type]) {
+    case 'NONE':
+      return null;
+    case 'Monster':
+      return accessor(new Monster());
+    case 'TestSimpleTableWithEnum':
+      return accessor(new TestSimpleTableWithEnum());
+    case 'MyGame_Example2_Monster':
+      return accessor(new MyGame_Example2_Monster());
+    default:
+      return null;
+  }
 }
 export function unionListToAny(type, accessor, index) {
-    switch (Any[type]) {
-        case 'NONE': return null;
-        case 'Monster': return accessor(index, new Monster());
-        case 'TestSimpleTableWithEnum': return accessor(index, new TestSimpleTableWithEnum());
-        case 'MyGame_Example2_Monster': return accessor(index, new MyGame_Example2_Monster());
-        default: return null;
-    }
+  switch (Any[type]) {
+    case 'NONE':
+      return null;
+    case 'Monster':
+      return accessor(index, new Monster());
+    case 'TestSimpleTableWithEnum':
+      return accessor(index, new TestSimpleTableWithEnum());
+    case 'MyGame_Example2_Monster':
+      return accessor(index, new MyGame_Example2_Monster());
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/my-game/example/color.d.ts b/tests/ts/my-game/example/color.d.ts
index 79906f4..34e9a4d 100644
--- a/tests/ts/my-game/example/color.d.ts
+++ b/tests/ts/my-game/example/color.d.ts
@@ -2,14 +2,14 @@
  * Composite components of Monster color.
  */
 export declare enum Color {
-    Red = 1,
-    /**
-     * \brief color Green
-     * Green is bit_flag with value (1u << 1)
-     */
-    Green = 2,
-    /**
-     * \brief color Blue (1u << 3)
-     */
-    Blue = 8
+  Red = 1,
+  /**
+   * \brief color Green
+   * Green is bit_flag with value (1u << 1)
+   */
+  Green = 2,
+  /**
+   * \brief color Blue (1u << 3)
+   */
+  Blue = 8,
 }
diff --git a/tests/ts/my-game/example/color.js b/tests/ts/my-game/example/color.js
index 5f2f1fd..0a89fd3 100644
--- a/tests/ts/my-game/example/color.js
+++ b/tests/ts/my-game/example/color.js
@@ -1,18 +1,19 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 /**
  * Composite components of Monster color.
  */
 export var Color;
-(function (Color) {
-    Color[Color["Red"] = 1] = "Red";
-    /**
-     * \brief color Green
-     * Green is bit_flag with value (1u << 1)
-     */
-    Color[Color["Green"] = 2] = "Green";
-    /**
-     * \brief color Blue (1u << 3)
-     */
-    Color[Color["Blue"] = 8] = "Blue";
+(function(Color) {
+Color[Color['Red'] = 1] = 'Red';
+/**
+ * \brief color Green
+ * Green is bit_flag with value (1u << 1)
+ */
+Color[Color['Green'] = 2] = 'Green';
+/**
+ * \brief color Blue (1u << 3)
+ */
+Color[Color['Blue'] = 8] = 'Blue';
 })(Color || (Color = {}));
diff --git a/tests/ts/my-game/example/long-enum.d.ts b/tests/ts/my-game/example/long-enum.d.ts
index 72e656f..608ddb7 100644
--- a/tests/ts/my-game/example/long-enum.d.ts
+++ b/tests/ts/my-game/example/long-enum.d.ts
@@ -1,5 +1,5 @@
 export declare enum LongEnum {
-    LongOne = "2",
-    LongTwo = "4",
-    LongBig = "1099511627776"
+  LongOne = '2',
+  LongTwo = '4',
+  LongBig = '1099511627776',
 }
diff --git a/tests/ts/my-game/example/long-enum.js b/tests/ts/my-game/example/long-enum.js
index 1003072..dfbaca6 100644
--- a/tests/ts/my-game/example/long-enum.js
+++ b/tests/ts/my-game/example/long-enum.js
@@ -1,8 +1,9 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var LongEnum;
-(function (LongEnum) {
-    LongEnum["LongOne"] = "2";
-    LongEnum["LongTwo"] = "4";
-    LongEnum["LongBig"] = "1099511627776";
+(function(LongEnum) {
+LongEnum['LongOne'] = '2';
+LongEnum['LongTwo'] = '4';
+LongEnum['LongBig'] = '1099511627776';
 })(LongEnum || (LongEnum = {}));
diff --git a/tests/ts/my-game/example/monster.d.ts b/tests/ts/my-game/example/monster.d.ts
index 8648839..b2d3a77 100644
--- a/tests/ts/my-game/example/monster.d.ts
+++ b/tests/ts/my-game/example/monster.d.ts
@@ -1,325 +1,674 @@
 import * as flatbuffers from 'flatbuffers';
-import { MonsterT as MyGame_Example2_MonsterT } from '../../my-game/example2/monster.js';
-import { Ability, AbilityT } from '../../my-game/example/ability.js';
-import { Any } from '../../my-game/example/any.js';
-import { AnyAmbiguousAliases } from '../../my-game/example/any-ambiguous-aliases.js';
-import { AnyUniqueAliases } from '../../my-game/example/any-unique-aliases.js';
-import { Color } from '../../my-game/example/color.js';
-import { Race } from '../../my-game/example/race.js';
-import { Referrable, ReferrableT } from '../../my-game/example/referrable.js';
-import { Stat, StatT } from '../../my-game/example/stat.js';
-import { Test, TestT } from '../../my-game/example/test.js';
-import { TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum.js';
-import { Vec3, Vec3T } from '../../my-game/example/vec3.js';
-import { InParentNamespace, InParentNamespaceT } from '../../my-game/in-parent-namespace.js';
+import {Ability, AbilityT} from '../../my-game/example/ability.js';
+import {AnyAmbiguousAliases} from '../../my-game/example/any-ambiguous-aliases.js';
+import {AnyUniqueAliases} from '../../my-game/example/any-unique-aliases.js';
+import {Any} from '../../my-game/example/any.js';
+import {Color} from '../../my-game/example/color.js';
+import {Race} from '../../my-game/example/race.js';
+import {Referrable, ReferrableT} from '../../my-game/example/referrable.js';
+import {Stat, StatT} from '../../my-game/example/stat.js';
+import {TestSimpleTableWithEnumT} from '../../my-game/example/test-simple-table-with-enum.js';
+import {Test, TestT} from '../../my-game/example/test.js';
+import {Vec3, Vec3T} from '../../my-game/example/vec3.js';
+import {MonsterT as MyGame_Example2_MonsterT} from '../../my-game/example2/monster.js';
+import {
+  InParentNamespace,
+  InParentNamespaceT,
+} from '../../my-game/in-parent-namespace.js';
 /**
  * an example documentation comment: "monster object"
  */
-export declare class Monster implements flatbuffers.IUnpackableObject<MonsterT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Monster;
-    static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
-    static getSizePrefixedRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
-    static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
-    pos(obj?: Vec3): Vec3 | null;
-    mana(): number;
-    mutate_mana(value: number): boolean;
-    hp(): number;
-    mutate_hp(value: number): boolean;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    inventory(index: number): number | null;
-    inventoryLength(): number;
-    inventoryArray(): Uint8Array | null;
-    color(): Color;
-    mutate_color(value: Color): boolean;
-    testType(): Any;
-    test<T extends flatbuffers.Table>(obj: any): any | null;
-    test4(index: number, obj?: Test): Test | null;
-    test4Length(): number;
-    testarrayofstring(index: number): string;
-    testarrayofstring(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    testarrayofstringLength(): number;
-    /**
-     * an example documentation comment: this will end up in the generated code
-     * multiline too
-     */
-    testarrayoftables(index: number, obj?: Monster): Monster | null;
-    testarrayoftablesLength(): number;
-    enemy(obj?: Monster): Monster | null;
-    testnestedflatbuffer(index: number): number | null;
-    testnestedflatbufferLength(): number;
-    testnestedflatbufferArray(): Uint8Array | null;
-    testempty(obj?: Stat): Stat | null;
-    testbool(): boolean;
-    mutate_testbool(value: boolean): boolean;
-    testhashs32Fnv1(): number;
-    mutate_testhashs32_fnv1(value: number): boolean;
-    testhashu32Fnv1(): number;
-    mutate_testhashu32_fnv1(value: number): boolean;
-    testhashs64Fnv1(): bigint;
-    mutate_testhashs64_fnv1(value: bigint): boolean;
-    testhashu64Fnv1(): bigint;
-    mutate_testhashu64_fnv1(value: bigint): boolean;
-    testhashs32Fnv1a(): number;
-    mutate_testhashs32_fnv1a(value: number): boolean;
-    testhashu32Fnv1a(): number;
-    mutate_testhashu32_fnv1a(value: number): boolean;
-    testhashs64Fnv1a(): bigint;
-    mutate_testhashs64_fnv1a(value: bigint): boolean;
-    testhashu64Fnv1a(): bigint;
-    mutate_testhashu64_fnv1a(value: bigint): boolean;
-    testarrayofbools(index: number): boolean | null;
-    testarrayofboolsLength(): number;
-    testarrayofboolsArray(): Int8Array | null;
-    testf(): number;
-    mutate_testf(value: number): boolean;
-    testf2(): number;
-    mutate_testf2(value: number): boolean;
-    testf3(): number;
-    mutate_testf3(value: number): boolean;
-    testarrayofstring2(index: number): string;
-    testarrayofstring2(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    testarrayofstring2Length(): number;
-    testarrayofsortedstruct(index: number, obj?: Ability): Ability | null;
-    testarrayofsortedstructLength(): number;
-    flex(index: number): number | null;
-    flexLength(): number;
-    flexArray(): Uint8Array | null;
-    test5(index: number, obj?: Test): Test | null;
-    test5Length(): number;
-    vectorOfLongs(index: number): bigint | null;
-    vectorOfLongsLength(): number;
-    vectorOfDoubles(index: number): number | null;
-    vectorOfDoublesLength(): number;
-    vectorOfDoublesArray(): Float64Array | null;
-    parentNamespaceTest(obj?: InParentNamespace): InParentNamespace | null;
-    vectorOfReferrables(index: number, obj?: Referrable): Referrable | null;
-    vectorOfReferrablesLength(): number;
-    singleWeakReference(): bigint;
-    mutate_single_weak_reference(value: bigint): boolean;
-    vectorOfWeakReferences(index: number): bigint | null;
-    vectorOfWeakReferencesLength(): number;
-    vectorOfStrongReferrables(index: number, obj?: Referrable): Referrable | null;
-    vectorOfStrongReferrablesLength(): number;
-    coOwningReference(): bigint;
-    mutate_co_owning_reference(value: bigint): boolean;
-    vectorOfCoOwningReferences(index: number): bigint | null;
-    vectorOfCoOwningReferencesLength(): number;
-    nonOwningReference(): bigint;
-    mutate_non_owning_reference(value: bigint): boolean;
-    vectorOfNonOwningReferences(index: number): bigint | null;
-    vectorOfNonOwningReferencesLength(): number;
-    anyUniqueType(): AnyUniqueAliases;
-    anyUnique<T extends flatbuffers.Table>(obj: any): any | null;
-    anyAmbiguousType(): AnyAmbiguousAliases;
-    anyAmbiguous<T extends flatbuffers.Table>(obj: any): any | null;
-    vectorOfEnums(index: number): Color | null;
-    vectorOfEnumsLength(): number;
-    vectorOfEnumsArray(): Uint8Array | null;
-    signedEnum(): Race;
-    mutate_signed_enum(value: Race): boolean;
-    testrequirednestedflatbuffer(index: number): number | null;
-    testrequirednestedflatbufferLength(): number;
-    testrequirednestedflatbufferArray(): Uint8Array | null;
-    scalarKeySortedTables(index: number, obj?: Stat): Stat | null;
-    scalarKeySortedTablesLength(): number;
-    nativeInline(obj?: Test): Test | null;
-    longEnumNonEnumDefault(): bigint;
-    mutate_long_enum_non_enum_default(value: bigint): boolean;
-    longEnumNormalDefault(): bigint;
-    mutate_long_enum_normal_default(value: bigint): boolean;
-    nanDefault(): number;
-    mutate_nan_default(value: number): boolean;
-    infDefault(): number;
-    mutate_inf_default(value: number): boolean;
-    positiveInfDefault(): number;
-    mutate_positive_inf_default(value: number): boolean;
-    infinityDefault(): number;
-    mutate_infinity_default(value: number): boolean;
-    positiveInfinityDefault(): number;
-    mutate_positive_infinity_default(value: number): boolean;
-    negativeInfDefault(): number;
-    mutate_negative_inf_default(value: number): boolean;
-    negativeInfinityDefault(): number;
-    mutate_negative_infinity_default(value: number): boolean;
-    doubleInfDefault(): number;
-    mutate_double_inf_default(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startMonster(builder: flatbuffers.Builder): void;
-    static addPos(builder: flatbuffers.Builder, posOffset: flatbuffers.Offset): void;
-    static addMana(builder: flatbuffers.Builder, mana: number): void;
-    static addHp(builder: flatbuffers.Builder, hp: number): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addInventory(builder: flatbuffers.Builder, inventoryOffset: flatbuffers.Offset): void;
-    static createInventoryVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startInventoryVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addColor(builder: flatbuffers.Builder, color: Color): void;
-    static addTestType(builder: flatbuffers.Builder, testType: Any): void;
-    static addTest(builder: flatbuffers.Builder, testOffset: flatbuffers.Offset): void;
-    static addTest4(builder: flatbuffers.Builder, test4Offset: flatbuffers.Offset): void;
-    static startTest4Vector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestarrayofstring(builder: flatbuffers.Builder, testarrayofstringOffset: flatbuffers.Offset): void;
-    static createTestarrayofstringVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startTestarrayofstringVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestarrayoftables(builder: flatbuffers.Builder, testarrayoftablesOffset: flatbuffers.Offset): void;
-    static createTestarrayoftablesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startTestarrayoftablesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addEnemy(builder: flatbuffers.Builder, enemyOffset: flatbuffers.Offset): void;
-    static addTestnestedflatbuffer(builder: flatbuffers.Builder, testnestedflatbufferOffset: flatbuffers.Offset): void;
-    static createTestnestedflatbufferVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startTestnestedflatbufferVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestempty(builder: flatbuffers.Builder, testemptyOffset: flatbuffers.Offset): void;
-    static addTestbool(builder: flatbuffers.Builder, testbool: boolean): void;
-    static addTesthashs32Fnv1(builder: flatbuffers.Builder, testhashs32Fnv1: number): void;
-    static addTesthashu32Fnv1(builder: flatbuffers.Builder, testhashu32Fnv1: number): void;
-    static addTesthashs64Fnv1(builder: flatbuffers.Builder, testhashs64Fnv1: bigint): void;
-    static addTesthashu64Fnv1(builder: flatbuffers.Builder, testhashu64Fnv1: bigint): void;
-    static addTesthashs32Fnv1a(builder: flatbuffers.Builder, testhashs32Fnv1a: number): void;
-    static addTesthashu32Fnv1a(builder: flatbuffers.Builder, testhashu32Fnv1a: number): void;
-    static addTesthashs64Fnv1a(builder: flatbuffers.Builder, testhashs64Fnv1a: bigint): void;
-    static addTesthashu64Fnv1a(builder: flatbuffers.Builder, testhashu64Fnv1a: bigint): void;
-    static addTestarrayofbools(builder: flatbuffers.Builder, testarrayofboolsOffset: flatbuffers.Offset): void;
-    static createTestarrayofboolsVector(builder: flatbuffers.Builder, data: boolean[]): flatbuffers.Offset;
-    static startTestarrayofboolsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestf(builder: flatbuffers.Builder, testf: number): void;
-    static addTestf2(builder: flatbuffers.Builder, testf2: number): void;
-    static addTestf3(builder: flatbuffers.Builder, testf3: number): void;
-    static addTestarrayofstring2(builder: flatbuffers.Builder, testarrayofstring2Offset: flatbuffers.Offset): void;
-    static createTestarrayofstring2Vector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startTestarrayofstring2Vector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestarrayofsortedstruct(builder: flatbuffers.Builder, testarrayofsortedstructOffset: flatbuffers.Offset): void;
-    static startTestarrayofsortedstructVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addFlex(builder: flatbuffers.Builder, flexOffset: flatbuffers.Offset): void;
-    static createFlexVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startFlexVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTest5(builder: flatbuffers.Builder, test5Offset: flatbuffers.Offset): void;
-    static startTest5Vector(builder: flatbuffers.Builder, numElems: number): void;
-    static addVectorOfLongs(builder: flatbuffers.Builder, vectorOfLongsOffset: flatbuffers.Offset): void;
-    static createVectorOfLongsVector(builder: flatbuffers.Builder, data: bigint[]): flatbuffers.Offset;
-    static startVectorOfLongsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addVectorOfDoubles(builder: flatbuffers.Builder, vectorOfDoublesOffset: flatbuffers.Offset): void;
-    static createVectorOfDoublesVector(builder: flatbuffers.Builder, data: number[] | Float64Array): flatbuffers.Offset;
-    /**
-     * @deprecated This Uint8Array overload will be removed in the future.
-     */
-    static createVectorOfDoublesVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startVectorOfDoublesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addParentNamespaceTest(builder: flatbuffers.Builder, parentNamespaceTestOffset: flatbuffers.Offset): void;
-    static addVectorOfReferrables(builder: flatbuffers.Builder, vectorOfReferrablesOffset: flatbuffers.Offset): void;
-    static createVectorOfReferrablesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startVectorOfReferrablesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addSingleWeakReference(builder: flatbuffers.Builder, singleWeakReference: bigint): void;
-    static addVectorOfWeakReferences(builder: flatbuffers.Builder, vectorOfWeakReferencesOffset: flatbuffers.Offset): void;
-    static createVectorOfWeakReferencesVector(builder: flatbuffers.Builder, data: bigint[]): flatbuffers.Offset;
-    static startVectorOfWeakReferencesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addVectorOfStrongReferrables(builder: flatbuffers.Builder, vectorOfStrongReferrablesOffset: flatbuffers.Offset): void;
-    static createVectorOfStrongReferrablesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startVectorOfStrongReferrablesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addCoOwningReference(builder: flatbuffers.Builder, coOwningReference: bigint): void;
-    static addVectorOfCoOwningReferences(builder: flatbuffers.Builder, vectorOfCoOwningReferencesOffset: flatbuffers.Offset): void;
-    static createVectorOfCoOwningReferencesVector(builder: flatbuffers.Builder, data: bigint[]): flatbuffers.Offset;
-    static startVectorOfCoOwningReferencesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addNonOwningReference(builder: flatbuffers.Builder, nonOwningReference: bigint): void;
-    static addVectorOfNonOwningReferences(builder: flatbuffers.Builder, vectorOfNonOwningReferencesOffset: flatbuffers.Offset): void;
-    static createVectorOfNonOwningReferencesVector(builder: flatbuffers.Builder, data: bigint[]): flatbuffers.Offset;
-    static startVectorOfNonOwningReferencesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addAnyUniqueType(builder: flatbuffers.Builder, anyUniqueType: AnyUniqueAliases): void;
-    static addAnyUnique(builder: flatbuffers.Builder, anyUniqueOffset: flatbuffers.Offset): void;
-    static addAnyAmbiguousType(builder: flatbuffers.Builder, anyAmbiguousType: AnyAmbiguousAliases): void;
-    static addAnyAmbiguous(builder: flatbuffers.Builder, anyAmbiguousOffset: flatbuffers.Offset): void;
-    static addVectorOfEnums(builder: flatbuffers.Builder, vectorOfEnumsOffset: flatbuffers.Offset): void;
-    static createVectorOfEnumsVector(builder: flatbuffers.Builder, data: Color[]): flatbuffers.Offset;
-    static startVectorOfEnumsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addSignedEnum(builder: flatbuffers.Builder, signedEnum: Race): void;
-    static addTestrequirednestedflatbuffer(builder: flatbuffers.Builder, testrequirednestedflatbufferOffset: flatbuffers.Offset): void;
-    static createTestrequirednestedflatbufferVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startTestrequirednestedflatbufferVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addScalarKeySortedTables(builder: flatbuffers.Builder, scalarKeySortedTablesOffset: flatbuffers.Offset): void;
-    static createScalarKeySortedTablesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startScalarKeySortedTablesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addNativeInline(builder: flatbuffers.Builder, nativeInlineOffset: flatbuffers.Offset): void;
-    static addLongEnumNonEnumDefault(builder: flatbuffers.Builder, longEnumNonEnumDefault: bigint): void;
-    static addLongEnumNormalDefault(builder: flatbuffers.Builder, longEnumNormalDefault: bigint): void;
-    static addNanDefault(builder: flatbuffers.Builder, nanDefault: number): void;
-    static addInfDefault(builder: flatbuffers.Builder, infDefault: number): void;
-    static addPositiveInfDefault(builder: flatbuffers.Builder, positiveInfDefault: number): void;
-    static addInfinityDefault(builder: flatbuffers.Builder, infinityDefault: number): void;
-    static addPositiveInfinityDefault(builder: flatbuffers.Builder, positiveInfinityDefault: number): void;
-    static addNegativeInfDefault(builder: flatbuffers.Builder, negativeInfDefault: number): void;
-    static addNegativeInfinityDefault(builder: flatbuffers.Builder, negativeInfinityDefault: number): void;
-    static addDoubleInfDefault(builder: flatbuffers.Builder, doubleInfDefault: number): void;
-    static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishMonsterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedMonsterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): Monster;
-    unpack(): MonsterT;
-    unpackTo(_o: MonsterT): void;
+export declare class Monster
+  implements flatbuffers.IUnpackableObject<MonsterT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Monster;
+  static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
+  static getSizePrefixedRootAsMonster(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Monster,
+  ): Monster;
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
+  pos(obj?: Vec3): Vec3 | null;
+  mana(): number;
+  mutate_mana(value: number): boolean;
+  hp(): number;
+  mutate_hp(value: number): boolean;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  inventory(index: number): number | null;
+  inventoryLength(): number;
+  inventoryArray(): Uint8Array | null;
+  color(): Color;
+  mutate_color(value: Color): boolean;
+  testType(): Any;
+  test<T extends flatbuffers.Table>(obj: any): any | null;
+  test4(index: number, obj?: Test): Test | null;
+  test4Length(): number;
+  testarrayofstring(index: number): string;
+  testarrayofstring(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  testarrayofstringLength(): number;
+  /**
+   * an example documentation comment: this will end up in the generated code
+   * multiline too
+   */
+  testarrayoftables(index: number, obj?: Monster): Monster | null;
+  testarrayoftablesLength(): number;
+  enemy(obj?: Monster): Monster | null;
+  testnestedflatbuffer(index: number): number | null;
+  testnestedflatbufferLength(): number;
+  testnestedflatbufferArray(): Uint8Array | null;
+  testempty(obj?: Stat): Stat | null;
+  testbool(): boolean;
+  mutate_testbool(value: boolean): boolean;
+  testhashs32Fnv1(): number;
+  mutate_testhashs32_fnv1(value: number): boolean;
+  testhashu32Fnv1(): number;
+  mutate_testhashu32_fnv1(value: number): boolean;
+  testhashs64Fnv1(): bigint;
+  mutate_testhashs64_fnv1(value: bigint): boolean;
+  testhashu64Fnv1(): bigint;
+  mutate_testhashu64_fnv1(value: bigint): boolean;
+  testhashs32Fnv1a(): number;
+  mutate_testhashs32_fnv1a(value: number): boolean;
+  testhashu32Fnv1a(): number;
+  mutate_testhashu32_fnv1a(value: number): boolean;
+  testhashs64Fnv1a(): bigint;
+  mutate_testhashs64_fnv1a(value: bigint): boolean;
+  testhashu64Fnv1a(): bigint;
+  mutate_testhashu64_fnv1a(value: bigint): boolean;
+  testarrayofbools(index: number): boolean | null;
+  testarrayofboolsLength(): number;
+  testarrayofboolsArray(): Int8Array | null;
+  testf(): number;
+  mutate_testf(value: number): boolean;
+  testf2(): number;
+  mutate_testf2(value: number): boolean;
+  testf3(): number;
+  mutate_testf3(value: number): boolean;
+  testarrayofstring2(index: number): string;
+  testarrayofstring2(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  testarrayofstring2Length(): number;
+  testarrayofsortedstruct(index: number, obj?: Ability): Ability | null;
+  testarrayofsortedstructLength(): number;
+  flex(index: number): number | null;
+  flexLength(): number;
+  flexArray(): Uint8Array | null;
+  test5(index: number, obj?: Test): Test | null;
+  test5Length(): number;
+  vectorOfLongs(index: number): bigint | null;
+  vectorOfLongsLength(): number;
+  vectorOfDoubles(index: number): number | null;
+  vectorOfDoublesLength(): number;
+  vectorOfDoublesArray(): Float64Array | null;
+  parentNamespaceTest(obj?: InParentNamespace): InParentNamespace | null;
+  vectorOfReferrables(index: number, obj?: Referrable): Referrable | null;
+  vectorOfReferrablesLength(): number;
+  singleWeakReference(): bigint;
+  mutate_single_weak_reference(value: bigint): boolean;
+  vectorOfWeakReferences(index: number): bigint | null;
+  vectorOfWeakReferencesLength(): number;
+  vectorOfStrongReferrables(index: number, obj?: Referrable): Referrable | null;
+  vectorOfStrongReferrablesLength(): number;
+  coOwningReference(): bigint;
+  mutate_co_owning_reference(value: bigint): boolean;
+  vectorOfCoOwningReferences(index: number): bigint | null;
+  vectorOfCoOwningReferencesLength(): number;
+  nonOwningReference(): bigint;
+  mutate_non_owning_reference(value: bigint): boolean;
+  vectorOfNonOwningReferences(index: number): bigint | null;
+  vectorOfNonOwningReferencesLength(): number;
+  anyUniqueType(): AnyUniqueAliases;
+  anyUnique<T extends flatbuffers.Table>(obj: any): any | null;
+  anyAmbiguousType(): AnyAmbiguousAliases;
+  anyAmbiguous<T extends flatbuffers.Table>(obj: any): any | null;
+  vectorOfEnums(index: number): Color | null;
+  vectorOfEnumsLength(): number;
+  vectorOfEnumsArray(): Uint8Array | null;
+  signedEnum(): Race;
+  mutate_signed_enum(value: Race): boolean;
+  testrequirednestedflatbuffer(index: number): number | null;
+  testrequirednestedflatbufferLength(): number;
+  testrequirednestedflatbufferArray(): Uint8Array | null;
+  scalarKeySortedTables(index: number, obj?: Stat): Stat | null;
+  scalarKeySortedTablesLength(): number;
+  nativeInline(obj?: Test): Test | null;
+  longEnumNonEnumDefault(): bigint;
+  mutate_long_enum_non_enum_default(value: bigint): boolean;
+  longEnumNormalDefault(): bigint;
+  mutate_long_enum_normal_default(value: bigint): boolean;
+  nanDefault(): number;
+  mutate_nan_default(value: number): boolean;
+  infDefault(): number;
+  mutate_inf_default(value: number): boolean;
+  positiveInfDefault(): number;
+  mutate_positive_inf_default(value: number): boolean;
+  infinityDefault(): number;
+  mutate_infinity_default(value: number): boolean;
+  positiveInfinityDefault(): number;
+  mutate_positive_infinity_default(value: number): boolean;
+  negativeInfDefault(): number;
+  mutate_negative_inf_default(value: number): boolean;
+  negativeInfinityDefault(): number;
+  mutate_negative_infinity_default(value: number): boolean;
+  doubleInfDefault(): number;
+  mutate_double_inf_default(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startMonster(builder: flatbuffers.Builder): void;
+  static addPos(
+    builder: flatbuffers.Builder,
+    posOffset: flatbuffers.Offset,
+  ): void;
+  static addMana(builder: flatbuffers.Builder, mana: number): void;
+  static addHp(builder: flatbuffers.Builder, hp: number): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addInventory(
+    builder: flatbuffers.Builder,
+    inventoryOffset: flatbuffers.Offset,
+  ): void;
+  static createInventoryVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startInventoryVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addColor(builder: flatbuffers.Builder, color: Color): void;
+  static addTestType(builder: flatbuffers.Builder, testType: Any): void;
+  static addTest(
+    builder: flatbuffers.Builder,
+    testOffset: flatbuffers.Offset,
+  ): void;
+  static addTest4(
+    builder: flatbuffers.Builder,
+    test4Offset: flatbuffers.Offset,
+  ): void;
+  static startTest4Vector(builder: flatbuffers.Builder, numElems: number): void;
+  static addTestarrayofstring(
+    builder: flatbuffers.Builder,
+    testarrayofstringOffset: flatbuffers.Offset,
+  ): void;
+  static createTestarrayofstringVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startTestarrayofstringVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addTestarrayoftables(
+    builder: flatbuffers.Builder,
+    testarrayoftablesOffset: flatbuffers.Offset,
+  ): void;
+  static createTestarrayoftablesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startTestarrayoftablesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addEnemy(
+    builder: flatbuffers.Builder,
+    enemyOffset: flatbuffers.Offset,
+  ): void;
+  static addTestnestedflatbuffer(
+    builder: flatbuffers.Builder,
+    testnestedflatbufferOffset: flatbuffers.Offset,
+  ): void;
+  static createTestnestedflatbufferVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startTestnestedflatbufferVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addTestempty(
+    builder: flatbuffers.Builder,
+    testemptyOffset: flatbuffers.Offset,
+  ): void;
+  static addTestbool(builder: flatbuffers.Builder, testbool: boolean): void;
+  static addTesthashs32Fnv1(
+    builder: flatbuffers.Builder,
+    testhashs32Fnv1: number,
+  ): void;
+  static addTesthashu32Fnv1(
+    builder: flatbuffers.Builder,
+    testhashu32Fnv1: number,
+  ): void;
+  static addTesthashs64Fnv1(
+    builder: flatbuffers.Builder,
+    testhashs64Fnv1: bigint,
+  ): void;
+  static addTesthashu64Fnv1(
+    builder: flatbuffers.Builder,
+    testhashu64Fnv1: bigint,
+  ): void;
+  static addTesthashs32Fnv1a(
+    builder: flatbuffers.Builder,
+    testhashs32Fnv1a: number,
+  ): void;
+  static addTesthashu32Fnv1a(
+    builder: flatbuffers.Builder,
+    testhashu32Fnv1a: number,
+  ): void;
+  static addTesthashs64Fnv1a(
+    builder: flatbuffers.Builder,
+    testhashs64Fnv1a: bigint,
+  ): void;
+  static addTesthashu64Fnv1a(
+    builder: flatbuffers.Builder,
+    testhashu64Fnv1a: bigint,
+  ): void;
+  static addTestarrayofbools(
+    builder: flatbuffers.Builder,
+    testarrayofboolsOffset: flatbuffers.Offset,
+  ): void;
+  static createTestarrayofboolsVector(
+    builder: flatbuffers.Builder,
+    data: boolean[],
+  ): flatbuffers.Offset;
+  static startTestarrayofboolsVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addTestf(builder: flatbuffers.Builder, testf: number): void;
+  static addTestf2(builder: flatbuffers.Builder, testf2: number): void;
+  static addTestf3(builder: flatbuffers.Builder, testf3: number): void;
+  static addTestarrayofstring2(
+    builder: flatbuffers.Builder,
+    testarrayofstring2Offset: flatbuffers.Offset,
+  ): void;
+  static createTestarrayofstring2Vector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startTestarrayofstring2Vector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addTestarrayofsortedstruct(
+    builder: flatbuffers.Builder,
+    testarrayofsortedstructOffset: flatbuffers.Offset,
+  ): void;
+  static startTestarrayofsortedstructVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addFlex(
+    builder: flatbuffers.Builder,
+    flexOffset: flatbuffers.Offset,
+  ): void;
+  static createFlexVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startFlexVector(builder: flatbuffers.Builder, numElems: number): void;
+  static addTest5(
+    builder: flatbuffers.Builder,
+    test5Offset: flatbuffers.Offset,
+  ): void;
+  static startTest5Vector(builder: flatbuffers.Builder, numElems: number): void;
+  static addVectorOfLongs(
+    builder: flatbuffers.Builder,
+    vectorOfLongsOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfLongsVector(
+    builder: flatbuffers.Builder,
+    data: bigint[],
+  ): flatbuffers.Offset;
+  static startVectorOfLongsVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addVectorOfDoubles(
+    builder: flatbuffers.Builder,
+    vectorOfDoublesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfDoublesVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Float64Array,
+  ): flatbuffers.Offset;
+  /**
+   * @deprecated This Uint8Array overload will be removed in the future.
+   */
+  static createVectorOfDoublesVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startVectorOfDoublesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addParentNamespaceTest(
+    builder: flatbuffers.Builder,
+    parentNamespaceTestOffset: flatbuffers.Offset,
+  ): void;
+  static addVectorOfReferrables(
+    builder: flatbuffers.Builder,
+    vectorOfReferrablesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfReferrablesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startVectorOfReferrablesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addSingleWeakReference(
+    builder: flatbuffers.Builder,
+    singleWeakReference: bigint,
+  ): void;
+  static addVectorOfWeakReferences(
+    builder: flatbuffers.Builder,
+    vectorOfWeakReferencesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfWeakReferencesVector(
+    builder: flatbuffers.Builder,
+    data: bigint[],
+  ): flatbuffers.Offset;
+  static startVectorOfWeakReferencesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addVectorOfStrongReferrables(
+    builder: flatbuffers.Builder,
+    vectorOfStrongReferrablesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfStrongReferrablesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startVectorOfStrongReferrablesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addCoOwningReference(
+    builder: flatbuffers.Builder,
+    coOwningReference: bigint,
+  ): void;
+  static addVectorOfCoOwningReferences(
+    builder: flatbuffers.Builder,
+    vectorOfCoOwningReferencesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfCoOwningReferencesVector(
+    builder: flatbuffers.Builder,
+    data: bigint[],
+  ): flatbuffers.Offset;
+  static startVectorOfCoOwningReferencesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addNonOwningReference(
+    builder: flatbuffers.Builder,
+    nonOwningReference: bigint,
+  ): void;
+  static addVectorOfNonOwningReferences(
+    builder: flatbuffers.Builder,
+    vectorOfNonOwningReferencesOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfNonOwningReferencesVector(
+    builder: flatbuffers.Builder,
+    data: bigint[],
+  ): flatbuffers.Offset;
+  static startVectorOfNonOwningReferencesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addAnyUniqueType(
+    builder: flatbuffers.Builder,
+    anyUniqueType: AnyUniqueAliases,
+  ): void;
+  static addAnyUnique(
+    builder: flatbuffers.Builder,
+    anyUniqueOffset: flatbuffers.Offset,
+  ): void;
+  static addAnyAmbiguousType(
+    builder: flatbuffers.Builder,
+    anyAmbiguousType: AnyAmbiguousAliases,
+  ): void;
+  static addAnyAmbiguous(
+    builder: flatbuffers.Builder,
+    anyAmbiguousOffset: flatbuffers.Offset,
+  ): void;
+  static addVectorOfEnums(
+    builder: flatbuffers.Builder,
+    vectorOfEnumsOffset: flatbuffers.Offset,
+  ): void;
+  static createVectorOfEnumsVector(
+    builder: flatbuffers.Builder,
+    data: Color[],
+  ): flatbuffers.Offset;
+  static startVectorOfEnumsVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addSignedEnum(builder: flatbuffers.Builder, signedEnum: Race): void;
+  static addTestrequirednestedflatbuffer(
+    builder: flatbuffers.Builder,
+    testrequirednestedflatbufferOffset: flatbuffers.Offset,
+  ): void;
+  static createTestrequirednestedflatbufferVector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startTestrequirednestedflatbufferVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addScalarKeySortedTables(
+    builder: flatbuffers.Builder,
+    scalarKeySortedTablesOffset: flatbuffers.Offset,
+  ): void;
+  static createScalarKeySortedTablesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startScalarKeySortedTablesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addNativeInline(
+    builder: flatbuffers.Builder,
+    nativeInlineOffset: flatbuffers.Offset,
+  ): void;
+  static addLongEnumNonEnumDefault(
+    builder: flatbuffers.Builder,
+    longEnumNonEnumDefault: bigint,
+  ): void;
+  static addLongEnumNormalDefault(
+    builder: flatbuffers.Builder,
+    longEnumNormalDefault: bigint,
+  ): void;
+  static addNanDefault(builder: flatbuffers.Builder, nanDefault: number): void;
+  static addInfDefault(builder: flatbuffers.Builder, infDefault: number): void;
+  static addPositiveInfDefault(
+    builder: flatbuffers.Builder,
+    positiveInfDefault: number,
+  ): void;
+  static addInfinityDefault(
+    builder: flatbuffers.Builder,
+    infinityDefault: number,
+  ): void;
+  static addPositiveInfinityDefault(
+    builder: flatbuffers.Builder,
+    positiveInfinityDefault: number,
+  ): void;
+  static addNegativeInfDefault(
+    builder: flatbuffers.Builder,
+    negativeInfDefault: number,
+  ): void;
+  static addNegativeInfinityDefault(
+    builder: flatbuffers.Builder,
+    negativeInfinityDefault: number,
+  ): void;
+  static addDoubleInfDefault(
+    builder: flatbuffers.Builder,
+    doubleInfDefault: number,
+  ): void;
+  static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishMonsterBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedMonsterBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): Monster;
+  unpack(): MonsterT;
+  unpackTo(_o: MonsterT): void;
 }
 export declare class MonsterT implements flatbuffers.IGeneratedObject {
-    pos: Vec3T | null;
-    mana: number;
-    hp: number;
-    name: string | Uint8Array | null;
-    inventory: (number)[];
-    color: Color;
-    testType: Any;
-    test: MonsterT | MyGame_Example2_MonsterT | TestSimpleTableWithEnumT | null;
-    test4: (TestT)[];
-    testarrayofstring: (string)[];
-    testarrayoftables: (MonsterT)[];
-    enemy: MonsterT | null;
-    testnestedflatbuffer: (number)[];
-    testempty: StatT | null;
-    testbool: boolean;
-    testhashs32Fnv1: number;
-    testhashu32Fnv1: number;
-    testhashs64Fnv1: bigint;
-    testhashu64Fnv1: bigint;
-    testhashs32Fnv1a: number;
-    testhashu32Fnv1a: number;
-    testhashs64Fnv1a: bigint;
-    testhashu64Fnv1a: bigint;
-    testarrayofbools: (boolean)[];
-    testf: number;
-    testf2: number;
-    testf3: number;
-    testarrayofstring2: (string)[];
-    testarrayofsortedstruct: (AbilityT)[];
-    flex: (number)[];
-    test5: (TestT)[];
-    vectorOfLongs: (bigint)[];
-    vectorOfDoubles: (number)[];
-    parentNamespaceTest: InParentNamespaceT | null;
-    vectorOfReferrables: (ReferrableT)[];
-    singleWeakReference: bigint;
-    vectorOfWeakReferences: (bigint)[];
-    vectorOfStrongReferrables: (ReferrableT)[];
-    coOwningReference: bigint;
-    vectorOfCoOwningReferences: (bigint)[];
-    nonOwningReference: bigint;
-    vectorOfNonOwningReferences: (bigint)[];
-    anyUniqueType: AnyUniqueAliases;
-    anyUnique: MonsterT | MyGame_Example2_MonsterT | TestSimpleTableWithEnumT | null;
-    anyAmbiguousType: AnyAmbiguousAliases;
-    anyAmbiguous: MonsterT | null;
-    vectorOfEnums: (Color)[];
-    signedEnum: Race;
-    testrequirednestedflatbuffer: (number)[];
-    scalarKeySortedTables: (StatT)[];
-    nativeInline: TestT | null;
-    longEnumNonEnumDefault: bigint;
-    longEnumNormalDefault: bigint;
-    nanDefault: number;
-    infDefault: number;
-    positiveInfDefault: number;
-    infinityDefault: number;
-    positiveInfinityDefault: number;
-    negativeInfDefault: number;
-    negativeInfinityDefault: number;
-    doubleInfDefault: number;
-    constructor(pos?: Vec3T | null, mana?: number, hp?: number, name?: string | Uint8Array | null, inventory?: (number)[], color?: Color, testType?: Any, test?: MonsterT | MyGame_Example2_MonsterT | TestSimpleTableWithEnumT | null, test4?: (TestT)[], testarrayofstring?: (string)[], testarrayoftables?: (MonsterT)[], enemy?: MonsterT | null, testnestedflatbuffer?: (number)[], testempty?: StatT | null, testbool?: boolean, testhashs32Fnv1?: number, testhashu32Fnv1?: number, testhashs64Fnv1?: bigint, testhashu64Fnv1?: bigint, testhashs32Fnv1a?: number, testhashu32Fnv1a?: number, testhashs64Fnv1a?: bigint, testhashu64Fnv1a?: bigint, testarrayofbools?: (boolean)[], testf?: number, testf2?: number, testf3?: number, testarrayofstring2?: (string)[], testarrayofsortedstruct?: (AbilityT)[], flex?: (number)[], test5?: (TestT)[], vectorOfLongs?: (bigint)[], vectorOfDoubles?: (number)[], parentNamespaceTest?: InParentNamespaceT | null, vectorOfReferrables?: (ReferrableT)[], singleWeakReference?: bigint, vectorOfWeakReferences?: (bigint)[], vectorOfStrongReferrables?: (ReferrableT)[], coOwningReference?: bigint, vectorOfCoOwningReferences?: (bigint)[], nonOwningReference?: bigint, vectorOfNonOwningReferences?: (bigint)[], anyUniqueType?: AnyUniqueAliases, anyUnique?: MonsterT | MyGame_Example2_MonsterT | TestSimpleTableWithEnumT | null, anyAmbiguousType?: AnyAmbiguousAliases, anyAmbiguous?: MonsterT | null, vectorOfEnums?: (Color)[], signedEnum?: Race, testrequirednestedflatbuffer?: (number)[], scalarKeySortedTables?: (StatT)[], nativeInline?: TestT | null, longEnumNonEnumDefault?: bigint, longEnumNormalDefault?: bigint, nanDefault?: number, infDefault?: number, positiveInfDefault?: number, infinityDefault?: number, positiveInfinityDefault?: number, negativeInfDefault?: number, negativeInfinityDefault?: number, doubleInfDefault?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  pos: Vec3T | null;
+  mana: number;
+  hp: number;
+  name: string | Uint8Array | null;
+  inventory: number[];
+  color: Color;
+  testType: Any;
+  test: MonsterT | MyGame_Example2_MonsterT | TestSimpleTableWithEnumT | null;
+  test4: TestT[];
+  testarrayofstring: string[];
+  testarrayoftables: MonsterT[];
+  enemy: MonsterT | null;
+  testnestedflatbuffer: number[];
+  testempty: StatT | null;
+  testbool: boolean;
+  testhashs32Fnv1: number;
+  testhashu32Fnv1: number;
+  testhashs64Fnv1: bigint;
+  testhashu64Fnv1: bigint;
+  testhashs32Fnv1a: number;
+  testhashu32Fnv1a: number;
+  testhashs64Fnv1a: bigint;
+  testhashu64Fnv1a: bigint;
+  testarrayofbools: boolean[];
+  testf: number;
+  testf2: number;
+  testf3: number;
+  testarrayofstring2: string[];
+  testarrayofsortedstruct: AbilityT[];
+  flex: number[];
+  test5: TestT[];
+  vectorOfLongs: bigint[];
+  vectorOfDoubles: number[];
+  parentNamespaceTest: InParentNamespaceT | null;
+  vectorOfReferrables: ReferrableT[];
+  singleWeakReference: bigint;
+  vectorOfWeakReferences: bigint[];
+  vectorOfStrongReferrables: ReferrableT[];
+  coOwningReference: bigint;
+  vectorOfCoOwningReferences: bigint[];
+  nonOwningReference: bigint;
+  vectorOfNonOwningReferences: bigint[];
+  anyUniqueType: AnyUniqueAliases;
+  anyUnique:
+    | MonsterT
+    | MyGame_Example2_MonsterT
+    | TestSimpleTableWithEnumT
+    | null;
+  anyAmbiguousType: AnyAmbiguousAliases;
+  anyAmbiguous: MonsterT | null;
+  vectorOfEnums: Color[];
+  signedEnum: Race;
+  testrequirednestedflatbuffer: number[];
+  scalarKeySortedTables: StatT[];
+  nativeInline: TestT | null;
+  longEnumNonEnumDefault: bigint;
+  longEnumNormalDefault: bigint;
+  nanDefault: number;
+  infDefault: number;
+  positiveInfDefault: number;
+  infinityDefault: number;
+  positiveInfinityDefault: number;
+  negativeInfDefault: number;
+  negativeInfinityDefault: number;
+  doubleInfDefault: number;
+  constructor(
+    pos?: Vec3T | null,
+    mana?: number,
+    hp?: number,
+    name?: string | Uint8Array | null,
+    inventory?: number[],
+    color?: Color,
+    testType?: Any,
+    test?:
+      | MonsterT
+      | MyGame_Example2_MonsterT
+      | TestSimpleTableWithEnumT
+      | null,
+    test4?: TestT[],
+    testarrayofstring?: string[],
+    testarrayoftables?: MonsterT[],
+    enemy?: MonsterT | null,
+    testnestedflatbuffer?: number[],
+    testempty?: StatT | null,
+    testbool?: boolean,
+    testhashs32Fnv1?: number,
+    testhashu32Fnv1?: number,
+    testhashs64Fnv1?: bigint,
+    testhashu64Fnv1?: bigint,
+    testhashs32Fnv1a?: number,
+    testhashu32Fnv1a?: number,
+    testhashs64Fnv1a?: bigint,
+    testhashu64Fnv1a?: bigint,
+    testarrayofbools?: boolean[],
+    testf?: number,
+    testf2?: number,
+    testf3?: number,
+    testarrayofstring2?: string[],
+    testarrayofsortedstruct?: AbilityT[],
+    flex?: number[],
+    test5?: TestT[],
+    vectorOfLongs?: bigint[],
+    vectorOfDoubles?: number[],
+    parentNamespaceTest?: InParentNamespaceT | null,
+    vectorOfReferrables?: ReferrableT[],
+    singleWeakReference?: bigint,
+    vectorOfWeakReferences?: bigint[],
+    vectorOfStrongReferrables?: ReferrableT[],
+    coOwningReference?: bigint,
+    vectorOfCoOwningReferences?: bigint[],
+    nonOwningReference?: bigint,
+    vectorOfNonOwningReferences?: bigint[],
+    anyUniqueType?: AnyUniqueAliases,
+    anyUnique?:
+      | MonsterT
+      | MyGame_Example2_MonsterT
+      | TestSimpleTableWithEnumT
+      | null,
+    anyAmbiguousType?: AnyAmbiguousAliases,
+    anyAmbiguous?: MonsterT | null,
+    vectorOfEnums?: Color[],
+    signedEnum?: Race,
+    testrequirednestedflatbuffer?: number[],
+    scalarKeySortedTables?: StatT[],
+    nativeInline?: TestT | null,
+    longEnumNonEnumDefault?: bigint,
+    longEnumNormalDefault?: bigint,
+    nanDefault?: number,
+    infDefault?: number,
+    positiveInfDefault?: number,
+    infinityDefault?: number,
+    positiveInfinityDefault?: number,
+    negativeInfDefault?: number,
+    negativeInfinityDefault?: number,
+    doubleInfDefault?: number,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/monster.js b/tests/ts/my-game/example/monster.js
index 2bbcb9f..070efbf 100644
--- a/tests/ts/my-game/example/monster.js
+++ b/tests/ts/my-game/example/monster.js
@@ -1,1270 +1,1554 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Ability } from '../../my-game/example/ability.js';
-import { Any, unionToAny } from '../../my-game/example/any.js';
-import { AnyAmbiguousAliases, unionToAnyAmbiguousAliases } from '../../my-game/example/any-ambiguous-aliases.js';
-import { AnyUniqueAliases, unionToAnyUniqueAliases } from '../../my-game/example/any-unique-aliases.js';
-import { Color } from '../../my-game/example/color.js';
-import { Race } from '../../my-game/example/race.js';
-import { Referrable } from '../../my-game/example/referrable.js';
-import { Stat } from '../../my-game/example/stat.js';
-import { Test } from '../../my-game/example/test.js';
-import { Vec3 } from '../../my-game/example/vec3.js';
-import { InParentNamespace } from '../../my-game/in-parent-namespace.js';
+
+import {Ability} from '../../my-game/example/ability.js';
+import {AnyAmbiguousAliases, unionToAnyAmbiguousAliases} from '../../my-game/example/any-ambiguous-aliases.js';
+import {AnyUniqueAliases, unionToAnyUniqueAliases} from '../../my-game/example/any-unique-aliases.js';
+import {Any, unionToAny} from '../../my-game/example/any.js';
+import {Color} from '../../my-game/example/color.js';
+import {Race} from '../../my-game/example/race.js';
+import {Referrable} from '../../my-game/example/referrable.js';
+import {Stat} from '../../my-game/example/stat.js';
+import {Test} from '../../my-game/example/test.js';
+import {Vec3} from '../../my-game/example/vec3.js';
+import {InParentNamespace} from '../../my-game/in-parent-namespace.js';
+
 /**
  * an example documentation comment: "monster object"
  */
 export class Monster {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsMonster(bb, obj) {
+    return (obj || new Monster())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsMonster(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Monster())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static bufferHasIdentifier(bb) {
+    return bb.__has_identifier('MONS');
+  }
+  pos(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) :
+                    null;
+  }
+  mana() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 150;
+  }
+  mutate_mana(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt16(this.bb_pos + offset, value);
+    return true;
+  }
+  hp() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 100;
+  }
+  mutate_hp(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsMonster(bb, obj) {
-        return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt16(this.bb_pos + offset, value);
+    return true;
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  inventory(index) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        0;
+  }
+  inventoryLength() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  inventoryArray() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  color() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : Color.Blue;
+  }
+  mutate_color(value) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsMonster(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeUint8(this.bb_pos + offset, value);
+    return true;
+  }
+  testType() {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : Any.NONE;
+  }
+  test(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
+  }
+  test4(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ?
+        (obj || new Test())
+            .__init(
+                this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) :
+        null;
+  }
+  test4Length() {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testarrayofstring(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  testarrayofstringLength() {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  /**
+   * an example documentation comment: this will end up in the generated code
+   * multiline too
+   */
+  testarrayoftables(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ?
+        (obj || new Monster())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  testarrayoftablesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  enemy(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 28);
+    return offset ?
+        (obj || new Monster())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  testnestedflatbuffer(index) {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        0;
+  }
+  testnestedflatbufferLength() {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testnestedflatbufferArray() {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  testempty(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 32);
+    return offset ?
+        (obj || new Stat())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  testbool() {
+    const offset = this.bb.__offset(this.bb_pos, 34);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_testbool(value) {
+    const offset = this.bb.__offset(this.bb_pos, 34);
+    if (offset === 0) {
+      return false;
     }
-    static bufferHasIdentifier(bb) {
-        return bb.__has_identifier('MONS');
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  testhashs32Fnv1() {
+    const offset = this.bb.__offset(this.bb_pos, 36);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_testhashs32_fnv1(value) {
+    const offset = this.bb.__offset(this.bb_pos, 36);
+    if (offset === 0) {
+      return false;
     }
-    pos(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashu32Fnv1() {
+    const offset = this.bb.__offset(this.bb_pos, 38);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+  }
+  mutate_testhashu32_fnv1(value) {
+    const offset = this.bb.__offset(this.bb_pos, 38);
+    if (offset === 0) {
+      return false;
     }
-    mana() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 150;
+    this.bb.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashs64Fnv1() {
+    const offset = this.bb.__offset(this.bb_pos, 40);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_testhashs64_fnv1(value) {
+    const offset = this.bb.__offset(this.bb_pos, 40);
+    if (offset === 0) {
+      return false;
     }
-    mutate_mana(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt16(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashu64Fnv1() {
+    const offset = this.bb.__offset(this.bb_pos, 42);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_testhashu64_fnv1(value) {
+    const offset = this.bb.__offset(this.bb_pos, 42);
+    if (offset === 0) {
+      return false;
     }
-    hp() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 100;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashs32Fnv1a() {
+    const offset = this.bb.__offset(this.bb_pos, 44);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_testhashs32_fnv1a(value) {
+    const offset = this.bb.__offset(this.bb_pos, 44);
+    if (offset === 0) {
+      return false;
     }
-    mutate_hp(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt16(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashu32Fnv1a() {
+    const offset = this.bb.__offset(this.bb_pos, 46);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+  }
+  mutate_testhashu32_fnv1a(value) {
+    const offset = this.bb.__offset(this.bb_pos, 46);
+    if (offset === 0) {
+      return false;
     }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
+    this.bb.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashs64Fnv1a() {
+    const offset = this.bb.__offset(this.bb_pos, 48);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_testhashs64_fnv1a(value) {
+    const offset = this.bb.__offset(this.bb_pos, 48);
+    if (offset === 0) {
+      return false;
     }
-    inventory(index) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  testhashu64Fnv1a() {
+    const offset = this.bb.__offset(this.bb_pos, 50);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_testhashu64_fnv1a(value) {
+    const offset = this.bb.__offset(this.bb_pos, 50);
+    if (offset === 0) {
+      return false;
     }
-    inventoryLength() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  testarrayofbools(index) {
+    const offset = this.bb.__offset(this.bb_pos, 52);
+    return offset ?
+        !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) :
+        false;
+  }
+  testarrayofboolsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 52);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testarrayofboolsArray() {
+    const offset = this.bb.__offset(this.bb_pos, 52);
+    return offset ?
+        new Int8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  testf() {
+    const offset = this.bb.__offset(this.bb_pos, 54);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.14159;
+  }
+  mutate_testf(value) {
+    const offset = this.bb.__offset(this.bb_pos, 54);
+    if (offset === 0) {
+      return false;
     }
-    inventoryArray() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
+    this.bb.writeFloat32(this.bb_pos + offset, value);
+    return true;
+  }
+  testf2() {
+    const offset = this.bb.__offset(this.bb_pos, 56);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.0;
+  }
+  mutate_testf2(value) {
+    const offset = this.bb.__offset(this.bb_pos, 56);
+    if (offset === 0) {
+      return false;
     }
-    color() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : Color.Blue;
+    this.bb.writeFloat32(this.bb_pos + offset, value);
+    return true;
+  }
+  testf3() {
+    const offset = this.bb.__offset(this.bb_pos, 58);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
+  }
+  mutate_testf3(value) {
+    const offset = this.bb.__offset(this.bb_pos, 58);
+    if (offset === 0) {
+      return false;
     }
-    mutate_color(value) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint8(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeFloat32(this.bb_pos + offset, value);
+    return true;
+  }
+  testarrayofstring2(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 60);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  testarrayofstring2Length() {
+    const offset = this.bb.__offset(this.bb_pos, 60);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testarrayofsortedstruct(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 62);
+    return offset ?
+        (obj || new Ability())
+            .__init(
+                this.bb.__vector(this.bb_pos + offset) + index * 8, this.bb) :
+        null;
+  }
+  testarrayofsortedstructLength() {
+    const offset = this.bb.__offset(this.bb_pos, 62);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  flex(index) {
+    const offset = this.bb.__offset(this.bb_pos, 64);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        0;
+  }
+  flexLength() {
+    const offset = this.bb.__offset(this.bb_pos, 64);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  flexArray() {
+    const offset = this.bb.__offset(this.bb_pos, 64);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  test5(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 66);
+    return offset ?
+        (obj || new Test())
+            .__init(
+                this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) :
+        null;
+  }
+  test5Length() {
+    const offset = this.bb.__offset(this.bb_pos, 66);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vectorOfLongs(index) {
+    const offset = this.bb.__offset(this.bb_pos, 68);
+    return offset ?
+        this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) :
+        BigInt(0);
+  }
+  vectorOfLongsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 68);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vectorOfDoubles(index) {
+    const offset = this.bb.__offset(this.bb_pos, 70);
+    return offset ? this.bb.readFloat64(
+                        this.bb.__vector(this.bb_pos + offset) + index * 8) :
+                    0;
+  }
+  vectorOfDoublesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 70);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vectorOfDoublesArray() {
+    const offset = this.bb.__offset(this.bb_pos, 70);
+    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;
+  }
+  parentNamespaceTest(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 72);
+    return offset ?
+        (obj || new InParentNamespace())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  vectorOfReferrables(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 74);
+    return offset ?
+        (obj || new Referrable())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  vectorOfReferrablesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 74);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  singleWeakReference() {
+    const offset = this.bb.__offset(this.bb_pos, 76);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_single_weak_reference(value) {
+    const offset = this.bb.__offset(this.bb_pos, 76);
+    if (offset === 0) {
+      return false;
     }
-    testType() {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : Any.NONE;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  vectorOfWeakReferences(index) {
+    const offset = this.bb.__offset(this.bb_pos, 78);
+    return offset ?
+        this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) :
+        BigInt(0);
+  }
+  vectorOfWeakReferencesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 78);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vectorOfStrongReferrables(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 80);
+    return offset ?
+        (obj || new Referrable())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  vectorOfStrongReferrablesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 80);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  coOwningReference() {
+    const offset = this.bb.__offset(this.bb_pos, 82);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_co_owning_reference(value) {
+    const offset = this.bb.__offset(this.bb_pos, 82);
+    if (offset === 0) {
+      return false;
     }
-    test(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  vectorOfCoOwningReferences(index) {
+    const offset = this.bb.__offset(this.bb_pos, 84);
+    return offset ?
+        this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) :
+        BigInt(0);
+  }
+  vectorOfCoOwningReferencesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 84);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  nonOwningReference() {
+    const offset = this.bb.__offset(this.bb_pos, 86);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_non_owning_reference(value) {
+    const offset = this.bb.__offset(this.bb_pos, 86);
+    if (offset === 0) {
+      return false;
     }
-    test4(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? (obj || new Test()).__init(this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) : null;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  vectorOfNonOwningReferences(index) {
+    const offset = this.bb.__offset(this.bb_pos, 88);
+    return offset ?
+        this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) :
+        BigInt(0);
+  }
+  vectorOfNonOwningReferencesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 88);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  anyUniqueType() {
+    const offset = this.bb.__offset(this.bb_pos, 90);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) :
+                    AnyUniqueAliases.NONE;
+  }
+  anyUnique(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 92);
+    return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
+  }
+  anyAmbiguousType() {
+    const offset = this.bb.__offset(this.bb_pos, 94);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) :
+                    AnyAmbiguousAliases.NONE;
+  }
+  anyAmbiguous(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 96);
+    return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
+  }
+  vectorOfEnums(index) {
+    const offset = this.bb.__offset(this.bb_pos, 98);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        null;
+  }
+  vectorOfEnumsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 98);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vectorOfEnumsArray() {
+    const offset = this.bb.__offset(this.bb_pos, 98);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  signedEnum() {
+    const offset = this.bb.__offset(this.bb_pos, 100);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : Race.None;
+  }
+  mutate_signed_enum(value) {
+    const offset = this.bb.__offset(this.bb_pos, 100);
+    if (offset === 0) {
+      return false;
     }
-    test4Length() {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+    this.bb.writeInt8(this.bb_pos + offset, value);
+    return true;
+  }
+  testrequirednestedflatbuffer(index) {
+    const offset = this.bb.__offset(this.bb_pos, 102);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        0;
+  }
+  testrequirednestedflatbufferLength() {
+    const offset = this.bb.__offset(this.bb_pos, 102);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testrequirednestedflatbufferArray() {
+    const offset = this.bb.__offset(this.bb_pos, 102);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  scalarKeySortedTables(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 104);
+    return offset ?
+        (obj || new Stat())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  scalarKeySortedTablesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 104);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  nativeInline(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 106);
+    return offset ? (obj || new Test()).__init(this.bb_pos + offset, this.bb) :
+                    null;
+  }
+  longEnumNonEnumDefault() {
+    const offset = this.bb.__offset(this.bb_pos, 108);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_long_enum_non_enum_default(value) {
+    const offset = this.bb.__offset(this.bb_pos, 108);
+    if (offset === 0) {
+      return false;
     }
-    testarrayofstring(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  longEnumNormalDefault() {
+    const offset = this.bb.__offset(this.bb_pos, 110);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('2');
+  }
+  mutate_long_enum_normal_default(value) {
+    const offset = this.bb.__offset(this.bb_pos, 110);
+    if (offset === 0) {
+      return false;
     }
-    testarrayofstringLength() {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+    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;
     }
-    /**
-     * an example documentation comment: this will end up in the generated code
-     * multiline too
-     */
-    testarrayoftables(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? (obj || new Monster()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
+    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;
     }
-    testarrayoftablesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+    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;
     }
-    enemy(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 28);
-        return offset ? (obj || new Monster()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
+    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;
     }
-    testnestedflatbuffer(index) {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
+    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;
     }
-    testnestedflatbufferLength() {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+    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;
     }
-    testnestedflatbufferArray() {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
+    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;
     }
-    testempty(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 32);
-        return offset ? (obj || new Stat()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
+    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;
     }
-    testbool() {
-        const offset = this.bb.__offset(this.bb_pos, 34);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+    this.bb.writeFloat64(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Monster';
+  }
+  static startMonster(builder) {
+    builder.startObject(62);
+  }
+  static addPos(builder, posOffset) {
+    builder.addFieldStruct(0, posOffset, 0);
+  }
+  static addMana(builder, mana) {
+    builder.addFieldInt16(1, mana, 150);
+  }
+  static addHp(builder, hp) {
+    builder.addFieldInt16(2, hp, 100);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(3, nameOffset, 0);
+  }
+  static addInventory(builder, inventoryOffset) {
+    builder.addFieldOffset(5, inventoryOffset, 0);
+  }
+  static createInventoryVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    mutate_testbool(value) {
-        const offset = this.bb.__offset(this.bb_pos, 34);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
+    return builder.endVector();
+  }
+  static startInventoryVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addColor(builder, color) {
+    builder.addFieldInt8(6, color, Color.Blue);
+  }
+  static addTestType(builder, testType) {
+    builder.addFieldInt8(7, testType, Any.NONE);
+  }
+  static addTest(builder, testOffset) {
+    builder.addFieldOffset(8, testOffset, 0);
+  }
+  static addTest4(builder, test4Offset) {
+    builder.addFieldOffset(9, test4Offset, 0);
+  }
+  static startTest4Vector(builder, numElems) {
+    builder.startVector(4, numElems, 2);
+  }
+  static addTestarrayofstring(builder, testarrayofstringOffset) {
+    builder.addFieldOffset(10, testarrayofstringOffset, 0);
+  }
+  static createTestarrayofstringVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    testhashs32Fnv1() {
-        const offset = this.bb.__offset(this.bb_pos, 36);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+    return builder.endVector();
+  }
+  static startTestarrayofstringVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addTestarrayoftables(builder, testarrayoftablesOffset) {
+    builder.addFieldOffset(11, testarrayoftablesOffset, 0);
+  }
+  static createTestarrayoftablesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    mutate_testhashs32_fnv1(value) {
-        const offset = this.bb.__offset(this.bb_pos, 36);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startTestarrayoftablesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addEnemy(builder, enemyOffset) {
+    builder.addFieldOffset(12, enemyOffset, 0);
+  }
+  static addTestnestedflatbuffer(builder, testnestedflatbufferOffset) {
+    builder.addFieldOffset(13, testnestedflatbufferOffset, 0);
+  }
+  static createTestnestedflatbufferVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    testhashu32Fnv1() {
-        const offset = this.bb.__offset(this.bb_pos, 38);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+    return builder.endVector();
+  }
+  static startTestnestedflatbufferVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addTestempty(builder, testemptyOffset) {
+    builder.addFieldOffset(14, testemptyOffset, 0);
+  }
+  static addTestbool(builder, testbool) {
+    builder.addFieldInt8(15, +testbool, +false);
+  }
+  static addTesthashs32Fnv1(builder, testhashs32Fnv1) {
+    builder.addFieldInt32(16, testhashs32Fnv1, 0);
+  }
+  static addTesthashu32Fnv1(builder, testhashu32Fnv1) {
+    builder.addFieldInt32(17, testhashu32Fnv1, 0);
+  }
+  static addTesthashs64Fnv1(builder, testhashs64Fnv1) {
+    builder.addFieldInt64(18, testhashs64Fnv1, BigInt('0'));
+  }
+  static addTesthashu64Fnv1(builder, testhashu64Fnv1) {
+    builder.addFieldInt64(19, testhashu64Fnv1, BigInt('0'));
+  }
+  static addTesthashs32Fnv1a(builder, testhashs32Fnv1a) {
+    builder.addFieldInt32(20, testhashs32Fnv1a, 0);
+  }
+  static addTesthashu32Fnv1a(builder, testhashu32Fnv1a) {
+    builder.addFieldInt32(21, testhashu32Fnv1a, 0);
+  }
+  static addTesthashs64Fnv1a(builder, testhashs64Fnv1a) {
+    builder.addFieldInt64(22, testhashs64Fnv1a, BigInt('0'));
+  }
+  static addTesthashu64Fnv1a(builder, testhashu64Fnv1a) {
+    builder.addFieldInt64(23, testhashu64Fnv1a, BigInt('0'));
+  }
+  static addTestarrayofbools(builder, testarrayofboolsOffset) {
+    builder.addFieldOffset(24, testarrayofboolsOffset, 0);
+  }
+  static createTestarrayofboolsVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(+data[i]);
     }
-    mutate_testhashu32_fnv1(value) {
-        const offset = this.bb.__offset(this.bb_pos, 38);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint32(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startTestarrayofboolsVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addTestf(builder, testf) {
+    builder.addFieldFloat32(25, testf, 3.14159);
+  }
+  static addTestf2(builder, testf2) {
+    builder.addFieldFloat32(26, testf2, 3.0);
+  }
+  static addTestf3(builder, testf3) {
+    builder.addFieldFloat32(27, testf3, 0.0);
+  }
+  static addTestarrayofstring2(builder, testarrayofstring2Offset) {
+    builder.addFieldOffset(28, testarrayofstring2Offset, 0);
+  }
+  static createTestarrayofstring2Vector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    testhashs64Fnv1() {
-        const offset = this.bb.__offset(this.bb_pos, 40);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+    return builder.endVector();
+  }
+  static startTestarrayofstring2Vector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addTestarrayofsortedstruct(builder, testarrayofsortedstructOffset) {
+    builder.addFieldOffset(29, testarrayofsortedstructOffset, 0);
+  }
+  static startTestarrayofsortedstructVector(builder, numElems) {
+    builder.startVector(8, numElems, 4);
+  }
+  static addFlex(builder, flexOffset) {
+    builder.addFieldOffset(30, flexOffset, 0);
+  }
+  static createFlexVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    mutate_testhashs64_fnv1(value) {
-        const offset = this.bb.__offset(this.bb_pos, 40);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startFlexVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addTest5(builder, test5Offset) {
+    builder.addFieldOffset(31, test5Offset, 0);
+  }
+  static startTest5Vector(builder, numElems) {
+    builder.startVector(4, numElems, 2);
+  }
+  static addVectorOfLongs(builder, vectorOfLongsOffset) {
+    builder.addFieldOffset(32, vectorOfLongsOffset, 0);
+  }
+  static createVectorOfLongsVector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt64(data[i]);
     }
-    testhashu64Fnv1() {
-        const offset = this.bb.__offset(this.bb_pos, 42);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+    return builder.endVector();
+  }
+  static startVectorOfLongsVector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static addVectorOfDoubles(builder, vectorOfDoublesOffset) {
+    builder.addFieldOffset(33, vectorOfDoublesOffset, 0);
+  }
+  static createVectorOfDoublesVector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addFloat64(data[i]);
     }
-    mutate_testhashu64_fnv1(value) {
-        const offset = this.bb.__offset(this.bb_pos, 42);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startVectorOfDoublesVector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static addParentNamespaceTest(builder, parentNamespaceTestOffset) {
+    builder.addFieldOffset(34, parentNamespaceTestOffset, 0);
+  }
+  static addVectorOfReferrables(builder, vectorOfReferrablesOffset) {
+    builder.addFieldOffset(35, vectorOfReferrablesOffset, 0);
+  }
+  static createVectorOfReferrablesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    testhashs32Fnv1a() {
-        const offset = this.bb.__offset(this.bb_pos, 44);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+    return builder.endVector();
+  }
+  static startVectorOfReferrablesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addSingleWeakReference(builder, singleWeakReference) {
+    builder.addFieldInt64(36, singleWeakReference, BigInt('0'));
+  }
+  static addVectorOfWeakReferences(builder, vectorOfWeakReferencesOffset) {
+    builder.addFieldOffset(37, vectorOfWeakReferencesOffset, 0);
+  }
+  static createVectorOfWeakReferencesVector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt64(data[i]);
     }
-    mutate_testhashs32_fnv1a(value) {
-        const offset = this.bb.__offset(this.bb_pos, 44);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startVectorOfWeakReferencesVector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static addVectorOfStrongReferrables(
+      builder, vectorOfStrongReferrablesOffset) {
+    builder.addFieldOffset(38, vectorOfStrongReferrablesOffset, 0);
+  }
+  static createVectorOfStrongReferrablesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    testhashu32Fnv1a() {
-        const offset = this.bb.__offset(this.bb_pos, 46);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+    return builder.endVector();
+  }
+  static startVectorOfStrongReferrablesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addCoOwningReference(builder, coOwningReference) {
+    builder.addFieldInt64(39, coOwningReference, BigInt('0'));
+  }
+  static addVectorOfCoOwningReferences(
+      builder, vectorOfCoOwningReferencesOffset) {
+    builder.addFieldOffset(40, vectorOfCoOwningReferencesOffset, 0);
+  }
+  static createVectorOfCoOwningReferencesVector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt64(data[i]);
     }
-    mutate_testhashu32_fnv1a(value) {
-        const offset = this.bb.__offset(this.bb_pos, 46);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint32(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startVectorOfCoOwningReferencesVector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static addNonOwningReference(builder, nonOwningReference) {
+    builder.addFieldInt64(41, nonOwningReference, BigInt('0'));
+  }
+  static addVectorOfNonOwningReferences(
+      builder, vectorOfNonOwningReferencesOffset) {
+    builder.addFieldOffset(42, vectorOfNonOwningReferencesOffset, 0);
+  }
+  static createVectorOfNonOwningReferencesVector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt64(data[i]);
     }
-    testhashs64Fnv1a() {
-        const offset = this.bb.__offset(this.bb_pos, 48);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+    return builder.endVector();
+  }
+  static startVectorOfNonOwningReferencesVector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static addAnyUniqueType(builder, anyUniqueType) {
+    builder.addFieldInt8(43, anyUniqueType, AnyUniqueAliases.NONE);
+  }
+  static addAnyUnique(builder, anyUniqueOffset) {
+    builder.addFieldOffset(44, anyUniqueOffset, 0);
+  }
+  static addAnyAmbiguousType(builder, anyAmbiguousType) {
+    builder.addFieldInt8(45, anyAmbiguousType, AnyAmbiguousAliases.NONE);
+  }
+  static addAnyAmbiguous(builder, anyAmbiguousOffset) {
+    builder.addFieldOffset(46, anyAmbiguousOffset, 0);
+  }
+  static addVectorOfEnums(builder, vectorOfEnumsOffset) {
+    builder.addFieldOffset(47, vectorOfEnumsOffset, 0);
+  }
+  static createVectorOfEnumsVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    mutate_testhashs64_fnv1a(value) {
-        const offset = this.bb.__offset(this.bb_pos, 48);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
-    }
-    testhashu64Fnv1a() {
-        const offset = this.bb.__offset(this.bb_pos, 50);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_testhashu64_fnv1a(value) {
-        const offset = this.bb.__offset(this.bb_pos, 50);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    testarrayofbools(index) {
-        const offset = this.bb.__offset(this.bb_pos, 52);
-        return offset ? !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : false;
-    }
-    testarrayofboolsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 52);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    testarrayofboolsArray() {
-        const offset = this.bb.__offset(this.bb_pos, 52);
-        return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    testf() {
-        const offset = this.bb.__offset(this.bb_pos, 54);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.14159;
-    }
-    mutate_testf(value) {
-        const offset = this.bb.__offset(this.bb_pos, 54);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat32(this.bb_pos + offset, value);
-        return true;
-    }
-    testf2() {
-        const offset = this.bb.__offset(this.bb_pos, 56);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.0;
-    }
-    mutate_testf2(value) {
-        const offset = this.bb.__offset(this.bb_pos, 56);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat32(this.bb_pos + offset, value);
-        return true;
-    }
-    testf3() {
-        const offset = this.bb.__offset(this.bb_pos, 58);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
-    }
-    mutate_testf3(value) {
-        const offset = this.bb.__offset(this.bb_pos, 58);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat32(this.bb_pos + offset, value);
-        return true;
-    }
-    testarrayofstring2(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 60);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    testarrayofstring2Length() {
-        const offset = this.bb.__offset(this.bb_pos, 60);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    testarrayofsortedstruct(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 62);
-        return offset ? (obj || new Ability()).__init(this.bb.__vector(this.bb_pos + offset) + index * 8, this.bb) : null;
-    }
-    testarrayofsortedstructLength() {
-        const offset = this.bb.__offset(this.bb_pos, 62);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    flex(index) {
-        const offset = this.bb.__offset(this.bb_pos, 64);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
-    }
-    flexLength() {
-        const offset = this.bb.__offset(this.bb_pos, 64);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    flexArray() {
-        const offset = this.bb.__offset(this.bb_pos, 64);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    test5(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 66);
-        return offset ? (obj || new Test()).__init(this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) : null;
-    }
-    test5Length() {
-        const offset = this.bb.__offset(this.bb_pos, 66);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vectorOfLongs(index) {
-        const offset = this.bb.__offset(this.bb_pos, 68);
-        return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);
-    }
-    vectorOfLongsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 68);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vectorOfDoubles(index) {
-        const offset = this.bb.__offset(this.bb_pos, 70);
-        return offset ? this.bb.readFloat64(this.bb.__vector(this.bb_pos + offset) + index * 8) : 0;
-    }
-    vectorOfDoublesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 70);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vectorOfDoublesArray() {
-        const offset = this.bb.__offset(this.bb_pos, 70);
-        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;
-    }
-    parentNamespaceTest(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 72);
-        return offset ? (obj || new InParentNamespace()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    vectorOfReferrables(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 74);
-        return offset ? (obj || new Referrable()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    vectorOfReferrablesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 74);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    singleWeakReference() {
-        const offset = this.bb.__offset(this.bb_pos, 76);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_single_weak_reference(value) {
-        const offset = this.bb.__offset(this.bb_pos, 76);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    vectorOfWeakReferences(index) {
-        const offset = this.bb.__offset(this.bb_pos, 78);
-        return offset ? this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);
-    }
-    vectorOfWeakReferencesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 78);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vectorOfStrongReferrables(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 80);
-        return offset ? (obj || new Referrable()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    vectorOfStrongReferrablesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 80);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    coOwningReference() {
-        const offset = this.bb.__offset(this.bb_pos, 82);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_co_owning_reference(value) {
-        const offset = this.bb.__offset(this.bb_pos, 82);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    vectorOfCoOwningReferences(index) {
-        const offset = this.bb.__offset(this.bb_pos, 84);
-        return offset ? this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);
-    }
-    vectorOfCoOwningReferencesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 84);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    nonOwningReference() {
-        const offset = this.bb.__offset(this.bb_pos, 86);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_non_owning_reference(value) {
-        const offset = this.bb.__offset(this.bb_pos, 86);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    vectorOfNonOwningReferences(index) {
-        const offset = this.bb.__offset(this.bb_pos, 88);
-        return offset ? this.bb.readUint64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);
-    }
-    vectorOfNonOwningReferencesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 88);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    anyUniqueType() {
-        const offset = this.bb.__offset(this.bb_pos, 90);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : AnyUniqueAliases.NONE;
-    }
-    anyUnique(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 92);
-        return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
-    }
-    anyAmbiguousType() {
-        const offset = this.bb.__offset(this.bb_pos, 94);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : AnyAmbiguousAliases.NONE;
-    }
-    anyAmbiguous(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 96);
-        return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
-    }
-    vectorOfEnums(index) {
-        const offset = this.bb.__offset(this.bb_pos, 98);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : null;
-    }
-    vectorOfEnumsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 98);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vectorOfEnumsArray() {
-        const offset = this.bb.__offset(this.bb_pos, 98);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    signedEnum() {
-        const offset = this.bb.__offset(this.bb_pos, 100);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : Race.None;
-    }
-    mutate_signed_enum(value) {
-        const offset = this.bb.__offset(this.bb_pos, 100);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, value);
-        return true;
-    }
-    testrequirednestedflatbuffer(index) {
-        const offset = this.bb.__offset(this.bb_pos, 102);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
-    }
-    testrequirednestedflatbufferLength() {
-        const offset = this.bb.__offset(this.bb_pos, 102);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    testrequirednestedflatbufferArray() {
-        const offset = this.bb.__offset(this.bb_pos, 102);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    scalarKeySortedTables(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 104);
-        return offset ? (obj || new Stat()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    scalarKeySortedTablesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 104);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    nativeInline(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 106);
-        return offset ? (obj || new Test()).__init(this.bb_pos + offset, this.bb) : null;
-    }
-    longEnumNonEnumDefault() {
-        const offset = this.bb.__offset(this.bb_pos, 108);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_long_enum_non_enum_default(value) {
-        const offset = this.bb.__offset(this.bb_pos, 108);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    longEnumNormalDefault() {
-        const offset = this.bb.__offset(this.bb_pos, 110);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('2');
-    }
-    mutate_long_enum_normal_default(value) {
-        const offset = this.bb.__offset(this.bb_pos, 110);
-        if (offset === 0) {
-            return false;
-        }
-        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;
-    }
-    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';
-    }
-    static startMonster(builder) {
-        builder.startObject(62);
-    }
-    static addPos(builder, posOffset) {
-        builder.addFieldStruct(0, posOffset, 0);
-    }
-    static addMana(builder, mana) {
-        builder.addFieldInt16(1, mana, 150);
-    }
-    static addHp(builder, hp) {
-        builder.addFieldInt16(2, hp, 100);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(3, nameOffset, 0);
-    }
-    static addInventory(builder, inventoryOffset) {
-        builder.addFieldOffset(5, inventoryOffset, 0);
-    }
-    static createInventoryVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startInventoryVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addColor(builder, color) {
-        builder.addFieldInt8(6, color, Color.Blue);
-    }
-    static addTestType(builder, testType) {
-        builder.addFieldInt8(7, testType, Any.NONE);
-    }
-    static addTest(builder, testOffset) {
-        builder.addFieldOffset(8, testOffset, 0);
-    }
-    static addTest4(builder, test4Offset) {
-        builder.addFieldOffset(9, test4Offset, 0);
-    }
-    static startTest4Vector(builder, numElems) {
-        builder.startVector(4, numElems, 2);
-    }
-    static addTestarrayofstring(builder, testarrayofstringOffset) {
-        builder.addFieldOffset(10, testarrayofstringOffset, 0);
-    }
-    static createTestarrayofstringVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestarrayofstringVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addTestarrayoftables(builder, testarrayoftablesOffset) {
-        builder.addFieldOffset(11, testarrayoftablesOffset, 0);
-    }
-    static createTestarrayoftablesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestarrayoftablesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addEnemy(builder, enemyOffset) {
-        builder.addFieldOffset(12, enemyOffset, 0);
-    }
-    static addTestnestedflatbuffer(builder, testnestedflatbufferOffset) {
-        builder.addFieldOffset(13, testnestedflatbufferOffset, 0);
-    }
-    static createTestnestedflatbufferVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestnestedflatbufferVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addTestempty(builder, testemptyOffset) {
-        builder.addFieldOffset(14, testemptyOffset, 0);
-    }
-    static addTestbool(builder, testbool) {
-        builder.addFieldInt8(15, +testbool, +false);
-    }
-    static addTesthashs32Fnv1(builder, testhashs32Fnv1) {
-        builder.addFieldInt32(16, testhashs32Fnv1, 0);
-    }
-    static addTesthashu32Fnv1(builder, testhashu32Fnv1) {
-        builder.addFieldInt32(17, testhashu32Fnv1, 0);
-    }
-    static addTesthashs64Fnv1(builder, testhashs64Fnv1) {
-        builder.addFieldInt64(18, testhashs64Fnv1, BigInt('0'));
-    }
-    static addTesthashu64Fnv1(builder, testhashu64Fnv1) {
-        builder.addFieldInt64(19, testhashu64Fnv1, BigInt('0'));
-    }
-    static addTesthashs32Fnv1a(builder, testhashs32Fnv1a) {
-        builder.addFieldInt32(20, testhashs32Fnv1a, 0);
-    }
-    static addTesthashu32Fnv1a(builder, testhashu32Fnv1a) {
-        builder.addFieldInt32(21, testhashu32Fnv1a, 0);
-    }
-    static addTesthashs64Fnv1a(builder, testhashs64Fnv1a) {
-        builder.addFieldInt64(22, testhashs64Fnv1a, BigInt('0'));
-    }
-    static addTesthashu64Fnv1a(builder, testhashu64Fnv1a) {
-        builder.addFieldInt64(23, testhashu64Fnv1a, BigInt('0'));
-    }
-    static addTestarrayofbools(builder, testarrayofboolsOffset) {
-        builder.addFieldOffset(24, testarrayofboolsOffset, 0);
-    }
-    static createTestarrayofboolsVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(+data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestarrayofboolsVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addTestf(builder, testf) {
-        builder.addFieldFloat32(25, testf, 3.14159);
-    }
-    static addTestf2(builder, testf2) {
-        builder.addFieldFloat32(26, testf2, 3.0);
-    }
-    static addTestf3(builder, testf3) {
-        builder.addFieldFloat32(27, testf3, 0.0);
-    }
-    static addTestarrayofstring2(builder, testarrayofstring2Offset) {
-        builder.addFieldOffset(28, testarrayofstring2Offset, 0);
-    }
-    static createTestarrayofstring2Vector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestarrayofstring2Vector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addTestarrayofsortedstruct(builder, testarrayofsortedstructOffset) {
-        builder.addFieldOffset(29, testarrayofsortedstructOffset, 0);
-    }
-    static startTestarrayofsortedstructVector(builder, numElems) {
-        builder.startVector(8, numElems, 4);
-    }
-    static addFlex(builder, flexOffset) {
-        builder.addFieldOffset(30, flexOffset, 0);
-    }
-    static createFlexVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startFlexVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addTest5(builder, test5Offset) {
-        builder.addFieldOffset(31, test5Offset, 0);
-    }
-    static startTest5Vector(builder, numElems) {
-        builder.startVector(4, numElems, 2);
-    }
-    static addVectorOfLongs(builder, vectorOfLongsOffset) {
-        builder.addFieldOffset(32, vectorOfLongsOffset, 0);
-    }
-    static createVectorOfLongsVector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfLongsVector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static addVectorOfDoubles(builder, vectorOfDoublesOffset) {
-        builder.addFieldOffset(33, vectorOfDoublesOffset, 0);
-    }
-    static createVectorOfDoublesVector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addFloat64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfDoublesVector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static addParentNamespaceTest(builder, parentNamespaceTestOffset) {
-        builder.addFieldOffset(34, parentNamespaceTestOffset, 0);
-    }
-    static addVectorOfReferrables(builder, vectorOfReferrablesOffset) {
-        builder.addFieldOffset(35, vectorOfReferrablesOffset, 0);
-    }
-    static createVectorOfReferrablesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfReferrablesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addSingleWeakReference(builder, singleWeakReference) {
-        builder.addFieldInt64(36, singleWeakReference, BigInt('0'));
-    }
-    static addVectorOfWeakReferences(builder, vectorOfWeakReferencesOffset) {
-        builder.addFieldOffset(37, vectorOfWeakReferencesOffset, 0);
-    }
-    static createVectorOfWeakReferencesVector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfWeakReferencesVector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static addVectorOfStrongReferrables(builder, vectorOfStrongReferrablesOffset) {
-        builder.addFieldOffset(38, vectorOfStrongReferrablesOffset, 0);
-    }
-    static createVectorOfStrongReferrablesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfStrongReferrablesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addCoOwningReference(builder, coOwningReference) {
-        builder.addFieldInt64(39, coOwningReference, BigInt('0'));
-    }
-    static addVectorOfCoOwningReferences(builder, vectorOfCoOwningReferencesOffset) {
-        builder.addFieldOffset(40, vectorOfCoOwningReferencesOffset, 0);
-    }
-    static createVectorOfCoOwningReferencesVector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfCoOwningReferencesVector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static addNonOwningReference(builder, nonOwningReference) {
-        builder.addFieldInt64(41, nonOwningReference, BigInt('0'));
-    }
-    static addVectorOfNonOwningReferences(builder, vectorOfNonOwningReferencesOffset) {
-        builder.addFieldOffset(42, vectorOfNonOwningReferencesOffset, 0);
-    }
-    static createVectorOfNonOwningReferencesVector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfNonOwningReferencesVector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static addAnyUniqueType(builder, anyUniqueType) {
-        builder.addFieldInt8(43, anyUniqueType, AnyUniqueAliases.NONE);
-    }
-    static addAnyUnique(builder, anyUniqueOffset) {
-        builder.addFieldOffset(44, anyUniqueOffset, 0);
-    }
-    static addAnyAmbiguousType(builder, anyAmbiguousType) {
-        builder.addFieldInt8(45, anyAmbiguousType, AnyAmbiguousAliases.NONE);
-    }
-    static addAnyAmbiguous(builder, anyAmbiguousOffset) {
-        builder.addFieldOffset(46, anyAmbiguousOffset, 0);
-    }
-    static addVectorOfEnums(builder, vectorOfEnumsOffset) {
-        builder.addFieldOffset(47, vectorOfEnumsOffset, 0);
-    }
-    static createVectorOfEnumsVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVectorOfEnumsVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addSignedEnum(builder, signedEnum) {
-        builder.addFieldInt8(48, signedEnum, Race.None);
-    }
-    static addTestrequirednestedflatbuffer(builder, testrequirednestedflatbufferOffset) {
-        builder.addFieldOffset(49, testrequirednestedflatbufferOffset, 0);
-    }
-    static createTestrequirednestedflatbufferVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestrequirednestedflatbufferVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addScalarKeySortedTables(builder, scalarKeySortedTablesOffset) {
-        builder.addFieldOffset(50, scalarKeySortedTablesOffset, 0);
-    }
-    static createScalarKeySortedTablesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startScalarKeySortedTablesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addNativeInline(builder, nativeInlineOffset) {
-        builder.addFieldStruct(51, nativeInlineOffset, 0);
-    }
-    static addLongEnumNonEnumDefault(builder, longEnumNonEnumDefault) {
-        builder.addFieldInt64(52, longEnumNonEnumDefault, BigInt('0'));
-    }
-    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 addDoubleInfDefault(builder, doubleInfDefault) {
-        builder.addFieldFloat64(61, doubleInfDefault, Infinity);
-    }
-    static endMonster(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 10); // name
-        return offset;
-    }
-    static finishMonsterBuffer(builder, offset) {
-        builder.finish(offset, 'MONS');
-    }
-    static finishSizePrefixedMonsterBuffer(builder, offset) {
-        builder.finish(offset, 'MONS', true);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
-    }
-    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(), (() => {
-            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(), (() => {
-            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
-            if (temp === null) {
-                return null;
-            }
-            return temp.unpack();
-        })(), this.anyAmbiguousType(), (() => {
-            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.nanDefault(), this.infDefault(), this.positiveInfDefault(), this.infinityDefault(), this.positiveInfinityDefault(), this.negativeInfDefault(), this.negativeInfinityDefault(), this.doubleInfDefault());
+    return builder.endVector();
+  }
+  static startVectorOfEnumsVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addSignedEnum(builder, signedEnum) {
+    builder.addFieldInt8(48, signedEnum, Race.None);
+  }
+  static addTestrequirednestedflatbuffer(
+      builder, testrequirednestedflatbufferOffset) {
+    builder.addFieldOffset(49, testrequirednestedflatbufferOffset, 0);
+  }
+  static createTestrequirednestedflatbufferVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    unpackTo(_o) {
-        _o.pos = (this.pos() !== null ? this.pos().unpack() : null);
-        _o.mana = this.mana();
-        _o.hp = this.hp();
-        _o.name = this.name();
-        _o.inventory = this.bb.createScalarList(this.inventory.bind(this), this.inventoryLength());
-        _o.color = this.color();
-        _o.testType = this.testType();
-        _o.test = (() => {
-            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.enemy = (this.enemy() !== null ? this.enemy().unpack() : null);
-        _o.testnestedflatbuffer = this.bb.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength());
-        _o.testempty = (this.testempty() !== null ? this.testempty().unpack() : null);
-        _o.testbool = this.testbool();
-        _o.testhashs32Fnv1 = this.testhashs32Fnv1();
-        _o.testhashu32Fnv1 = this.testhashu32Fnv1();
-        _o.testhashs64Fnv1 = this.testhashs64Fnv1();
-        _o.testhashu64Fnv1 = this.testhashu64Fnv1();
-        _o.testhashs32Fnv1a = this.testhashs32Fnv1a();
-        _o.testhashu32Fnv1a = this.testhashu32Fnv1a();
-        _o.testhashs64Fnv1a = this.testhashs64Fnv1a();
-        _o.testhashu64Fnv1a = this.testhashu64Fnv1a();
-        _o.testarrayofbools = this.bb.createScalarList(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.parentNamespaceTest = (this.parentNamespaceTest() !== null ? this.parentNamespaceTest().unpack() : null);
-        _o.vectorOfReferrables = this.bb.createObjList(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.coOwningReference = this.coOwningReference();
-        _o.vectorOfCoOwningReferences = this.bb.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength());
-        _o.nonOwningReference = this.nonOwningReference();
-        _o.vectorOfNonOwningReferences = this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
-        _o.anyUniqueType = this.anyUniqueType();
-        _o.anyUnique = (() => {
-            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
-            if (temp === null) {
-                return null;
-            }
-            return temp.unpack();
-        })();
-        _o.anyAmbiguousType = this.anyAmbiguousType();
-        _o.anyAmbiguous = (() => {
-            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.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.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();
+    return builder.endVector();
+  }
+  static startTestrequirednestedflatbufferVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addScalarKeySortedTables(builder, scalarKeySortedTablesOffset) {
+    builder.addFieldOffset(50, scalarKeySortedTablesOffset, 0);
+  }
+  static createScalarKeySortedTablesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
+    return builder.endVector();
+  }
+  static startScalarKeySortedTablesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addNativeInline(builder, nativeInlineOffset) {
+    builder.addFieldStruct(51, nativeInlineOffset, 0);
+  }
+  static addLongEnumNonEnumDefault(builder, longEnumNonEnumDefault) {
+    builder.addFieldInt64(52, longEnumNonEnumDefault, BigInt('0'));
+  }
+  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 addDoubleInfDefault(builder, doubleInfDefault) {
+    builder.addFieldFloat64(61, doubleInfDefault, Infinity);
+  }
+  static endMonster(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 10);  // name
+    return offset;
+  }
+  static finishMonsterBuffer(builder, offset) {
+    builder.finish(offset, 'MONS');
+  }
+  static finishSizePrefixedMonsterBuffer(builder, offset) {
+    builder.finish(offset, 'MONS', true);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
+  }
+  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(), (() => {
+          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(), (() => {
+          const temp = unionToAnyUniqueAliases(
+              this.anyUniqueType(), this.anyUnique.bind(this));
+          if (temp === null) {
+            return null;
+          }
+          return temp.unpack();
+        })(),
+        this.anyAmbiguousType(), (() => {
+          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.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);
+    _o.mana = this.mana();
+    _o.hp = this.hp();
+    _o.name = this.name();
+    _o.inventory = this.bb.createScalarList(
+        this.inventory.bind(this), this.inventoryLength());
+    _o.color = this.color();
+    _o.testType = this.testType();
+    _o.test = (() => {
+      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.enemy = (this.enemy() !== null ? this.enemy().unpack() : null);
+    _o.testnestedflatbuffer = this.bb.createScalarList(
+        this.testnestedflatbuffer.bind(this),
+        this.testnestedflatbufferLength());
+    _o.testempty =
+        (this.testempty() !== null ? this.testempty().unpack() : null);
+    _o.testbool = this.testbool();
+    _o.testhashs32Fnv1 = this.testhashs32Fnv1();
+    _o.testhashu32Fnv1 = this.testhashu32Fnv1();
+    _o.testhashs64Fnv1 = this.testhashs64Fnv1();
+    _o.testhashu64Fnv1 = this.testhashu64Fnv1();
+    _o.testhashs32Fnv1a = this.testhashs32Fnv1a();
+    _o.testhashu32Fnv1a = this.testhashu32Fnv1a();
+    _o.testhashs64Fnv1a = this.testhashs64Fnv1a();
+    _o.testhashu64Fnv1a = this.testhashu64Fnv1a();
+    _o.testarrayofbools = this.bb.createScalarList(
+        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.parentNamespaceTest =
+        (this.parentNamespaceTest() !== null ?
+             this.parentNamespaceTest().unpack() :
+             null);
+    _o.vectorOfReferrables = this.bb.createObjList(
+        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.coOwningReference = this.coOwningReference();
+    _o.vectorOfCoOwningReferences = this.bb.createScalarList(
+        this.vectorOfCoOwningReferences.bind(this),
+        this.vectorOfCoOwningReferencesLength());
+    _o.nonOwningReference = this.nonOwningReference();
+    _o.vectorOfNonOwningReferences = this.bb.createScalarList(
+        this.vectorOfNonOwningReferences.bind(this),
+        this.vectorOfNonOwningReferencesLength());
+    _o.anyUniqueType = this.anyUniqueType();
+    _o.anyUnique = (() => {
+      const temp = unionToAnyUniqueAliases(
+          this.anyUniqueType(), this.anyUnique.bind(this));
+      if (temp === null) {
+        return null;
+      }
+      return temp.unpack();
+    })();
+    _o.anyAmbiguousType = this.anyAmbiguousType();
+    _o.anyAmbiguous = (() => {
+      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.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.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 {
-    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;
-        this.name = name;
-        this.inventory = inventory;
-        this.color = color;
-        this.testType = testType;
-        this.test = test;
-        this.test4 = test4;
-        this.testarrayofstring = testarrayofstring;
-        this.testarrayoftables = testarrayoftables;
-        this.enemy = enemy;
-        this.testnestedflatbuffer = testnestedflatbuffer;
-        this.testempty = testempty;
-        this.testbool = testbool;
-        this.testhashs32Fnv1 = testhashs32Fnv1;
-        this.testhashu32Fnv1 = testhashu32Fnv1;
-        this.testhashs64Fnv1 = testhashs64Fnv1;
-        this.testhashu64Fnv1 = testhashu64Fnv1;
-        this.testhashs32Fnv1a = testhashs32Fnv1a;
-        this.testhashu32Fnv1a = testhashu32Fnv1a;
-        this.testhashs64Fnv1a = testhashs64Fnv1a;
-        this.testhashu64Fnv1a = testhashu64Fnv1a;
-        this.testarrayofbools = testarrayofbools;
-        this.testf = testf;
-        this.testf2 = testf2;
-        this.testf3 = testf3;
-        this.testarrayofstring2 = testarrayofstring2;
-        this.testarrayofsortedstruct = testarrayofsortedstruct;
-        this.flex = flex;
-        this.test5 = test5;
-        this.vectorOfLongs = vectorOfLongs;
-        this.vectorOfDoubles = vectorOfDoubles;
-        this.parentNamespaceTest = parentNamespaceTest;
-        this.vectorOfReferrables = vectorOfReferrables;
-        this.singleWeakReference = singleWeakReference;
-        this.vectorOfWeakReferences = vectorOfWeakReferences;
-        this.vectorOfStrongReferrables = vectorOfStrongReferrables;
-        this.coOwningReference = coOwningReference;
-        this.vectorOfCoOwningReferences = vectorOfCoOwningReferences;
-        this.nonOwningReference = nonOwningReference;
-        this.vectorOfNonOwningReferences = vectorOfNonOwningReferences;
-        this.anyUniqueType = anyUniqueType;
-        this.anyUnique = anyUnique;
-        this.anyAmbiguousType = anyAmbiguousType;
-        this.anyAmbiguous = anyAmbiguous;
-        this.vectorOfEnums = vectorOfEnums;
-        this.signedEnum = signedEnum;
-        this.testrequirednestedflatbuffer = testrequirednestedflatbuffer;
-        this.scalarKeySortedTables = scalarKeySortedTables;
-        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;
-        this.doubleInfDefault = doubleInfDefault;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const inventory = Monster.createInventoryVector(builder, this.inventory);
-        const test = builder.createObjectOffset(this.test);
-        const test4 = builder.createStructOffsetList(this.test4, Monster.startTest4Vector);
-        const testarrayofstring = Monster.createTestarrayofstringVector(builder, builder.createObjectOffsetList(this.testarrayofstring));
-        const testarrayoftables = Monster.createTestarrayoftablesVector(builder, builder.createObjectOffsetList(this.testarrayoftables));
-        const enemy = (this.enemy !== null ? this.enemy.pack(builder) : 0);
-        const testnestedflatbuffer = Monster.createTestnestedflatbufferVector(builder, this.testnestedflatbuffer);
-        const testempty = (this.testempty !== null ? this.testempty.pack(builder) : 0);
-        const testarrayofbools = Monster.createTestarrayofboolsVector(builder, this.testarrayofbools);
-        const testarrayofstring2 = Monster.createTestarrayofstring2Vector(builder, builder.createObjectOffsetList(this.testarrayofstring2));
-        const testarrayofsortedstruct = builder.createStructOffsetList(this.testarrayofsortedstruct, Monster.startTestarrayofsortedstructVector);
-        const flex = Monster.createFlexVector(builder, this.flex);
-        const test5 = builder.createStructOffsetList(this.test5, Monster.startTest5Vector);
-        const vectorOfLongs = Monster.createVectorOfLongsVector(builder, this.vectorOfLongs);
-        const vectorOfDoubles = Monster.createVectorOfDoublesVector(builder, this.vectorOfDoubles);
-        const parentNamespaceTest = (this.parentNamespaceTest !== null ? this.parentNamespaceTest.pack(builder) : 0);
-        const vectorOfReferrables = Monster.createVectorOfReferrablesVector(builder, builder.createObjectOffsetList(this.vectorOfReferrables));
-        const vectorOfWeakReferences = Monster.createVectorOfWeakReferencesVector(builder, this.vectorOfWeakReferences);
-        const vectorOfStrongReferrables = Monster.createVectorOfStrongReferrablesVector(builder, builder.createObjectOffsetList(this.vectorOfStrongReferrables));
-        const vectorOfCoOwningReferences = Monster.createVectorOfCoOwningReferencesVector(builder, this.vectorOfCoOwningReferences);
-        const vectorOfNonOwningReferences = Monster.createVectorOfNonOwningReferencesVector(builder, this.vectorOfNonOwningReferences);
-        const anyUnique = builder.createObjectOffset(this.anyUnique);
-        const anyAmbiguous = builder.createObjectOffset(this.anyAmbiguous);
-        const vectorOfEnums = Monster.createVectorOfEnumsVector(builder, this.vectorOfEnums);
-        const testrequirednestedflatbuffer = Monster.createTestrequirednestedflatbufferVector(builder, this.testrequirednestedflatbuffer);
-        const scalarKeySortedTables = Monster.createScalarKeySortedTablesVector(builder, builder.createObjectOffsetList(this.scalarKeySortedTables));
-        Monster.startMonster(builder);
-        Monster.addPos(builder, (this.pos !== null ? this.pos.pack(builder) : 0));
-        Monster.addMana(builder, this.mana);
-        Monster.addHp(builder, this.hp);
-        Monster.addName(builder, name);
-        Monster.addInventory(builder, inventory);
-        Monster.addColor(builder, this.color);
-        Monster.addTestType(builder, this.testType);
-        Monster.addTest(builder, test);
-        Monster.addTest4(builder, test4);
-        Monster.addTestarrayofstring(builder, testarrayofstring);
-        Monster.addTestarrayoftables(builder, testarrayoftables);
-        Monster.addEnemy(builder, enemy);
-        Monster.addTestnestedflatbuffer(builder, testnestedflatbuffer);
-        Monster.addTestempty(builder, testempty);
-        Monster.addTestbool(builder, this.testbool);
-        Monster.addTesthashs32Fnv1(builder, this.testhashs32Fnv1);
-        Monster.addTesthashu32Fnv1(builder, this.testhashu32Fnv1);
-        Monster.addTesthashs64Fnv1(builder, this.testhashs64Fnv1);
-        Monster.addTesthashu64Fnv1(builder, this.testhashu64Fnv1);
-        Monster.addTesthashs32Fnv1a(builder, this.testhashs32Fnv1a);
-        Monster.addTesthashu32Fnv1a(builder, this.testhashu32Fnv1a);
-        Monster.addTesthashs64Fnv1a(builder, this.testhashs64Fnv1a);
-        Monster.addTesthashu64Fnv1a(builder, this.testhashu64Fnv1a);
-        Monster.addTestarrayofbools(builder, testarrayofbools);
-        Monster.addTestf(builder, this.testf);
-        Monster.addTestf2(builder, this.testf2);
-        Monster.addTestf3(builder, this.testf3);
-        Monster.addTestarrayofstring2(builder, testarrayofstring2);
-        Monster.addTestarrayofsortedstruct(builder, testarrayofsortedstruct);
-        Monster.addFlex(builder, flex);
-        Monster.addTest5(builder, test5);
-        Monster.addVectorOfLongs(builder, vectorOfLongs);
-        Monster.addVectorOfDoubles(builder, vectorOfDoubles);
-        Monster.addParentNamespaceTest(builder, parentNamespaceTest);
-        Monster.addVectorOfReferrables(builder, vectorOfReferrables);
-        Monster.addSingleWeakReference(builder, this.singleWeakReference);
-        Monster.addVectorOfWeakReferences(builder, vectorOfWeakReferences);
-        Monster.addVectorOfStrongReferrables(builder, vectorOfStrongReferrables);
-        Monster.addCoOwningReference(builder, this.coOwningReference);
-        Monster.addVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences);
-        Monster.addNonOwningReference(builder, this.nonOwningReference);
-        Monster.addVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences);
-        Monster.addAnyUniqueType(builder, this.anyUniqueType);
-        Monster.addAnyUnique(builder, anyUnique);
-        Monster.addAnyAmbiguousType(builder, this.anyAmbiguousType);
-        Monster.addAnyAmbiguous(builder, anyAmbiguous);
-        Monster.addVectorOfEnums(builder, vectorOfEnums);
-        Monster.addSignedEnum(builder, this.signedEnum);
-        Monster.addTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer);
-        Monster.addScalarKeySortedTables(builder, scalarKeySortedTables);
-        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);
-    }
+  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;
+    this.name = name;
+    this.inventory = inventory;
+    this.color = color;
+    this.testType = testType;
+    this.test = test;
+    this.test4 = test4;
+    this.testarrayofstring = testarrayofstring;
+    this.testarrayoftables = testarrayoftables;
+    this.enemy = enemy;
+    this.testnestedflatbuffer = testnestedflatbuffer;
+    this.testempty = testempty;
+    this.testbool = testbool;
+    this.testhashs32Fnv1 = testhashs32Fnv1;
+    this.testhashu32Fnv1 = testhashu32Fnv1;
+    this.testhashs64Fnv1 = testhashs64Fnv1;
+    this.testhashu64Fnv1 = testhashu64Fnv1;
+    this.testhashs32Fnv1a = testhashs32Fnv1a;
+    this.testhashu32Fnv1a = testhashu32Fnv1a;
+    this.testhashs64Fnv1a = testhashs64Fnv1a;
+    this.testhashu64Fnv1a = testhashu64Fnv1a;
+    this.testarrayofbools = testarrayofbools;
+    this.testf = testf;
+    this.testf2 = testf2;
+    this.testf3 = testf3;
+    this.testarrayofstring2 = testarrayofstring2;
+    this.testarrayofsortedstruct = testarrayofsortedstruct;
+    this.flex = flex;
+    this.test5 = test5;
+    this.vectorOfLongs = vectorOfLongs;
+    this.vectorOfDoubles = vectorOfDoubles;
+    this.parentNamespaceTest = parentNamespaceTest;
+    this.vectorOfReferrables = vectorOfReferrables;
+    this.singleWeakReference = singleWeakReference;
+    this.vectorOfWeakReferences = vectorOfWeakReferences;
+    this.vectorOfStrongReferrables = vectorOfStrongReferrables;
+    this.coOwningReference = coOwningReference;
+    this.vectorOfCoOwningReferences = vectorOfCoOwningReferences;
+    this.nonOwningReference = nonOwningReference;
+    this.vectorOfNonOwningReferences = vectorOfNonOwningReferences;
+    this.anyUniqueType = anyUniqueType;
+    this.anyUnique = anyUnique;
+    this.anyAmbiguousType = anyAmbiguousType;
+    this.anyAmbiguous = anyAmbiguous;
+    this.vectorOfEnums = vectorOfEnums;
+    this.signedEnum = signedEnum;
+    this.testrequirednestedflatbuffer = testrequirednestedflatbuffer;
+    this.scalarKeySortedTables = scalarKeySortedTables;
+    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;
+    this.doubleInfDefault = doubleInfDefault;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const inventory = Monster.createInventoryVector(builder, this.inventory);
+    const test = builder.createObjectOffset(this.test);
+    const test4 =
+        builder.createStructOffsetList(this.test4, Monster.startTest4Vector);
+    const testarrayofstring = Monster.createTestarrayofstringVector(
+        builder, builder.createObjectOffsetList(this.testarrayofstring));
+    const testarrayoftables = Monster.createTestarrayoftablesVector(
+        builder, builder.createObjectOffsetList(this.testarrayoftables));
+    const enemy = (this.enemy !== null ? this.enemy.pack(builder) : 0);
+    const testnestedflatbuffer = Monster.createTestnestedflatbufferVector(
+        builder, this.testnestedflatbuffer);
+    const testempty =
+        (this.testempty !== null ? this.testempty.pack(builder) : 0);
+    const testarrayofbools =
+        Monster.createTestarrayofboolsVector(builder, this.testarrayofbools);
+    const testarrayofstring2 = Monster.createTestarrayofstring2Vector(
+        builder, builder.createObjectOffsetList(this.testarrayofstring2));
+    const testarrayofsortedstruct = builder.createStructOffsetList(
+        this.testarrayofsortedstruct,
+        Monster.startTestarrayofsortedstructVector);
+    const flex = Monster.createFlexVector(builder, this.flex);
+    const test5 =
+        builder.createStructOffsetList(this.test5, Monster.startTest5Vector);
+    const vectorOfLongs =
+        Monster.createVectorOfLongsVector(builder, this.vectorOfLongs);
+    const vectorOfDoubles =
+        Monster.createVectorOfDoublesVector(builder, this.vectorOfDoubles);
+    const parentNamespaceTest =
+        (this.parentNamespaceTest !== null ?
+             this.parentNamespaceTest.pack(builder) :
+             0);
+    const vectorOfReferrables = Monster.createVectorOfReferrablesVector(
+        builder, builder.createObjectOffsetList(this.vectorOfReferrables));
+    const vectorOfWeakReferences = Monster.createVectorOfWeakReferencesVector(
+        builder, this.vectorOfWeakReferences);
+    const vectorOfStrongReferrables =
+        Monster.createVectorOfStrongReferrablesVector(
+            builder,
+            builder.createObjectOffsetList(this.vectorOfStrongReferrables));
+    const vectorOfCoOwningReferences =
+        Monster.createVectorOfCoOwningReferencesVector(
+            builder, this.vectorOfCoOwningReferences);
+    const vectorOfNonOwningReferences =
+        Monster.createVectorOfNonOwningReferencesVector(
+            builder, this.vectorOfNonOwningReferences);
+    const anyUnique = builder.createObjectOffset(this.anyUnique);
+    const anyAmbiguous = builder.createObjectOffset(this.anyAmbiguous);
+    const vectorOfEnums =
+        Monster.createVectorOfEnumsVector(builder, this.vectorOfEnums);
+    const testrequirednestedflatbuffer =
+        Monster.createTestrequirednestedflatbufferVector(
+            builder, this.testrequirednestedflatbuffer);
+    const scalarKeySortedTables = Monster.createScalarKeySortedTablesVector(
+        builder, builder.createObjectOffsetList(this.scalarKeySortedTables));
+    Monster.startMonster(builder);
+    Monster.addPos(builder, (this.pos !== null ? this.pos.pack(builder) : 0));
+    Monster.addMana(builder, this.mana);
+    Monster.addHp(builder, this.hp);
+    Monster.addName(builder, name);
+    Monster.addInventory(builder, inventory);
+    Monster.addColor(builder, this.color);
+    Monster.addTestType(builder, this.testType);
+    Monster.addTest(builder, test);
+    Monster.addTest4(builder, test4);
+    Monster.addTestarrayofstring(builder, testarrayofstring);
+    Monster.addTestarrayoftables(builder, testarrayoftables);
+    Monster.addEnemy(builder, enemy);
+    Monster.addTestnestedflatbuffer(builder, testnestedflatbuffer);
+    Monster.addTestempty(builder, testempty);
+    Monster.addTestbool(builder, this.testbool);
+    Monster.addTesthashs32Fnv1(builder, this.testhashs32Fnv1);
+    Monster.addTesthashu32Fnv1(builder, this.testhashu32Fnv1);
+    Monster.addTesthashs64Fnv1(builder, this.testhashs64Fnv1);
+    Monster.addTesthashu64Fnv1(builder, this.testhashu64Fnv1);
+    Monster.addTesthashs32Fnv1a(builder, this.testhashs32Fnv1a);
+    Monster.addTesthashu32Fnv1a(builder, this.testhashu32Fnv1a);
+    Monster.addTesthashs64Fnv1a(builder, this.testhashs64Fnv1a);
+    Monster.addTesthashu64Fnv1a(builder, this.testhashu64Fnv1a);
+    Monster.addTestarrayofbools(builder, testarrayofbools);
+    Monster.addTestf(builder, this.testf);
+    Monster.addTestf2(builder, this.testf2);
+    Monster.addTestf3(builder, this.testf3);
+    Monster.addTestarrayofstring2(builder, testarrayofstring2);
+    Monster.addTestarrayofsortedstruct(builder, testarrayofsortedstruct);
+    Monster.addFlex(builder, flex);
+    Monster.addTest5(builder, test5);
+    Monster.addVectorOfLongs(builder, vectorOfLongs);
+    Monster.addVectorOfDoubles(builder, vectorOfDoubles);
+    Monster.addParentNamespaceTest(builder, parentNamespaceTest);
+    Monster.addVectorOfReferrables(builder, vectorOfReferrables);
+    Monster.addSingleWeakReference(builder, this.singleWeakReference);
+    Monster.addVectorOfWeakReferences(builder, vectorOfWeakReferences);
+    Monster.addVectorOfStrongReferrables(builder, vectorOfStrongReferrables);
+    Monster.addCoOwningReference(builder, this.coOwningReference);
+    Monster.addVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences);
+    Monster.addNonOwningReference(builder, this.nonOwningReference);
+    Monster.addVectorOfNonOwningReferences(
+        builder, vectorOfNonOwningReferences);
+    Monster.addAnyUniqueType(builder, this.anyUniqueType);
+    Monster.addAnyUnique(builder, anyUnique);
+    Monster.addAnyAmbiguousType(builder, this.anyAmbiguousType);
+    Monster.addAnyAmbiguous(builder, anyAmbiguous);
+    Monster.addVectorOfEnums(builder, vectorOfEnums);
+    Monster.addSignedEnum(builder, this.signedEnum);
+    Monster.addTestrequirednestedflatbuffer(
+        builder, testrequirednestedflatbuffer);
+    Monster.addScalarKeySortedTables(builder, scalarKeySortedTables);
+    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/race.d.ts b/tests/ts/my-game/example/race.d.ts
index 393807d..1276d53 100644
--- a/tests/ts/my-game/example/race.d.ts
+++ b/tests/ts/my-game/example/race.d.ts
@@ -1,6 +1,6 @@
 export declare enum Race {
-    None = -1,
-    Human = 0,
-    Dwarf = 1,
-    Elf = 2
+  None = -1,
+  Human = 0,
+  Dwarf = 1,
+  Elf = 2,
 }
diff --git a/tests/ts/my-game/example/race.js b/tests/ts/my-game/example/race.js
index 26f54c5..5e7e12d 100644
--- a/tests/ts/my-game/example/race.js
+++ b/tests/ts/my-game/example/race.js
@@ -1,9 +1,10 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var Race;
-(function (Race) {
-    Race[Race["None"] = -1] = "None";
-    Race[Race["Human"] = 0] = "Human";
-    Race[Race["Dwarf"] = 1] = "Dwarf";
-    Race[Race["Elf"] = 2] = "Elf";
+(function(Race) {
+Race[Race['None'] = -1] = 'None';
+Race[Race['Human'] = 0] = 'Human';
+Race[Race['Dwarf'] = 1] = 'Dwarf';
+Race[Race['Elf'] = 2] = 'Elf';
 })(Race || (Race = {}));
diff --git a/tests/ts/my-game/example/referrable.d.ts b/tests/ts/my-game/example/referrable.d.ts
index e1967fd..f49038e 100644
--- a/tests/ts/my-game/example/referrable.d.ts
+++ b/tests/ts/my-game/example/referrable.d.ts
@@ -1,24 +1,35 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class Referrable implements flatbuffers.IUnpackableObject<ReferrableT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Referrable;
-    static getRootAsReferrable(bb: flatbuffers.ByteBuffer, obj?: Referrable): Referrable;
-    static getSizePrefixedRootAsReferrable(bb: flatbuffers.ByteBuffer, obj?: Referrable): Referrable;
-    id(): bigint;
-    mutate_id(value: bigint): boolean;
-    static getFullyQualifiedName(): string;
-    static startReferrable(builder: flatbuffers.Builder): void;
-    static addId(builder: flatbuffers.Builder, id: bigint): void;
-    static endReferrable(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createReferrable(builder: flatbuffers.Builder, id: bigint): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): Referrable;
-    unpack(): ReferrableT;
-    unpackTo(_o: ReferrableT): void;
+export declare class Referrable
+  implements flatbuffers.IUnpackableObject<ReferrableT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Referrable;
+  static getRootAsReferrable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Referrable,
+  ): Referrable;
+  static getSizePrefixedRootAsReferrable(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Referrable,
+  ): Referrable;
+  id(): bigint;
+  mutate_id(value: bigint): boolean;
+  static getFullyQualifiedName(): string;
+  static startReferrable(builder: flatbuffers.Builder): void;
+  static addId(builder: flatbuffers.Builder, id: bigint): void;
+  static endReferrable(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createReferrable(
+    builder: flatbuffers.Builder,
+    id: bigint,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): Referrable;
+  unpack(): ReferrableT;
+  unpackTo(_o: ReferrableT): void;
 }
 export declare class ReferrableT implements flatbuffers.IGeneratedObject {
-    id: bigint;
-    constructor(id?: bigint);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  id: bigint;
+  constructor(id?: bigint);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/referrable.js b/tests/ts/my-game/example/referrable.js
index e37d9b7..e04e071 100644
--- a/tests/ts/my-game/example/referrable.js
+++ b/tests/ts/my-game/example/referrable.js
@@ -1,71 +1,74 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class Referrable {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsReferrable(bb, obj) {
+    return (obj || new Referrable())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsReferrable(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Referrable())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  id() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_id(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsReferrable(bb, obj) {
-        return (obj || new Referrable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsReferrable(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Referrable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    id() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_id(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.Referrable';
-    }
-    static startReferrable(builder) {
-        builder.startObject(1);
-    }
-    static addId(builder, id) {
-        builder.addFieldInt64(0, id, BigInt('0'));
-    }
-    static endReferrable(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createReferrable(builder, id) {
-        Referrable.startReferrable(builder);
-        Referrable.addId(builder, id);
-        return Referrable.endReferrable(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return Referrable.getRootAsReferrable(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new ReferrableT(this.id());
-    }
-    unpackTo(_o) {
-        _o.id = this.id();
-    }
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Referrable';
+  }
+  static startReferrable(builder) {
+    builder.startObject(1);
+  }
+  static addId(builder, id) {
+    builder.addFieldInt64(0, id, BigInt('0'));
+  }
+  static endReferrable(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createReferrable(builder, id) {
+    Referrable.startReferrable(builder);
+    Referrable.addId(builder, id);
+    return Referrable.endReferrable(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return Referrable.getRootAsReferrable(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new ReferrableT(this.id());
+  }
+  unpackTo(_o) {
+    _o.id = this.id();
+  }
 }
 export class ReferrableT {
-    constructor(id = BigInt('0')) {
-        this.id = id;
-    }
-    pack(builder) {
-        return Referrable.createReferrable(builder, this.id);
-    }
+  constructor(id = BigInt('0')) {
+    this.id = id;
+  }
+  pack(builder) {
+    return Referrable.createReferrable(builder, this.id);
+  }
 }
diff --git a/tests/ts/my-game/example/stat.d.ts b/tests/ts/my-game/example/stat.d.ts
index 9ccb1aa..2464dc1 100644
--- a/tests/ts/my-game/example/stat.d.ts
+++ b/tests/ts/my-game/example/stat.d.ts
@@ -1,32 +1,43 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class Stat implements flatbuffers.IUnpackableObject<StatT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Stat;
-    static getRootAsStat(bb: flatbuffers.ByteBuffer, obj?: Stat): Stat;
-    static getSizePrefixedRootAsStat(bb: flatbuffers.ByteBuffer, obj?: Stat): Stat;
-    id(): string | null;
-    id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    val(): bigint;
-    mutate_val(value: bigint): boolean;
-    count(): number;
-    mutate_count(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startStat(builder: flatbuffers.Builder): void;
-    static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset): void;
-    static addVal(builder: flatbuffers.Builder, val: bigint): void;
-    static addCount(builder: flatbuffers.Builder, count: number): void;
-    static endStat(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createStat(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset, val: bigint, count: number): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): Stat;
-    unpack(): StatT;
-    unpackTo(_o: StatT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Stat;
+  static getRootAsStat(bb: flatbuffers.ByteBuffer, obj?: Stat): Stat;
+  static getSizePrefixedRootAsStat(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Stat,
+  ): Stat;
+  id(): string | null;
+  id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  val(): bigint;
+  mutate_val(value: bigint): boolean;
+  count(): number;
+  mutate_count(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startStat(builder: flatbuffers.Builder): void;
+  static addId(
+    builder: flatbuffers.Builder,
+    idOffset: flatbuffers.Offset,
+  ): void;
+  static addVal(builder: flatbuffers.Builder, val: bigint): void;
+  static addCount(builder: flatbuffers.Builder, count: number): void;
+  static endStat(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createStat(
+    builder: flatbuffers.Builder,
+    idOffset: flatbuffers.Offset,
+    val: bigint,
+    count: number,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): Stat;
+  unpack(): StatT;
+  unpackTo(_o: StatT): void;
 }
 export declare class StatT implements flatbuffers.IGeneratedObject {
-    id: string | Uint8Array | null;
-    val: bigint;
-    count: number;
-    constructor(id?: string | Uint8Array | null, val?: bigint, count?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  id: string | Uint8Array | null;
+  val: bigint;
+  count: number;
+  constructor(id?: string | Uint8Array | null, val?: bigint, count?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/stat.js b/tests/ts/my-game/example/stat.js
index 8c16869..21d911f 100644
--- a/tests/ts/my-game/example/stat.js
+++ b/tests/ts/my-game/example/stat.js
@@ -1,100 +1,104 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class Stat {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsStat(bb, obj) {
+    return (obj || new Stat())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsStat(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Stat())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  id(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  val() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_val(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  count() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_count(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsStat(bb, obj) {
-        return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsStat(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    id(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    val() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_val(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
-    }
-    count() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
-    }
-    mutate_count(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.Stat';
-    }
-    static startStat(builder) {
-        builder.startObject(3);
-    }
-    static addId(builder, idOffset) {
-        builder.addFieldOffset(0, idOffset, 0);
-    }
-    static addVal(builder, val) {
-        builder.addFieldInt64(1, val, BigInt('0'));
-    }
-    static addCount(builder, count) {
-        builder.addFieldInt16(2, count, 0);
-    }
-    static endStat(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createStat(builder, idOffset, val, count) {
-        Stat.startStat(builder);
-        Stat.addId(builder, idOffset);
-        Stat.addVal(builder, val);
-        Stat.addCount(builder, count);
-        return Stat.endStat(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return Stat.getRootAsStat(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new StatT(this.id(), this.val(), this.count());
-    }
-    unpackTo(_o) {
-        _o.id = this.id();
-        _o.val = this.val();
-        _o.count = this.count();
-    }
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Stat';
+  }
+  static startStat(builder) {
+    builder.startObject(3);
+  }
+  static addId(builder, idOffset) {
+    builder.addFieldOffset(0, idOffset, 0);
+  }
+  static addVal(builder, val) {
+    builder.addFieldInt64(1, val, BigInt('0'));
+  }
+  static addCount(builder, count) {
+    builder.addFieldInt16(2, count, 0);
+  }
+  static endStat(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createStat(builder, idOffset, val, count) {
+    Stat.startStat(builder);
+    Stat.addId(builder, idOffset);
+    Stat.addVal(builder, val);
+    Stat.addCount(builder, count);
+    return Stat.endStat(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return Stat.getRootAsStat(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new StatT(this.id(), this.val(), this.count());
+  }
+  unpackTo(_o) {
+    _o.id = this.id();
+    _o.val = this.val();
+    _o.count = this.count();
+  }
 }
 export class StatT {
-    constructor(id = null, val = BigInt('0'), count = 0) {
-        this.id = id;
-        this.val = val;
-        this.count = count;
-    }
-    pack(builder) {
-        const id = (this.id !== null ? builder.createString(this.id) : 0);
-        return Stat.createStat(builder, id, this.val, this.count);
-    }
+  constructor(id = null, val = BigInt('0'), count = 0) {
+    this.id = id;
+    this.val = val;
+    this.count = count;
+  }
+  pack(builder) {
+    const id = (this.id !== null ? builder.createString(this.id) : 0);
+    return Stat.createStat(builder, id, this.val, this.count);
+  }
 }
diff --git a/tests/ts/my-game/example/struct-of-structs-of-structs.d.ts b/tests/ts/my-game/example/struct-of-structs-of-structs.d.ts
index bd676b7..b0d760a 100644
--- a/tests/ts/my-game/example/struct-of-structs-of-structs.d.ts
+++ b/tests/ts/my-game/example/struct-of-structs-of-structs.d.ts
@@ -1,18 +1,33 @@
 import * as flatbuffers from 'flatbuffers';
-import { StructOfStructs, StructOfStructsT } from '../../my-game/example/struct-of-structs.js';
-export declare class StructOfStructsOfStructs implements flatbuffers.IUnpackableObject<StructOfStructsOfStructsT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): StructOfStructsOfStructs;
-    a(obj?: StructOfStructs): StructOfStructs | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createStructOfStructsOfStructs(builder: flatbuffers.Builder, a_a_id: number, a_a_distance: number, a_b_a: number, a_b_b: number, a_c_id: number, a_c_distance: number): flatbuffers.Offset;
-    unpack(): StructOfStructsOfStructsT;
-    unpackTo(_o: StructOfStructsOfStructsT): void;
+import {
+  StructOfStructs,
+  StructOfStructsT,
+} from '../../my-game/example/struct-of-structs.js';
+export declare class StructOfStructsOfStructs
+  implements flatbuffers.IUnpackableObject<StructOfStructsOfStructsT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): StructOfStructsOfStructs;
+  a(obj?: StructOfStructs): StructOfStructs | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createStructOfStructsOfStructs(
+    builder: flatbuffers.Builder,
+    a_a_id: number,
+    a_a_distance: number,
+    a_b_a: number,
+    a_b_b: number,
+    a_c_id: number,
+    a_c_distance: number,
+  ): flatbuffers.Offset;
+  unpack(): StructOfStructsOfStructsT;
+  unpackTo(_o: StructOfStructsOfStructsT): void;
 }
-export declare class StructOfStructsOfStructsT implements flatbuffers.IGeneratedObject {
-    a: StructOfStructsT | null;
-    constructor(a?: StructOfStructsT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+export declare class StructOfStructsOfStructsT
+  implements flatbuffers.IGeneratedObject
+{
+  a: StructOfStructsT | null;
+  constructor(a?: StructOfStructsT | null);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
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 0fc45ae..e024d4d 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
@@ -1,51 +1,56 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { StructOfStructs } from '../../my-game/example/struct-of-structs.js';
+import {StructOfStructs} from '../../my-game/example/struct-of-structs.js';
 export class StructOfStructsOfStructs {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    a(obj) {
-        return (obj || new StructOfStructs()).__init(this.bb_pos, this.bb);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.StructOfStructsOfStructs';
-    }
-    static sizeOf() {
-        return 20;
-    }
-    static createStructOfStructsOfStructs(builder, a_a_id, a_a_distance, a_b_a, a_b_b, a_c_id, a_c_distance) {
-        builder.prep(4, 20);
-        builder.prep(4, 20);
-        builder.prep(4, 8);
-        builder.writeInt32(a_c_distance);
-        builder.writeInt32(a_c_id);
-        builder.prep(2, 4);
-        builder.pad(1);
-        builder.writeInt8(a_b_b);
-        builder.writeInt16(a_b_a);
-        builder.prep(4, 8);
-        builder.writeInt32(a_a_distance);
-        builder.writeInt32(a_a_id);
-        return builder.offset();
-    }
-    unpack() {
-        return new StructOfStructsOfStructsT((this.a() !== null ? this.a().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.a = (this.a() !== null ? this.a().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a(obj) {
+    return (obj || new StructOfStructs()).__init(this.bb_pos, this.bb);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.StructOfStructsOfStructs';
+  }
+  static sizeOf() {
+    return 20;
+  }
+  static createStructOfStructsOfStructs(
+      builder, a_a_id, a_a_distance, a_b_a, a_b_b, a_c_id, a_c_distance) {
+    builder.prep(4, 20);
+    builder.prep(4, 20);
+    builder.prep(4, 8);
+    builder.writeInt32(a_c_distance);
+    builder.writeInt32(a_c_id);
+    builder.prep(2, 4);
+    builder.pad(1);
+    builder.writeInt8(a_b_b);
+    builder.writeInt16(a_b_a);
+    builder.prep(4, 8);
+    builder.writeInt32(a_a_distance);
+    builder.writeInt32(a_a_id);
+    return builder.offset();
+  }
+  unpack() {
+    return new StructOfStructsOfStructsT(
+        (this.a() !== null ? this.a().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.a = (this.a() !== null ? this.a().unpack() : null);
+  }
 }
 export class StructOfStructsOfStructsT {
-    constructor(a = null) {
-        this.a = a;
-    }
-    pack(builder) {
-        return StructOfStructsOfStructs.createStructOfStructsOfStructs(builder, (this.a?.a?.id ?? 0), (this.a?.a?.distance ?? 0), (this.a?.b?.a ?? 0), (this.a?.b?.b ?? 0), (this.a?.c?.id ?? 0), (this.a?.c?.distance ?? 0));
-    }
+  constructor(a = null) {
+    this.a = a;
+  }
+  pack(builder) {
+    return StructOfStructsOfStructs.createStructOfStructsOfStructs(
+        builder, (this.a?.a?.id ?? 0), (this.a?.a?.distance ?? 0),
+        (this.a?.b?.a ?? 0), (this.a?.b?.b ?? 0), (this.a?.c?.id ?? 0),
+        (this.a?.c?.distance ?? 0));
+  }
 }
diff --git a/tests/ts/my-game/example/struct-of-structs.d.ts b/tests/ts/my-game/example/struct-of-structs.d.ts
index cb299c4..e4ae46d 100644
--- a/tests/ts/my-game/example/struct-of-structs.d.ts
+++ b/tests/ts/my-game/example/struct-of-structs.d.ts
@@ -1,23 +1,33 @@
 import * as flatbuffers from 'flatbuffers';
-import { Ability, AbilityT } from '../../my-game/example/ability.js';
-import { Test, TestT } from '../../my-game/example/test.js';
-export declare class StructOfStructs implements flatbuffers.IUnpackableObject<StructOfStructsT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): StructOfStructs;
-    a(obj?: Ability): Ability | null;
-    b(obj?: Test): Test | null;
-    c(obj?: Ability): Ability | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createStructOfStructs(builder: flatbuffers.Builder, a_id: number, a_distance: number, b_a: number, b_b: number, c_id: number, c_distance: number): flatbuffers.Offset;
-    unpack(): StructOfStructsT;
-    unpackTo(_o: StructOfStructsT): void;
+import {Ability, AbilityT} from '../../my-game/example/ability.js';
+import {Test, TestT} from '../../my-game/example/test.js';
+export declare class StructOfStructs
+  implements flatbuffers.IUnpackableObject<StructOfStructsT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): StructOfStructs;
+  a(obj?: Ability): Ability | null;
+  b(obj?: Test): Test | null;
+  c(obj?: Ability): Ability | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createStructOfStructs(
+    builder: flatbuffers.Builder,
+    a_id: number,
+    a_distance: number,
+    b_a: number,
+    b_b: number,
+    c_id: number,
+    c_distance: number,
+  ): flatbuffers.Offset;
+  unpack(): StructOfStructsT;
+  unpackTo(_o: StructOfStructsT): void;
 }
 export declare class StructOfStructsT implements flatbuffers.IGeneratedObject {
-    a: AbilityT | null;
-    b: TestT | null;
-    c: AbilityT | null;
-    constructor(a?: AbilityT | null, b?: TestT | null, c?: AbilityT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: AbilityT | null;
+  b: TestT | null;
+  c: AbilityT | null;
+  constructor(a?: AbilityT | null, b?: TestT | null, c?: AbilityT | null);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/struct-of-structs.js b/tests/ts/my-game/example/struct-of-structs.js
index 1f41f85..b818cc5 100644
--- a/tests/ts/my-game/example/struct-of-structs.js
+++ b/tests/ts/my-game/example/struct-of-structs.js
@@ -1,61 +1,67 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { Ability } from '../../my-game/example/ability.js';
-import { Test } from '../../my-game/example/test.js';
+import {Ability} from '../../my-game/example/ability.js';
+import {Test} from '../../my-game/example/test.js';
 export class StructOfStructs {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    a(obj) {
-        return (obj || new Ability()).__init(this.bb_pos, this.bb);
-    }
-    b(obj) {
-        return (obj || new Test()).__init(this.bb_pos + 8, this.bb);
-    }
-    c(obj) {
-        return (obj || new Ability()).__init(this.bb_pos + 12, this.bb);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.StructOfStructs';
-    }
-    static sizeOf() {
-        return 20;
-    }
-    static createStructOfStructs(builder, a_id, a_distance, b_a, b_b, c_id, c_distance) {
-        builder.prep(4, 20);
-        builder.prep(4, 8);
-        builder.writeInt32(c_distance);
-        builder.writeInt32(c_id);
-        builder.prep(2, 4);
-        builder.pad(1);
-        builder.writeInt8(b_b);
-        builder.writeInt16(b_a);
-        builder.prep(4, 8);
-        builder.writeInt32(a_distance);
-        builder.writeInt32(a_id);
-        return builder.offset();
-    }
-    unpack() {
-        return new StructOfStructsT((this.a() !== null ? this.a().unpack() : null), (this.b() !== null ? this.b().unpack() : null), (this.c() !== null ? this.c().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.a = (this.a() !== null ? this.a().unpack() : null);
-        _o.b = (this.b() !== null ? this.b().unpack() : null);
-        _o.c = (this.c() !== null ? this.c().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a(obj) {
+    return (obj || new Ability()).__init(this.bb_pos, this.bb);
+  }
+  b(obj) {
+    return (obj || new Test()).__init(this.bb_pos + 8, this.bb);
+  }
+  c(obj) {
+    return (obj || new Ability()).__init(this.bb_pos + 12, this.bb);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.StructOfStructs';
+  }
+  static sizeOf() {
+    return 20;
+  }
+  static createStructOfStructs(
+      builder, a_id, a_distance, b_a, b_b, c_id, c_distance) {
+    builder.prep(4, 20);
+    builder.prep(4, 8);
+    builder.writeInt32(c_distance);
+    builder.writeInt32(c_id);
+    builder.prep(2, 4);
+    builder.pad(1);
+    builder.writeInt8(b_b);
+    builder.writeInt16(b_a);
+    builder.prep(4, 8);
+    builder.writeInt32(a_distance);
+    builder.writeInt32(a_id);
+    return builder.offset();
+  }
+  unpack() {
+    return new StructOfStructsT(
+        (this.a() !== null ? this.a().unpack() : null),
+        (this.b() !== null ? this.b().unpack() : null),
+        (this.c() !== null ? this.c().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.a = (this.a() !== null ? this.a().unpack() : null);
+    _o.b = (this.b() !== null ? this.b().unpack() : null);
+    _o.c = (this.c() !== null ? this.c().unpack() : null);
+  }
 }
 export class StructOfStructsT {
-    constructor(a = null, b = null, c = null) {
-        this.a = a;
-        this.b = b;
-        this.c = c;
-    }
-    pack(builder) {
-        return StructOfStructs.createStructOfStructs(builder, (this.a?.id ?? 0), (this.a?.distance ?? 0), (this.b?.a ?? 0), (this.b?.b ?? 0), (this.c?.id ?? 0), (this.c?.distance ?? 0));
-    }
+  constructor(a = null, b = null, c = null) {
+    this.a = a;
+    this.b = b;
+    this.c = c;
+  }
+  pack(builder) {
+    return StructOfStructs.createStructOfStructs(
+        builder, (this.a?.id ?? 0), (this.a?.distance ?? 0), (this.b?.a ?? 0),
+        (this.b?.b ?? 0), (this.c?.id ?? 0), (this.c?.distance ?? 0));
+  }
 }
diff --git a/tests/ts/my-game/example/test-simple-table-with-enum.d.ts b/tests/ts/my-game/example/test-simple-table-with-enum.d.ts
index 7a3f690..6d40e23 100644
--- a/tests/ts/my-game/example/test-simple-table-with-enum.d.ts
+++ b/tests/ts/my-game/example/test-simple-table-with-enum.d.ts
@@ -1,25 +1,40 @@
 import * as flatbuffers from 'flatbuffers';
-import { Color } from '../../my-game/example/color.js';
-export declare class TestSimpleTableWithEnum implements flatbuffers.IUnpackableObject<TestSimpleTableWithEnumT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): TestSimpleTableWithEnum;
-    static getRootAsTestSimpleTableWithEnum(bb: flatbuffers.ByteBuffer, obj?: TestSimpleTableWithEnum): TestSimpleTableWithEnum;
-    static getSizePrefixedRootAsTestSimpleTableWithEnum(bb: flatbuffers.ByteBuffer, obj?: TestSimpleTableWithEnum): TestSimpleTableWithEnum;
-    color(): Color;
-    mutate_color(value: Color): boolean;
-    static getFullyQualifiedName(): string;
-    static startTestSimpleTableWithEnum(builder: flatbuffers.Builder): void;
-    static addColor(builder: flatbuffers.Builder, color: Color): void;
-    static endTestSimpleTableWithEnum(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createTestSimpleTableWithEnum(builder: flatbuffers.Builder, color: Color): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): TestSimpleTableWithEnum;
-    unpack(): TestSimpleTableWithEnumT;
-    unpackTo(_o: TestSimpleTableWithEnumT): void;
+import {Color} from '../../my-game/example/color.js';
+export declare class TestSimpleTableWithEnum
+  implements flatbuffers.IUnpackableObject<TestSimpleTableWithEnumT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): TestSimpleTableWithEnum;
+  static getRootAsTestSimpleTableWithEnum(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TestSimpleTableWithEnum,
+  ): TestSimpleTableWithEnum;
+  static getSizePrefixedRootAsTestSimpleTableWithEnum(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TestSimpleTableWithEnum,
+  ): TestSimpleTableWithEnum;
+  color(): Color;
+  mutate_color(value: Color): boolean;
+  static getFullyQualifiedName(): string;
+  static startTestSimpleTableWithEnum(builder: flatbuffers.Builder): void;
+  static addColor(builder: flatbuffers.Builder, color: Color): void;
+  static endTestSimpleTableWithEnum(
+    builder: flatbuffers.Builder,
+  ): flatbuffers.Offset;
+  static createTestSimpleTableWithEnum(
+    builder: flatbuffers.Builder,
+    color: Color,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): TestSimpleTableWithEnum;
+  unpack(): TestSimpleTableWithEnumT;
+  unpackTo(_o: TestSimpleTableWithEnumT): void;
 }
-export declare class TestSimpleTableWithEnumT implements flatbuffers.IGeneratedObject {
-    color: Color;
-    constructor(color?: Color);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+export declare class TestSimpleTableWithEnumT
+  implements flatbuffers.IGeneratedObject
+{
+  color: Color;
+  constructor(color?: Color);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
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 b4e0cfb..cd50ab0 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
@@ -1,72 +1,79 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Color } from '../../my-game/example/color.js';
+
+import {Color} from '../../my-game/example/color.js';
+
 export class TestSimpleTableWithEnum {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsTestSimpleTableWithEnum(bb, obj) {
+    return (obj || new TestSimpleTableWithEnum())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsTestSimpleTableWithEnum(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TestSimpleTableWithEnum())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  color() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : Color.Green;
+  }
+  mutate_color(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsTestSimpleTableWithEnum(bb, obj) {
-        return (obj || new TestSimpleTableWithEnum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsTestSimpleTableWithEnum(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new TestSimpleTableWithEnum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    color() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : Color.Green;
-    }
-    mutate_color(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint8(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.TestSimpleTableWithEnum';
-    }
-    static startTestSimpleTableWithEnum(builder) {
-        builder.startObject(1);
-    }
-    static addColor(builder, color) {
-        builder.addFieldInt8(0, color, Color.Green);
-    }
-    static endTestSimpleTableWithEnum(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createTestSimpleTableWithEnum(builder, color) {
-        TestSimpleTableWithEnum.startTestSimpleTableWithEnum(builder);
-        TestSimpleTableWithEnum.addColor(builder, color);
-        return TestSimpleTableWithEnum.endTestSimpleTableWithEnum(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return TestSimpleTableWithEnum.getRootAsTestSimpleTableWithEnum(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new TestSimpleTableWithEnumT(this.color());
-    }
-    unpackTo(_o) {
-        _o.color = this.color();
-    }
+    this.bb.writeUint8(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.TestSimpleTableWithEnum';
+  }
+  static startTestSimpleTableWithEnum(builder) {
+    builder.startObject(1);
+  }
+  static addColor(builder, color) {
+    builder.addFieldInt8(0, color, Color.Green);
+  }
+  static endTestSimpleTableWithEnum(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createTestSimpleTableWithEnum(builder, color) {
+    TestSimpleTableWithEnum.startTestSimpleTableWithEnum(builder);
+    TestSimpleTableWithEnum.addColor(builder, color);
+    return TestSimpleTableWithEnum.endTestSimpleTableWithEnum(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return TestSimpleTableWithEnum.getRootAsTestSimpleTableWithEnum(
+        new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new TestSimpleTableWithEnumT(this.color());
+  }
+  unpackTo(_o) {
+    _o.color = this.color();
+  }
 }
 export class TestSimpleTableWithEnumT {
-    constructor(color = Color.Green) {
-        this.color = color;
-    }
-    pack(builder) {
-        return TestSimpleTableWithEnum.createTestSimpleTableWithEnum(builder, this.color);
-    }
+  constructor(color = Color.Green) {
+    this.color = color;
+  }
+  pack(builder) {
+    return TestSimpleTableWithEnum.createTestSimpleTableWithEnum(
+        builder, this.color);
+  }
 }
diff --git a/tests/ts/my-game/example/test.d.ts b/tests/ts/my-game/example/test.d.ts
index 98764dc..03424a4 100644
--- a/tests/ts/my-game/example/test.d.ts
+++ b/tests/ts/my-game/example/test.d.ts
@@ -1,21 +1,25 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class Test implements flatbuffers.IUnpackableObject<TestT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Test;
-    a(): number;
-    mutate_a(value: number): boolean;
-    b(): number;
-    mutate_b(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createTest(builder: flatbuffers.Builder, a: number, b: number): flatbuffers.Offset;
-    unpack(): TestT;
-    unpackTo(_o: TestT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Test;
+  a(): number;
+  mutate_a(value: number): boolean;
+  b(): number;
+  mutate_b(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createTest(
+    builder: flatbuffers.Builder,
+    a: number,
+    b: number,
+  ): flatbuffers.Offset;
+  unpack(): TestT;
+  unpackTo(_o: TestT): void;
 }
 export declare class TestT implements flatbuffers.IGeneratedObject {
-    a: number;
-    b: number;
-    constructor(a?: number, b?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: number;
+  b: number;
+  constructor(a?: number, b?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/test.js b/tests/ts/my-game/example/test.js
index ba6ebfb..b6d4800 100644
--- a/tests/ts/my-game/example/test.js
+++ b/tests/ts/my-game/example/test.js
@@ -1,55 +1,55 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class Test {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    a() {
-        return this.bb.readInt16(this.bb_pos);
-    }
-    mutate_a(value) {
-        this.bb.writeInt16(this.bb_pos + 0, value);
-        return true;
-    }
-    b() {
-        return this.bb.readInt8(this.bb_pos + 2);
-    }
-    mutate_b(value) {
-        this.bb.writeInt8(this.bb_pos + 2, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.Test';
-    }
-    static sizeOf() {
-        return 4;
-    }
-    static createTest(builder, a, b) {
-        builder.prep(2, 4);
-        builder.pad(1);
-        builder.writeInt8(b);
-        builder.writeInt16(a);
-        return builder.offset();
-    }
-    unpack() {
-        return new TestT(this.a(), this.b());
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-        _o.b = this.b();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a() {
+    return this.bb.readInt16(this.bb_pos);
+  }
+  mutate_a(value) {
+    this.bb.writeInt16(this.bb_pos + 0, value);
+    return true;
+  }
+  b() {
+    return this.bb.readInt8(this.bb_pos + 2);
+  }
+  mutate_b(value) {
+    this.bb.writeInt8(this.bb_pos + 2, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Test';
+  }
+  static sizeOf() {
+    return 4;
+  }
+  static createTest(builder, a, b) {
+    builder.prep(2, 4);
+    builder.pad(1);
+    builder.writeInt8(b);
+    builder.writeInt16(a);
+    return builder.offset();
+  }
+  unpack() {
+    return new TestT(this.a(), this.b());
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+    _o.b = this.b();
+  }
 }
 export class TestT {
-    constructor(a = 0, b = 0) {
-        this.a = a;
-        this.b = b;
-    }
-    pack(builder) {
-        return Test.createTest(builder, this.a, this.b);
-    }
+  constructor(a = 0, b = 0) {
+    this.a = a;
+    this.b = b;
+  }
+  pack(builder) {
+    return Test.createTest(builder, this.a, this.b);
+  }
 }
diff --git a/tests/ts/my-game/example/type-aliases.d.ts b/tests/ts/my-game/example/type-aliases.d.ts
index b552add..d12c88a 100644
--- a/tests/ts/my-game/example/type-aliases.d.ts
+++ b/tests/ts/my-game/example/type-aliases.d.ts
@@ -1,82 +1,135 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class TypeAliases implements flatbuffers.IUnpackableObject<TypeAliasesT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): TypeAliases;
-    static getRootAsTypeAliases(bb: flatbuffers.ByteBuffer, obj?: TypeAliases): TypeAliases;
-    static getSizePrefixedRootAsTypeAliases(bb: flatbuffers.ByteBuffer, obj?: TypeAliases): TypeAliases;
-    i8(): number;
-    mutate_i8(value: number): boolean;
-    u8(): number;
-    mutate_u8(value: number): boolean;
-    i16(): number;
-    mutate_i16(value: number): boolean;
-    u16(): number;
-    mutate_u16(value: number): boolean;
-    i32(): number;
-    mutate_i32(value: number): boolean;
-    u32(): number;
-    mutate_u32(value: number): boolean;
-    i64(): bigint;
-    mutate_i64(value: bigint): boolean;
-    u64(): bigint;
-    mutate_u64(value: bigint): boolean;
-    f32(): number;
-    mutate_f32(value: number): boolean;
-    f64(): number;
-    mutate_f64(value: number): boolean;
-    v8(index: number): number | null;
-    v8Length(): number;
-    v8Array(): Int8Array | null;
-    vf64(index: number): number | null;
-    vf64Length(): number;
-    vf64Array(): Float64Array | null;
-    static getFullyQualifiedName(): string;
-    static startTypeAliases(builder: flatbuffers.Builder): void;
-    static addI8(builder: flatbuffers.Builder, i8: number): void;
-    static addU8(builder: flatbuffers.Builder, u8: number): void;
-    static addI16(builder: flatbuffers.Builder, i16: number): void;
-    static addU16(builder: flatbuffers.Builder, u16: number): void;
-    static addI32(builder: flatbuffers.Builder, i32: number): void;
-    static addU32(builder: flatbuffers.Builder, u32: number): void;
-    static addI64(builder: flatbuffers.Builder, i64: bigint): void;
-    static addU64(builder: flatbuffers.Builder, u64: bigint): void;
-    static addF32(builder: flatbuffers.Builder, f32: number): void;
-    static addF64(builder: flatbuffers.Builder, f64: number): void;
-    static addV8(builder: flatbuffers.Builder, v8Offset: flatbuffers.Offset): void;
-    static createV8Vector(builder: flatbuffers.Builder, data: number[] | Int8Array): flatbuffers.Offset;
-    /**
-     * @deprecated This Uint8Array overload will be removed in the future.
-     */
-    static createV8Vector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startV8Vector(builder: flatbuffers.Builder, numElems: number): void;
-    static addVf64(builder: flatbuffers.Builder, vf64Offset: flatbuffers.Offset): void;
-    static createVf64Vector(builder: flatbuffers.Builder, data: number[] | Float64Array): flatbuffers.Offset;
-    /**
-     * @deprecated This Uint8Array overload will be removed in the future.
-     */
-    static createVf64Vector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
-    static startVf64Vector(builder: flatbuffers.Builder, numElems: number): void;
-    static endTypeAliases(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createTypeAliases(builder: flatbuffers.Builder, i8: number, u8: number, i16: number, u16: number, i32: number, u32: number, i64: bigint, u64: bigint, f32: number, f64: number, v8Offset: flatbuffers.Offset, vf64Offset: flatbuffers.Offset): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): TypeAliases;
-    unpack(): TypeAliasesT;
-    unpackTo(_o: TypeAliasesT): void;
+export declare class TypeAliases
+  implements flatbuffers.IUnpackableObject<TypeAliasesT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): TypeAliases;
+  static getRootAsTypeAliases(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TypeAliases,
+  ): TypeAliases;
+  static getSizePrefixedRootAsTypeAliases(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TypeAliases,
+  ): TypeAliases;
+  i8(): number;
+  mutate_i8(value: number): boolean;
+  u8(): number;
+  mutate_u8(value: number): boolean;
+  i16(): number;
+  mutate_i16(value: number): boolean;
+  u16(): number;
+  mutate_u16(value: number): boolean;
+  i32(): number;
+  mutate_i32(value: number): boolean;
+  u32(): number;
+  mutate_u32(value: number): boolean;
+  i64(): bigint;
+  mutate_i64(value: bigint): boolean;
+  u64(): bigint;
+  mutate_u64(value: bigint): boolean;
+  f32(): number;
+  mutate_f32(value: number): boolean;
+  f64(): number;
+  mutate_f64(value: number): boolean;
+  v8(index: number): number | null;
+  v8Length(): number;
+  v8Array(): Int8Array | null;
+  vf64(index: number): number | null;
+  vf64Length(): number;
+  vf64Array(): Float64Array | null;
+  static getFullyQualifiedName(): string;
+  static startTypeAliases(builder: flatbuffers.Builder): void;
+  static addI8(builder: flatbuffers.Builder, i8: number): void;
+  static addU8(builder: flatbuffers.Builder, u8: number): void;
+  static addI16(builder: flatbuffers.Builder, i16: number): void;
+  static addU16(builder: flatbuffers.Builder, u16: number): void;
+  static addI32(builder: flatbuffers.Builder, i32: number): void;
+  static addU32(builder: flatbuffers.Builder, u32: number): void;
+  static addI64(builder: flatbuffers.Builder, i64: bigint): void;
+  static addU64(builder: flatbuffers.Builder, u64: bigint): void;
+  static addF32(builder: flatbuffers.Builder, f32: number): void;
+  static addF64(builder: flatbuffers.Builder, f64: number): void;
+  static addV8(
+    builder: flatbuffers.Builder,
+    v8Offset: flatbuffers.Offset,
+  ): void;
+  static createV8Vector(
+    builder: flatbuffers.Builder,
+    data: number[] | Int8Array,
+  ): flatbuffers.Offset;
+  /**
+   * @deprecated This Uint8Array overload will be removed in the future.
+   */
+  static createV8Vector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startV8Vector(builder: flatbuffers.Builder, numElems: number): void;
+  static addVf64(
+    builder: flatbuffers.Builder,
+    vf64Offset: flatbuffers.Offset,
+  ): void;
+  static createVf64Vector(
+    builder: flatbuffers.Builder,
+    data: number[] | Float64Array,
+  ): flatbuffers.Offset;
+  /**
+   * @deprecated This Uint8Array overload will be removed in the future.
+   */
+  static createVf64Vector(
+    builder: flatbuffers.Builder,
+    data: number[] | Uint8Array,
+  ): flatbuffers.Offset;
+  static startVf64Vector(builder: flatbuffers.Builder, numElems: number): void;
+  static endTypeAliases(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createTypeAliases(
+    builder: flatbuffers.Builder,
+    i8: number,
+    u8: number,
+    i16: number,
+    u16: number,
+    i32: number,
+    u32: number,
+    i64: bigint,
+    u64: bigint,
+    f32: number,
+    f64: number,
+    v8Offset: flatbuffers.Offset,
+    vf64Offset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): TypeAliases;
+  unpack(): TypeAliasesT;
+  unpackTo(_o: TypeAliasesT): void;
 }
 export declare class TypeAliasesT implements flatbuffers.IGeneratedObject {
-    i8: number;
-    u8: number;
-    i16: number;
-    u16: number;
-    i32: number;
-    u32: number;
-    i64: bigint;
-    u64: bigint;
-    f32: number;
-    f64: number;
-    v8: (number)[];
-    vf64: (number)[];
-    constructor(i8?: number, u8?: number, i16?: number, u16?: number, i32?: number, u32?: number, i64?: bigint, u64?: bigint, f32?: number, f64?: number, v8?: (number)[], vf64?: (number)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  i8: number;
+  u8: number;
+  i16: number;
+  u16: number;
+  i32: number;
+  u32: number;
+  i64: bigint;
+  u64: bigint;
+  f32: number;
+  f64: number;
+  v8: number[];
+  vf64: number[];
+  constructor(
+    i8?: number,
+    u8?: number,
+    i16?: number,
+    u16?: number,
+    i32?: number,
+    u32?: number,
+    i64?: bigint,
+    u64?: bigint,
+    f32?: number,
+    f64?: number,
+    v8?: number[],
+    vf64?: number[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/type-aliases.js b/tests/ts/my-game/example/type-aliases.js
index 81f3277..59d80d1 100644
--- a/tests/ts/my-game/example/type-aliases.js
+++ b/tests/ts/my-game/example/type-aliases.js
@@ -1,291 +1,318 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class TypeAliases {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsTypeAliases(bb, obj) {
+    return (obj || new TypeAliases())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsTypeAliases(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TypeAliases())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  i8() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : 0;
+  }
+  mutate_i8(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt8(this.bb_pos + offset, value);
+    return true;
+  }
+  u8() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
+  }
+  mutate_u8(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsTypeAliases(bb, obj) {
-        return (obj || new TypeAliases()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeUint8(this.bb_pos + offset, value);
+    return true;
+  }
+  i16() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
+  }
+  mutate_i16(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsTypeAliases(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new TypeAliases()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt16(this.bb_pos + offset, value);
+    return true;
+  }
+  u16() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_u16(value) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    if (offset === 0) {
+      return false;
     }
-    i8() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : 0;
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  i32() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_i32(value) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    if (offset === 0) {
+      return false;
     }
-    mutate_i8(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  u32() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+  }
+  mutate_u32(value) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    if (offset === 0) {
+      return false;
     }
-    u8() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
+    this.bb.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+  i64() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_i64(value) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    if (offset === 0) {
+      return false;
     }
-    mutate_u8(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint8(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  u64() {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_u64(value) {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    if (offset === 0) {
+      return false;
     }
-    i16() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  f32() {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
+  }
+  mutate_f32(value) {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    if (offset === 0) {
+      return false;
     }
-    mutate_i16(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt16(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeFloat32(this.bb_pos + offset, value);
+    return true;
+  }
+  f64() {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
+  }
+  mutate_f64(value) {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    if (offset === 0) {
+      return false;
     }
-    u16() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+    this.bb.writeFloat64(this.bb_pos + offset, value);
+    return true;
+  }
+  v8(index) {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ?
+        this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) :
+        0;
+  }
+  v8Length() {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  v8Array() {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ?
+        new Int8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  vf64(index) {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ? this.bb.readFloat64(
+                        this.bb.__vector(this.bb_pos + offset) + index * 8) :
+                    0;
+  }
+  vf64Length() {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  vf64Array() {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    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';
+  }
+  static startTypeAliases(builder) {
+    builder.startObject(12);
+  }
+  static addI8(builder, i8) {
+    builder.addFieldInt8(0, i8, 0);
+  }
+  static addU8(builder, u8) {
+    builder.addFieldInt8(1, u8, 0);
+  }
+  static addI16(builder, i16) {
+    builder.addFieldInt16(2, i16, 0);
+  }
+  static addU16(builder, u16) {
+    builder.addFieldInt16(3, u16, 0);
+  }
+  static addI32(builder, i32) {
+    builder.addFieldInt32(4, i32, 0);
+  }
+  static addU32(builder, u32) {
+    builder.addFieldInt32(5, u32, 0);
+  }
+  static addI64(builder, i64) {
+    builder.addFieldInt64(6, i64, BigInt('0'));
+  }
+  static addU64(builder, u64) {
+    builder.addFieldInt64(7, u64, BigInt('0'));
+  }
+  static addF32(builder, f32) {
+    builder.addFieldFloat32(8, f32, 0.0);
+  }
+  static addF64(builder, f64) {
+    builder.addFieldFloat64(9, f64, 0.0);
+  }
+  static addV8(builder, v8Offset) {
+    builder.addFieldOffset(10, v8Offset, 0);
+  }
+  static createV8Vector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    mutate_u16(value) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startV8Vector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addVf64(builder, vf64Offset) {
+    builder.addFieldOffset(11, vf64Offset, 0);
+  }
+  static createVf64Vector(builder, data) {
+    builder.startVector(8, data.length, 8);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addFloat64(data[i]);
     }
-    i32() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_i32(value) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    u32() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
-    }
-    mutate_u32(value) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint32(this.bb_pos + offset, value);
-        return true;
-    }
-    i64() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_i64(value) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
-    }
-    u64() {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_u64(value) {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    f32() {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
-    }
-    mutate_f32(value) {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat32(this.bb_pos + offset, value);
-        return true;
-    }
-    f64() {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
-    }
-    mutate_f64(value) {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat64(this.bb_pos + offset, value);
-        return true;
-    }
-    v8(index) {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
-    }
-    v8Length() {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    v8Array() {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    vf64(index) {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? this.bb.readFloat64(this.bb.__vector(this.bb_pos + offset) + index * 8) : 0;
-    }
-    vf64Length() {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    vf64Array() {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        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';
-    }
-    static startTypeAliases(builder) {
-        builder.startObject(12);
-    }
-    static addI8(builder, i8) {
-        builder.addFieldInt8(0, i8, 0);
-    }
-    static addU8(builder, u8) {
-        builder.addFieldInt8(1, u8, 0);
-    }
-    static addI16(builder, i16) {
-        builder.addFieldInt16(2, i16, 0);
-    }
-    static addU16(builder, u16) {
-        builder.addFieldInt16(3, u16, 0);
-    }
-    static addI32(builder, i32) {
-        builder.addFieldInt32(4, i32, 0);
-    }
-    static addU32(builder, u32) {
-        builder.addFieldInt32(5, u32, 0);
-    }
-    static addI64(builder, i64) {
-        builder.addFieldInt64(6, i64, BigInt('0'));
-    }
-    static addU64(builder, u64) {
-        builder.addFieldInt64(7, u64, BigInt('0'));
-    }
-    static addF32(builder, f32) {
-        builder.addFieldFloat32(8, f32, 0.0);
-    }
-    static addF64(builder, f64) {
-        builder.addFieldFloat64(9, f64, 0.0);
-    }
-    static addV8(builder, v8Offset) {
-        builder.addFieldOffset(10, v8Offset, 0);
-    }
-    static createV8Vector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startV8Vector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addVf64(builder, vf64Offset) {
-        builder.addFieldOffset(11, vf64Offset, 0);
-    }
-    static createVf64Vector(builder, data) {
-        builder.startVector(8, data.length, 8);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addFloat64(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startVf64Vector(builder, numElems) {
-        builder.startVector(8, numElems, 8);
-    }
-    static endTypeAliases(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createTypeAliases(builder, i8, u8, i16, u16, i32, u32, i64, u64, f32, f64, v8Offset, vf64Offset) {
-        TypeAliases.startTypeAliases(builder);
-        TypeAliases.addI8(builder, i8);
-        TypeAliases.addU8(builder, u8);
-        TypeAliases.addI16(builder, i16);
-        TypeAliases.addU16(builder, u16);
-        TypeAliases.addI32(builder, i32);
-        TypeAliases.addU32(builder, u32);
-        TypeAliases.addI64(builder, i64);
-        TypeAliases.addU64(builder, u64);
-        TypeAliases.addF32(builder, f32);
-        TypeAliases.addF64(builder, f64);
-        TypeAliases.addV8(builder, v8Offset);
-        TypeAliases.addVf64(builder, vf64Offset);
-        return TypeAliases.endTypeAliases(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return TypeAliases.getRootAsTypeAliases(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new TypeAliasesT(this.i8(), this.u8(), this.i16(), this.u16(), this.i32(), this.u32(), this.i64(), this.u64(), this.f32(), this.f64(), this.bb.createScalarList(this.v8.bind(this), this.v8Length()), this.bb.createScalarList(this.vf64.bind(this), this.vf64Length()));
-    }
-    unpackTo(_o) {
-        _o.i8 = this.i8();
-        _o.u8 = this.u8();
-        _o.i16 = this.i16();
-        _o.u16 = this.u16();
-        _o.i32 = this.i32();
-        _o.u32 = this.u32();
-        _o.i64 = this.i64();
-        _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());
-    }
+    return builder.endVector();
+  }
+  static startVf64Vector(builder, numElems) {
+    builder.startVector(8, numElems, 8);
+  }
+  static endTypeAliases(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createTypeAliases(
+      builder, i8, u8, i16, u16, i32, u32, i64, u64, f32, f64, v8Offset,
+      vf64Offset) {
+    TypeAliases.startTypeAliases(builder);
+    TypeAliases.addI8(builder, i8);
+    TypeAliases.addU8(builder, u8);
+    TypeAliases.addI16(builder, i16);
+    TypeAliases.addU16(builder, u16);
+    TypeAliases.addI32(builder, i32);
+    TypeAliases.addU32(builder, u32);
+    TypeAliases.addI64(builder, i64);
+    TypeAliases.addU64(builder, u64);
+    TypeAliases.addF32(builder, f32);
+    TypeAliases.addF64(builder, f64);
+    TypeAliases.addV8(builder, v8Offset);
+    TypeAliases.addVf64(builder, vf64Offset);
+    return TypeAliases.endTypeAliases(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return TypeAliases.getRootAsTypeAliases(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new TypeAliasesT(
+        this.i8(), this.u8(), this.i16(), this.u16(), this.i32(), this.u32(),
+        this.i64(), this.u64(), this.f32(), this.f64(),
+        this.bb.createScalarList(this.v8.bind(this), this.v8Length()),
+        this.bb.createScalarList(this.vf64.bind(this), this.vf64Length()));
+  }
+  unpackTo(_o) {
+    _o.i8 = this.i8();
+    _o.u8 = this.u8();
+    _o.i16 = this.i16();
+    _o.u16 = this.u16();
+    _o.i32 = this.i32();
+    _o.u32 = this.u32();
+    _o.i64 = this.i64();
+    _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());
+  }
 }
 export class TypeAliasesT {
-    constructor(i8 = 0, u8 = 0, i16 = 0, u16 = 0, i32 = 0, u32 = 0, i64 = BigInt('0'), u64 = BigInt('0'), f32 = 0.0, f64 = 0.0, v8 = [], vf64 = []) {
-        this.i8 = i8;
-        this.u8 = u8;
-        this.i16 = i16;
-        this.u16 = u16;
-        this.i32 = i32;
-        this.u32 = u32;
-        this.i64 = i64;
-        this.u64 = u64;
-        this.f32 = f32;
-        this.f64 = f64;
-        this.v8 = v8;
-        this.vf64 = vf64;
-    }
-    pack(builder) {
-        const v8 = TypeAliases.createV8Vector(builder, this.v8);
-        const vf64 = TypeAliases.createVf64Vector(builder, this.vf64);
-        return TypeAliases.createTypeAliases(builder, this.i8, this.u8, this.i16, this.u16, this.i32, this.u32, this.i64, this.u64, this.f32, this.f64, v8, vf64);
-    }
+  constructor(
+      i8 = 0, u8 = 0, i16 = 0, u16 = 0, i32 = 0, u32 = 0, i64 = BigInt('0'),
+      u64 = BigInt('0'), f32 = 0.0, f64 = 0.0, v8 = [], vf64 = []) {
+    this.i8 = i8;
+    this.u8 = u8;
+    this.i16 = i16;
+    this.u16 = u16;
+    this.i32 = i32;
+    this.u32 = u32;
+    this.i64 = i64;
+    this.u64 = u64;
+    this.f32 = f32;
+    this.f64 = f64;
+    this.v8 = v8;
+    this.vf64 = vf64;
+  }
+  pack(builder) {
+    const v8 = TypeAliases.createV8Vector(builder, this.v8);
+    const vf64 = TypeAliases.createVf64Vector(builder, this.vf64);
+    return TypeAliases.createTypeAliases(
+        builder, this.i8, this.u8, this.i16, this.u16, this.i32, this.u32,
+        this.i64, this.u64, this.f32, this.f64, v8, vf64);
+  }
 }
diff --git a/tests/ts/my-game/example/vec3.d.ts b/tests/ts/my-game/example/vec3.d.ts
index c5a6be2..c3d79f9 100644
--- a/tests/ts/my-game/example/vec3.d.ts
+++ b/tests/ts/my-game/example/vec3.d.ts
@@ -1,34 +1,50 @@
 import * as flatbuffers from 'flatbuffers';
-import { Color } from '../../my-game/example/color.js';
-import { Test, TestT } from '../../my-game/example/test.js';
+import {Color} from '../../my-game/example/color.js';
+import {Test, TestT} from '../../my-game/example/test.js';
 export declare class Vec3 implements flatbuffers.IUnpackableObject<Vec3T> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Vec3;
-    x(): number;
-    mutate_x(value: number): boolean;
-    y(): number;
-    mutate_y(value: number): boolean;
-    z(): number;
-    mutate_z(value: number): boolean;
-    test1(): number;
-    mutate_test1(value: number): boolean;
-    test2(): Color;
-    mutate_test2(value: Color): boolean;
-    test3(obj?: Test): Test | null;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createVec3(builder: flatbuffers.Builder, x: number, y: number, z: number, test1: number, test2: Color, test3_a: number, test3_b: number): flatbuffers.Offset;
-    unpack(): Vec3T;
-    unpackTo(_o: Vec3T): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Vec3;
+  x(): number;
+  mutate_x(value: number): boolean;
+  y(): number;
+  mutate_y(value: number): boolean;
+  z(): number;
+  mutate_z(value: number): boolean;
+  test1(): number;
+  mutate_test1(value: number): boolean;
+  test2(): Color;
+  mutate_test2(value: Color): boolean;
+  test3(obj?: Test): Test | null;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createVec3(
+    builder: flatbuffers.Builder,
+    x: number,
+    y: number,
+    z: number,
+    test1: number,
+    test2: Color,
+    test3_a: number,
+    test3_b: number,
+  ): flatbuffers.Offset;
+  unpack(): Vec3T;
+  unpackTo(_o: Vec3T): void;
 }
 export declare class Vec3T implements flatbuffers.IGeneratedObject {
-    x: number;
-    y: number;
-    z: number;
-    test1: number;
-    test2: Color;
-    test3: TestT | null;
-    constructor(x?: number, y?: number, z?: number, test1?: number, test2?: Color, test3?: TestT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  x: number;
+  y: number;
+  z: number;
+  test1: number;
+  test2: Color;
+  test3: TestT | null;
+  constructor(
+    x?: number,
+    y?: number,
+    z?: number,
+    test1?: number,
+    test2?: Color,
+    test3?: TestT | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example/vec3.js b/tests/ts/my-game/example/vec3.js
index cd5b034..a8f3eff 100644
--- a/tests/ts/my-game/example/vec3.js
+++ b/tests/ts/my-game/example/vec3.js
@@ -1,98 +1,103 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-import { Color } from '../../my-game/example/color.js';
-import { Test } from '../../my-game/example/test.js';
+import {Color} from '../../my-game/example/color.js';
+import {Test} from '../../my-game/example/test.js';
 export class Vec3 {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    x() {
-        return this.bb.readFloat32(this.bb_pos);
-    }
-    mutate_x(value) {
-        this.bb.writeFloat32(this.bb_pos + 0, value);
-        return true;
-    }
-    y() {
-        return this.bb.readFloat32(this.bb_pos + 4);
-    }
-    mutate_y(value) {
-        this.bb.writeFloat32(this.bb_pos + 4, value);
-        return true;
-    }
-    z() {
-        return this.bb.readFloat32(this.bb_pos + 8);
-    }
-    mutate_z(value) {
-        this.bb.writeFloat32(this.bb_pos + 8, value);
-        return true;
-    }
-    test1() {
-        return this.bb.readFloat64(this.bb_pos + 16);
-    }
-    mutate_test1(value) {
-        this.bb.writeFloat64(this.bb_pos + 16, value);
-        return true;
-    }
-    test2() {
-        return this.bb.readUint8(this.bb_pos + 24);
-    }
-    mutate_test2(value) {
-        this.bb.writeUint8(this.bb_pos + 24, value);
-        return true;
-    }
-    test3(obj) {
-        return (obj || new Test()).__init(this.bb_pos + 26, this.bb);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example.Vec3';
-    }
-    static sizeOf() {
-        return 32;
-    }
-    static createVec3(builder, x, y, z, test1, test2, test3_a, test3_b) {
-        builder.prep(8, 32);
-        builder.pad(2);
-        builder.prep(2, 4);
-        builder.pad(1);
-        builder.writeInt8(test3_b);
-        builder.writeInt16(test3_a);
-        builder.pad(1);
-        builder.writeInt8(test2);
-        builder.writeFloat64(test1);
-        builder.pad(4);
-        builder.writeFloat32(z);
-        builder.writeFloat32(y);
-        builder.writeFloat32(x);
-        return builder.offset();
-    }
-    unpack() {
-        return new Vec3T(this.x(), this.y(), this.z(), this.test1(), this.test2(), (this.test3() !== null ? this.test3().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.x = this.x();
-        _o.y = this.y();
-        _o.z = this.z();
-        _o.test1 = this.test1();
-        _o.test2 = this.test2();
-        _o.test3 = (this.test3() !== null ? this.test3().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  x() {
+    return this.bb.readFloat32(this.bb_pos);
+  }
+  mutate_x(value) {
+    this.bb.writeFloat32(this.bb_pos + 0, value);
+    return true;
+  }
+  y() {
+    return this.bb.readFloat32(this.bb_pos + 4);
+  }
+  mutate_y(value) {
+    this.bb.writeFloat32(this.bb_pos + 4, value);
+    return true;
+  }
+  z() {
+    return this.bb.readFloat32(this.bb_pos + 8);
+  }
+  mutate_z(value) {
+    this.bb.writeFloat32(this.bb_pos + 8, value);
+    return true;
+  }
+  test1() {
+    return this.bb.readFloat64(this.bb_pos + 16);
+  }
+  mutate_test1(value) {
+    this.bb.writeFloat64(this.bb_pos + 16, value);
+    return true;
+  }
+  test2() {
+    return this.bb.readUint8(this.bb_pos + 24);
+  }
+  mutate_test2(value) {
+    this.bb.writeUint8(this.bb_pos + 24, value);
+    return true;
+  }
+  test3(obj) {
+    return (obj || new Test()).__init(this.bb_pos + 26, this.bb);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example.Vec3';
+  }
+  static sizeOf() {
+    return 32;
+  }
+  static createVec3(builder, x, y, z, test1, test2, test3_a, test3_b) {
+    builder.prep(8, 32);
+    builder.pad(2);
+    builder.prep(2, 4);
+    builder.pad(1);
+    builder.writeInt8(test3_b);
+    builder.writeInt16(test3_a);
+    builder.pad(1);
+    builder.writeInt8(test2);
+    builder.writeFloat64(test1);
+    builder.pad(4);
+    builder.writeFloat32(z);
+    builder.writeFloat32(y);
+    builder.writeFloat32(x);
+    return builder.offset();
+  }
+  unpack() {
+    return new Vec3T(
+        this.x(), this.y(), this.z(), this.test1(), this.test2(),
+        (this.test3() !== null ? this.test3().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.x = this.x();
+    _o.y = this.y();
+    _o.z = this.z();
+    _o.test1 = this.test1();
+    _o.test2 = this.test2();
+    _o.test3 = (this.test3() !== null ? this.test3().unpack() : null);
+  }
 }
 export class Vec3T {
-    constructor(x = 0.0, y = 0.0, z = 0.0, test1 = 0.0, test2 = Color.Red, test3 = null) {
-        this.x = x;
-        this.y = y;
-        this.z = z;
-        this.test1 = test1;
-        this.test2 = test2;
-        this.test3 = test3;
-    }
-    pack(builder) {
-        return Vec3.createVec3(builder, this.x, this.y, this.z, this.test1, this.test2, (this.test3?.a ?? 0), (this.test3?.b ?? 0));
-    }
+  constructor(
+      x = 0.0, y = 0.0, z = 0.0, test1 = 0.0, test2 = Color.Red, test3 = null) {
+    this.x = x;
+    this.y = y;
+    this.z = z;
+    this.test1 = test1;
+    this.test2 = test2;
+    this.test3 = test3;
+  }
+  pack(builder) {
+    return Vec3.createVec3(
+        builder, this.x, this.y, this.z, this.test1, this.test2,
+        (this.test3?.a ?? 0), (this.test3?.b ?? 0));
+  }
 }
diff --git a/tests/ts/my-game/example2.d.ts b/tests/ts/my-game/example2.d.ts
index 4aebab9..7037b70 100644
--- a/tests/ts/my-game/example2.d.ts
+++ b/tests/ts/my-game/example2.d.ts
@@ -1 +1 @@
-export { Monster, MonsterT } from './example2/monster.js';
+export {Monster, MonsterT} from './example2/monster.js';
diff --git a/tests/ts/my-game/example2.js b/tests/ts/my-game/example2.js
index 2c599c5..b6e9a15 100644
--- a/tests/ts/my-game/example2.js
+++ b/tests/ts/my-game/example2.js
@@ -1,3 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Monster, MonsterT } from './example2/monster.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {Monster, MonsterT} from './example2/monster.js';
diff --git a/tests/ts/my-game/example2/monster.d.ts b/tests/ts/my-game/example2/monster.d.ts
index 9da773b..f15a200 100644
--- a/tests/ts/my-game/example2/monster.d.ts
+++ b/tests/ts/my-game/example2/monster.d.ts
@@ -1,20 +1,25 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class Monster implements flatbuffers.IUnpackableObject<MonsterT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Monster;
-    static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
-    static getSizePrefixedRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
-    static getFullyQualifiedName(): string;
-    static startMonster(builder: flatbuffers.Builder): void;
-    static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): Monster;
-    unpack(): MonsterT;
-    unpackTo(_o: MonsterT): void;
+export declare class Monster
+  implements flatbuffers.IUnpackableObject<MonsterT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Monster;
+  static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster;
+  static getSizePrefixedRootAsMonster(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Monster,
+  ): Monster;
+  static getFullyQualifiedName(): string;
+  static startMonster(builder: flatbuffers.Builder): void;
+  static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createMonster(builder: flatbuffers.Builder): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): Monster;
+  unpack(): MonsterT;
+  unpackTo(_o: MonsterT): void;
 }
 export declare class MonsterT implements flatbuffers.IGeneratedObject {
-    constructor();
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  constructor();
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/example2/monster.js b/tests/ts/my-game/example2/monster.js
index 56d215f..6fb80c9 100644
--- a/tests/ts/my-game/example2/monster.js
+++ b/tests/ts/my-game/example2/monster.js
@@ -1,51 +1,54 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class Monster {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsMonster(bb, obj) {
-        return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsMonster(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.Example2.Monster';
-    }
-    static startMonster(builder) {
-        builder.startObject(0);
-    }
-    static endMonster(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createMonster(builder) {
-        Monster.startMonster(builder);
-        return Monster.endMonster(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new MonsterT();
-    }
-    unpackTo(_o) { }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsMonster(bb, obj) {
+    return (obj || new Monster())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsMonster(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Monster())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.Example2.Monster';
+  }
+  static startMonster(builder) {
+    builder.startObject(0);
+  }
+  static endMonster(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createMonster(builder) {
+    Monster.startMonster(builder);
+    return Monster.endMonster(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new MonsterT();
+  }
+  unpackTo(_o) {}
 }
 export class MonsterT {
-    constructor() { }
-    pack(builder) {
-        return Monster.createMonster(builder);
-    }
+  constructor() {}
+  pack(builder) {
+    return Monster.createMonster(builder);
+  }
 }
diff --git a/tests/ts/my-game/in-parent-namespace.d.ts b/tests/ts/my-game/in-parent-namespace.d.ts
index 07dc156..fcffe78 100644
--- a/tests/ts/my-game/in-parent-namespace.d.ts
+++ b/tests/ts/my-game/in-parent-namespace.d.ts
@@ -1,20 +1,32 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class InParentNamespace implements flatbuffers.IUnpackableObject<InParentNamespaceT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): InParentNamespace;
-    static getRootAsInParentNamespace(bb: flatbuffers.ByteBuffer, obj?: InParentNamespace): InParentNamespace;
-    static getSizePrefixedRootAsInParentNamespace(bb: flatbuffers.ByteBuffer, obj?: InParentNamespace): InParentNamespace;
-    static getFullyQualifiedName(): string;
-    static startInParentNamespace(builder: flatbuffers.Builder): void;
-    static endInParentNamespace(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createInParentNamespace(builder: flatbuffers.Builder): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): InParentNamespace;
-    unpack(): InParentNamespaceT;
-    unpackTo(_o: InParentNamespaceT): void;
+export declare class InParentNamespace
+  implements flatbuffers.IUnpackableObject<InParentNamespaceT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): InParentNamespace;
+  static getRootAsInParentNamespace(
+    bb: flatbuffers.ByteBuffer,
+    obj?: InParentNamespace,
+  ): InParentNamespace;
+  static getSizePrefixedRootAsInParentNamespace(
+    bb: flatbuffers.ByteBuffer,
+    obj?: InParentNamespace,
+  ): InParentNamespace;
+  static getFullyQualifiedName(): string;
+  static startInParentNamespace(builder: flatbuffers.Builder): void;
+  static endInParentNamespace(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createInParentNamespace(
+    builder: flatbuffers.Builder,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): InParentNamespace;
+  unpack(): InParentNamespaceT;
+  unpackTo(_o: InParentNamespaceT): void;
 }
-export declare class InParentNamespaceT implements flatbuffers.IGeneratedObject {
-    constructor();
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+export declare class InParentNamespaceT
+  implements flatbuffers.IGeneratedObject
+{
+  constructor();
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/in-parent-namespace.js b/tests/ts/my-game/in-parent-namespace.js
index 197d271..f514149 100644
--- a/tests/ts/my-game/in-parent-namespace.js
+++ b/tests/ts/my-game/in-parent-namespace.js
@@ -1,51 +1,55 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class InParentNamespace {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsInParentNamespace(bb, obj) {
-        return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsInParentNamespace(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.InParentNamespace';
-    }
-    static startInParentNamespace(builder) {
-        builder.startObject(0);
-    }
-    static endInParentNamespace(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createInParentNamespace(builder) {
-        InParentNamespace.startInParentNamespace(builder);
-        return InParentNamespace.endInParentNamespace(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return InParentNamespace.getRootAsInParentNamespace(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new InParentNamespaceT();
-    }
-    unpackTo(_o) { }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsInParentNamespace(bb, obj) {
+    return (obj || new InParentNamespace())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsInParentNamespace(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new InParentNamespace())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.InParentNamespace';
+  }
+  static startInParentNamespace(builder) {
+    builder.startObject(0);
+  }
+  static endInParentNamespace(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createInParentNamespace(builder) {
+    InParentNamespace.startInParentNamespace(builder);
+    return InParentNamespace.endInParentNamespace(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return InParentNamespace.getRootAsInParentNamespace(
+        new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new InParentNamespaceT();
+  }
+  unpackTo(_o) {}
 }
 export class InParentNamespaceT {
-    constructor() { }
-    pack(builder) {
-        return InParentNamespace.createInParentNamespace(builder);
-    }
+  constructor() {}
+  pack(builder) {
+    return InParentNamespace.createInParentNamespace(builder);
+  }
 }
diff --git a/tests/ts/my-game/other-name-space.d.ts b/tests/ts/my-game/other-name-space.d.ts
index 3152eff..d195185 100644
--- a/tests/ts/my-game/other-name-space.d.ts
+++ b/tests/ts/my-game/other-name-space.d.ts
@@ -1,3 +1,3 @@
-export { FromInclude } from './other-name-space/from-include.js';
-export { TableB, TableBT } from './other-name-space/table-b.js';
-export { Unused, UnusedT } from './other-name-space/unused.js';
+export {FromInclude} from './other-name-space/from-include.js';
+export {TableB, TableBT} from './other-name-space/table-b.js';
+export {Unused, UnusedT} from './other-name-space/unused.js';
diff --git a/tests/ts/my-game/other-name-space.js b/tests/ts/my-game/other-name-space.js
index 6b80bdb..2171b30 100644
--- a/tests/ts/my-game/other-name-space.js
+++ b/tests/ts/my-game/other-name-space.js
@@ -1,5 +1,6 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { FromInclude } from './other-name-space/from-include.js';
-export { TableB, TableBT } from './other-name-space/table-b.js';
-export { Unused, UnusedT } from './other-name-space/unused.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {FromInclude} from './other-name-space/from-include.js';
+export {TableB, TableBT} from './other-name-space/table-b.js';
+export {Unused, UnusedT} from './other-name-space/unused.js';
diff --git a/tests/ts/my-game/other-name-space/from-include.d.ts b/tests/ts/my-game/other-name-space/from-include.d.ts
index dc12fa4..2e220a6 100644
--- a/tests/ts/my-game/other-name-space/from-include.d.ts
+++ b/tests/ts/my-game/other-name-space/from-include.d.ts
@@ -1,3 +1,3 @@
 export declare enum FromInclude {
-    IncludeVal = "0"
+  IncludeVal = '0',
 }
diff --git a/tests/ts/my-game/other-name-space/from-include.js b/tests/ts/my-game/other-name-space/from-include.js
index e9d4e43..5ad1bd1 100644
--- a/tests/ts/my-game/other-name-space/from-include.js
+++ b/tests/ts/my-game/other-name-space/from-include.js
@@ -1,6 +1,7 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var FromInclude;
-(function (FromInclude) {
-    FromInclude["IncludeVal"] = "0";
+(function(FromInclude) {
+FromInclude['IncludeVal'] = '0';
 })(FromInclude || (FromInclude = {}));
diff --git a/tests/ts/my-game/other-name-space/from-include.ts b/tests/ts/my-game/other-name-space/from-include.ts
index 86305f2..6d087bf 100644
--- a/tests/ts/my-game/other-name-space/from-include.ts
+++ b/tests/ts/my-game/other-name-space/from-include.ts
@@ -3,5 +3,5 @@
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
 export enum FromInclude {
-  IncludeVal = '0'
+  IncludeVal = '0',
 }
diff --git a/tests/ts/my-game/other-name-space/table-b.d.ts b/tests/ts/my-game/other-name-space/table-b.d.ts
index d4e1bcf..50c885c 100644
--- a/tests/ts/my-game/other-name-space/table-b.d.ts
+++ b/tests/ts/my-game/other-name-space/table-b.d.ts
@@ -1,24 +1,30 @@
 import * as flatbuffers from 'flatbuffers';
-import { TableA, TableAT } from '../../table-a.js';
+import {TableA, TableAT} from '../../table-a.js';
 export declare class TableB implements flatbuffers.IUnpackableObject<TableBT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): TableB;
-    static getRootAsTableB(bb: flatbuffers.ByteBuffer, obj?: TableB): TableB;
-    static getSizePrefixedRootAsTableB(bb: flatbuffers.ByteBuffer, obj?: TableB): TableB;
-    a(obj?: TableA): TableA | null;
-    static getFullyQualifiedName(): string;
-    static startTableB(builder: flatbuffers.Builder): void;
-    static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset): void;
-    static endTableB(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createTableB(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): TableB;
-    unpack(): TableBT;
-    unpackTo(_o: TableBT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): TableB;
+  static getRootAsTableB(bb: flatbuffers.ByteBuffer, obj?: TableB): TableB;
+  static getSizePrefixedRootAsTableB(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TableB,
+  ): TableB;
+  a(obj?: TableA): TableA | null;
+  static getFullyQualifiedName(): string;
+  static startTableB(builder: flatbuffers.Builder): void;
+  static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset): void;
+  static endTableB(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createTableB(
+    builder: flatbuffers.Builder,
+    aOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): TableB;
+  unpack(): TableBT;
+  unpackTo(_o: TableBT): void;
 }
 export declare class TableBT implements flatbuffers.IGeneratedObject {
-    a: TableAT | null;
-    constructor(a?: TableAT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: TableAT | null;
+  constructor(a?: TableAT | null);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/other-name-space/table-b.js b/tests/ts/my-game/other-name-space/table-b.js
index 74b170c..b439a8e 100644
--- a/tests/ts/my-game/other-name-space/table-b.js
+++ b/tests/ts/my-game/other-name-space/table-b.js
@@ -1,65 +1,73 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { TableA } from '../../table-a.js';
+
+import {TableA} from '../../table-a.js';
+
 export class TableB {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsTableB(bb, obj) {
-        return (obj || new TableB()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsTableB(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new TableB()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    a(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? (obj || new TableA()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.OtherNameSpace.TableB';
-    }
-    static startTableB(builder) {
-        builder.startObject(1);
-    }
-    static addA(builder, aOffset) {
-        builder.addFieldOffset(0, aOffset, 0);
-    }
-    static endTableB(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createTableB(builder, aOffset) {
-        TableB.startTableB(builder);
-        TableB.addA(builder, aOffset);
-        return TableB.endTableB(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return TableB.getRootAsTableB(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new TableBT((this.a() !== null ? this.a().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.a = (this.a() !== null ? this.a().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsTableB(bb, obj) {
+    return (obj || new TableB())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsTableB(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TableB())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  a(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ?
+        (obj || new TableA())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.OtherNameSpace.TableB';
+  }
+  static startTableB(builder) {
+    builder.startObject(1);
+  }
+  static addA(builder, aOffset) {
+    builder.addFieldOffset(0, aOffset, 0);
+  }
+  static endTableB(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createTableB(builder, aOffset) {
+    TableB.startTableB(builder);
+    TableB.addA(builder, aOffset);
+    return TableB.endTableB(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return TableB.getRootAsTableB(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new TableBT((this.a() !== null ? this.a().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.a = (this.a() !== null ? this.a().unpack() : null);
+  }
 }
 export class TableBT {
-    constructor(a = null) {
-        this.a = a;
-    }
-    pack(builder) {
-        const a = (this.a !== null ? this.a.pack(builder) : 0);
-        return TableB.createTableB(builder, a);
-    }
+  constructor(a = null) {
+    this.a = a;
+  }
+  pack(builder) {
+    const a = (this.a !== null ? this.a.pack(builder) : 0);
+    return TableB.createTableB(builder, a);
+  }
 }
diff --git a/tests/ts/my-game/other-name-space/table-b.ts b/tests/ts/my-game/other-name-space/table-b.ts
index 264a7c4..2b7ae0c 100644
--- a/tests/ts/my-game/other-name-space/table-b.ts
+++ b/tests/ts/my-game/other-name-space/table-b.ts
@@ -4,86 +4,94 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { TableA, TableAT } from '../../table-a.js';
-
+import {TableA, TableAT} from '../../table-a.js';
 
 export class TableB implements flatbuffers.IUnpackableObject<TableBT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):TableB {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): TableB {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsTableB(bb:flatbuffers.ByteBuffer, obj?:TableB):TableB {
-  return (obj || new TableB()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsTableB(bb: flatbuffers.ByteBuffer, obj?: TableB): TableB {
+    return (obj || new TableB()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsTableB(bb:flatbuffers.ByteBuffer, obj?:TableB):TableB {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new TableB()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsTableB(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TableB,
+  ): TableB {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TableB()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-a(obj?:TableA):TableA|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? (obj || new TableA()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
+  a(obj?: TableA): TableA | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? (obj || new TableA()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
 
-static getFullyQualifiedName():string {
-  return 'MyGame.OtherNameSpace.TableB';
-}
+  static getFullyQualifiedName(): string {
+    return 'MyGame.OtherNameSpace.TableB';
+  }
 
-static startTableB(builder:flatbuffers.Builder) {
-  builder.startObject(1);
-}
+  static startTableB(builder: flatbuffers.Builder) {
+    builder.startObject(1);
+  }
 
-static addA(builder:flatbuffers.Builder, aOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, aOffset, 0);
-}
+  static addA(builder: flatbuffers.Builder, aOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, aOffset, 0);
+  }
 
-static endTableB(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endTableB(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static createTableB(builder:flatbuffers.Builder, aOffset:flatbuffers.Offset):flatbuffers.Offset {
-  TableB.startTableB(builder);
-  TableB.addA(builder, aOffset);
-  return TableB.endTableB(builder);
-}
+  static createTableB(
+    builder: flatbuffers.Builder,
+    aOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    TableB.startTableB(builder);
+    TableB.addA(builder, aOffset);
+    return TableB.endTableB(builder);
+  }
 
-serialize():Uint8Array {
-  return this.bb!.bytes();
-}
+  serialize(): Uint8Array {
+    return this.bb!.bytes();
+  }
 
-static deserialize(buffer: Uint8Array):TableB {
-  return TableB.getRootAsTableB(new flatbuffers.ByteBuffer(buffer))
-}
+  static deserialize(buffer: Uint8Array): TableB {
+    return TableB.getRootAsTableB(new flatbuffers.ByteBuffer(buffer));
+  }
 
-unpack(): TableBT {
-  return new TableBT(
-    (this.a() !== null ? this.a()!.unpack() : null)
-  );
-}
+  unpack(): TableBT {
+    return new TableBT(this.a() !== null ? this.a()!.unpack() : null);
+  }
 
-
-unpackTo(_o: TableBT): void {
-  _o.a = (this.a() !== null ? this.a()!.unpack() : null);
-}
+  unpackTo(_o: TableBT): void {
+    _o.a = this.a() !== null ? this.a()!.unpack() : null;
+  }
 }
 
 export class TableBT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: TableAT|null = null
-){}
+  constructor(public a: TableAT | null = null) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const a = this.a !== null ? this.a!.pack(builder) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const a = (this.a !== null ? this.a!.pack(builder) : 0);
-
-  return TableB.createTableB(builder,
-    a
-  );
-}
+    return TableB.createTableB(builder, a);
+  }
 }
diff --git a/tests/ts/my-game/other-name-space/unused.d.ts b/tests/ts/my-game/other-name-space/unused.d.ts
index 6d929f2..ced7cac 100644
--- a/tests/ts/my-game/other-name-space/unused.d.ts
+++ b/tests/ts/my-game/other-name-space/unused.d.ts
@@ -1,18 +1,21 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class Unused implements flatbuffers.IUnpackableObject<UnusedT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Unused;
-    a(): number;
-    mutate_a(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createUnused(builder: flatbuffers.Builder, a: number): flatbuffers.Offset;
-    unpack(): UnusedT;
-    unpackTo(_o: UnusedT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Unused;
+  a(): number;
+  mutate_a(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createUnused(
+    builder: flatbuffers.Builder,
+    a: number,
+  ): flatbuffers.Offset;
+  unpack(): UnusedT;
+  unpackTo(_o: UnusedT): void;
 }
 export declare class UnusedT implements flatbuffers.IGeneratedObject {
-    a: number;
-    constructor(a?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: number;
+  constructor(a?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/my-game/other-name-space/unused.js b/tests/ts/my-game/other-name-space/unused.js
index 0b42918..2c2b46a 100644
--- a/tests/ts/my-game/other-name-space/unused.js
+++ b/tests/ts/my-game/other-name-space/unused.js
@@ -1,44 +1,44 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class Unused {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    a() {
-        return this.bb.readInt32(this.bb_pos);
-    }
-    mutate_a(value) {
-        this.bb.writeInt32(this.bb_pos + 0, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'MyGame.OtherNameSpace.Unused';
-    }
-    static sizeOf() {
-        return 4;
-    }
-    static createUnused(builder, a) {
-        builder.prep(4, 4);
-        builder.writeInt32(a);
-        return builder.offset();
-    }
-    unpack() {
-        return new UnusedT(this.a());
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  a() {
+    return this.bb.readInt32(this.bb_pos);
+  }
+  mutate_a(value) {
+    this.bb.writeInt32(this.bb_pos + 0, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'MyGame.OtherNameSpace.Unused';
+  }
+  static sizeOf() {
+    return 4;
+  }
+  static createUnused(builder, a) {
+    builder.prep(4, 4);
+    builder.writeInt32(a);
+    return builder.offset();
+  }
+  unpack() {
+    return new UnusedT(this.a());
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+  }
 }
 export class UnusedT {
-    constructor(a = 0) {
-        this.a = a;
-    }
-    pack(builder) {
-        return Unused.createUnused(builder, this.a);
-    }
+  constructor(a = 0) {
+    this.a = a;
+  }
+  pack(builder) {
+    return Unused.createUnused(builder, this.a);
+  }
 }
diff --git a/tests/ts/my-game/other-name-space/unused.ts b/tests/ts/my-game/other-name-space/unused.ts
index 6c22d1e..dcd663f 100644
--- a/tests/ts/my-game/other-name-space/unused.ts
+++ b/tests/ts/my-game/other-name-space/unused.ts
@@ -4,62 +4,54 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class Unused implements flatbuffers.IUnpackableObject<UnusedT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Unused {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): Unused {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-a():number {
-  return this.bb!.readInt32(this.bb_pos);
-}
+  a(): number {
+    return this.bb!.readInt32(this.bb_pos);
+  }
 
-mutate_a(value:number):boolean {
-  this.bb!.writeInt32(this.bb_pos + 0, value);
-  return true;
-}
+  mutate_a(value: number): boolean {
+    this.bb!.writeInt32(this.bb_pos + 0, value);
+    return true;
+  }
 
-static getFullyQualifiedName():string {
-  return 'MyGame.OtherNameSpace.Unused';
-}
+  static getFullyQualifiedName(): string {
+    return 'MyGame.OtherNameSpace.Unused';
+  }
 
-static sizeOf():number {
-  return 4;
-}
+  static sizeOf(): number {
+    return 4;
+  }
 
-static createUnused(builder:flatbuffers.Builder, a: number):flatbuffers.Offset {
-  builder.prep(4, 4);
-  builder.writeInt32(a);
-  return builder.offset();
-}
+  static createUnused(
+    builder: flatbuffers.Builder,
+    a: number,
+  ): flatbuffers.Offset {
+    builder.prep(4, 4);
+    builder.writeInt32(a);
+    return builder.offset();
+  }
 
+  unpack(): UnusedT {
+    return new UnusedT(this.a());
+  }
 
-unpack(): UnusedT {
-  return new UnusedT(
-    this.a()
-  );
-}
-
-
-unpackTo(_o: UnusedT): void {
-  _o.a = this.a();
-}
+  unpackTo(_o: UnusedT): void {
+    _o.a = this.a();
+  }
 }
 
 export class UnusedT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: number = 0
-){}
+  constructor(public a: number = 0) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return Unused.createUnused(builder,
-    this.a
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return Unused.createUnused(builder, this.a);
+  }
 }
diff --git a/tests/ts/no_import_ext/optional-scalars.d.ts b/tests/ts/no_import_ext/optional-scalars.d.ts
index 40a0ac6..13cac5d 100644
--- a/tests/ts/no_import_ext/optional-scalars.d.ts
+++ b/tests/ts/no_import_ext/optional-scalars.d.ts
@@ -1,2 +1,2 @@
-export { OptionalByte } from './optional-scalars/optional-byte';
-export { ScalarStuff } from './optional-scalars/scalar-stuff';
+export {OptionalByte} from './optional-scalars/optional-byte';
+export {ScalarStuff} from './optional-scalars/scalar-stuff';
diff --git a/tests/ts/no_import_ext/optional-scalars.js b/tests/ts/no_import_ext/optional-scalars.js
index 05aee5b..5301a84 100644
--- a/tests/ts/no_import_ext/optional-scalars.js
+++ b/tests/ts/no_import_ext/optional-scalars.js
@@ -1,4 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { OptionalByte } from './optional-scalars/optional-byte';
-export { ScalarStuff } from './optional-scalars/scalar-stuff';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {OptionalByte} from './optional-scalars/optional-byte';
+export {ScalarStuff} from './optional-scalars/scalar-stuff';
diff --git a/tests/ts/no_import_ext/optional-scalars.ts b/tests/ts/no_import_ext/optional-scalars.ts
index 8fef702..e99c050 100644
--- a/tests/ts/no_import_ext/optional-scalars.ts
+++ b/tests/ts/no_import_ext/optional-scalars.ts
@@ -2,5 +2,5 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { OptionalByte } from './optional-scalars/optional-byte';
-export { ScalarStuff } from './optional-scalars/scalar-stuff';
+export {OptionalByte} from './optional-scalars/optional-byte';
+export {ScalarStuff} from './optional-scalars/scalar-stuff';
diff --git a/tests/ts/no_import_ext/optional-scalars/optional-byte.d.ts b/tests/ts/no_import_ext/optional-scalars/optional-byte.d.ts
index fc5b5fe..a6450bb 100644
--- a/tests/ts/no_import_ext/optional-scalars/optional-byte.d.ts
+++ b/tests/ts/no_import_ext/optional-scalars/optional-byte.d.ts
@@ -1,5 +1,5 @@
 export declare enum OptionalByte {
-    None = 0,
-    One = 1,
-    Two = 2
+  None = 0,
+  One = 1,
+  Two = 2,
 }
diff --git a/tests/ts/no_import_ext/optional-scalars/optional-byte.js b/tests/ts/no_import_ext/optional-scalars/optional-byte.js
index e669367..7fcf62e 100644
--- a/tests/ts/no_import_ext/optional-scalars/optional-byte.js
+++ b/tests/ts/no_import_ext/optional-scalars/optional-byte.js
@@ -1,8 +1,9 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var OptionalByte;
-(function (OptionalByte) {
-    OptionalByte[OptionalByte["None"] = 0] = "None";
-    OptionalByte[OptionalByte["One"] = 1] = "One";
-    OptionalByte[OptionalByte["Two"] = 2] = "Two";
+(function(OptionalByte) {
+OptionalByte[OptionalByte['None'] = 0] = 'None';
+OptionalByte[OptionalByte['One'] = 1] = 'One';
+OptionalByte[OptionalByte['Two'] = 2] = 'Two';
 })(OptionalByte || (OptionalByte = {}));
diff --git a/tests/ts/no_import_ext/optional-scalars/optional-byte.ts b/tests/ts/no_import_ext/optional-scalars/optional-byte.ts
index 9bb66a9..e77bf15 100644
--- a/tests/ts/no_import_ext/optional-scalars/optional-byte.ts
+++ b/tests/ts/no_import_ext/optional-scalars/optional-byte.ts
@@ -5,5 +5,5 @@
 export enum OptionalByte {
   None = 0,
   One = 1,
-  Two = 2
+  Two = 2,
 }
diff --git a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.d.ts b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.d.ts
index c8e01a3..03923ec 100644
--- a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.d.ts
+++ b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.d.ts
@@ -1,88 +1,150 @@
 import * as flatbuffers from 'flatbuffers';
-import { OptionalByte } from '../optional-scalars/optional-byte';
+import {OptionalByte} from '../optional-scalars/optional-byte';
 export declare class ScalarStuff {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): ScalarStuff;
-    static getRootAsScalarStuff(bb: flatbuffers.ByteBuffer, obj?: ScalarStuff): ScalarStuff;
-    static getSizePrefixedRootAsScalarStuff(bb: flatbuffers.ByteBuffer, obj?: ScalarStuff): ScalarStuff;
-    static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
-    justI8(): number;
-    maybeI8(): number | null;
-    defaultI8(): number;
-    justU8(): number;
-    maybeU8(): number | null;
-    defaultU8(): number;
-    justI16(): number;
-    maybeI16(): number | null;
-    defaultI16(): number;
-    justU16(): number;
-    maybeU16(): number | null;
-    defaultU16(): number;
-    justI32(): number;
-    maybeI32(): number | null;
-    defaultI32(): number;
-    justU32(): number;
-    maybeU32(): number | null;
-    defaultU32(): number;
-    justI64(): bigint;
-    maybeI64(): bigint | null;
-    defaultI64(): bigint;
-    justU64(): bigint;
-    maybeU64(): bigint | null;
-    defaultU64(): bigint;
-    justF32(): number;
-    maybeF32(): number | null;
-    defaultF32(): number;
-    justF64(): number;
-    maybeF64(): number | null;
-    defaultF64(): number;
-    justBool(): boolean;
-    maybeBool(): boolean | null;
-    defaultBool(): boolean;
-    justEnum(): OptionalByte;
-    maybeEnum(): OptionalByte | null;
-    defaultEnum(): OptionalByte;
-    static getFullyQualifiedName(): string;
-    static startScalarStuff(builder: flatbuffers.Builder): void;
-    static addJustI8(builder: flatbuffers.Builder, justI8: number): void;
-    static addMaybeI8(builder: flatbuffers.Builder, maybeI8: number): void;
-    static addDefaultI8(builder: flatbuffers.Builder, defaultI8: number): void;
-    static addJustU8(builder: flatbuffers.Builder, justU8: number): void;
-    static addMaybeU8(builder: flatbuffers.Builder, maybeU8: number): void;
-    static addDefaultU8(builder: flatbuffers.Builder, defaultU8: number): void;
-    static addJustI16(builder: flatbuffers.Builder, justI16: number): void;
-    static addMaybeI16(builder: flatbuffers.Builder, maybeI16: number): void;
-    static addDefaultI16(builder: flatbuffers.Builder, defaultI16: number): void;
-    static addJustU16(builder: flatbuffers.Builder, justU16: number): void;
-    static addMaybeU16(builder: flatbuffers.Builder, maybeU16: number): void;
-    static addDefaultU16(builder: flatbuffers.Builder, defaultU16: number): void;
-    static addJustI32(builder: flatbuffers.Builder, justI32: number): void;
-    static addMaybeI32(builder: flatbuffers.Builder, maybeI32: number): void;
-    static addDefaultI32(builder: flatbuffers.Builder, defaultI32: number): void;
-    static addJustU32(builder: flatbuffers.Builder, justU32: number): void;
-    static addMaybeU32(builder: flatbuffers.Builder, maybeU32: number): void;
-    static addDefaultU32(builder: flatbuffers.Builder, defaultU32: number): void;
-    static addJustI64(builder: flatbuffers.Builder, justI64: bigint): void;
-    static addMaybeI64(builder: flatbuffers.Builder, maybeI64: bigint): void;
-    static addDefaultI64(builder: flatbuffers.Builder, defaultI64: bigint): void;
-    static addJustU64(builder: flatbuffers.Builder, justU64: bigint): void;
-    static addMaybeU64(builder: flatbuffers.Builder, maybeU64: bigint): void;
-    static addDefaultU64(builder: flatbuffers.Builder, defaultU64: bigint): void;
-    static addJustF32(builder: flatbuffers.Builder, justF32: number): void;
-    static addMaybeF32(builder: flatbuffers.Builder, maybeF32: number): void;
-    static addDefaultF32(builder: flatbuffers.Builder, defaultF32: number): void;
-    static addJustF64(builder: flatbuffers.Builder, justF64: number): void;
-    static addMaybeF64(builder: flatbuffers.Builder, maybeF64: number): void;
-    static addDefaultF64(builder: flatbuffers.Builder, defaultF64: number): void;
-    static addJustBool(builder: flatbuffers.Builder, justBool: boolean): void;
-    static addMaybeBool(builder: flatbuffers.Builder, maybeBool: boolean): void;
-    static addDefaultBool(builder: flatbuffers.Builder, defaultBool: boolean): void;
-    static addJustEnum(builder: flatbuffers.Builder, justEnum: OptionalByte): void;
-    static addMaybeEnum(builder: flatbuffers.Builder, maybeEnum: OptionalByte): void;
-    static addDefaultEnum(builder: flatbuffers.Builder, defaultEnum: OptionalByte): void;
-    static endScalarStuff(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishScalarStuffBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedScalarStuffBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static createScalarStuff(builder: flatbuffers.Builder, justI8: number, maybeI8: number | null, defaultI8: number, justU8: number, maybeU8: number | null, defaultU8: number, justI16: number, maybeI16: number | null, defaultI16: number, justU16: number, maybeU16: number | null, defaultU16: number, justI32: number, maybeI32: number | null, defaultI32: number, justU32: number, maybeU32: number | null, defaultU32: number, justI64: bigint, maybeI64: bigint | null, defaultI64: bigint, justU64: bigint, maybeU64: bigint | null, defaultU64: bigint, justF32: number, maybeF32: number | null, defaultF32: number, justF64: number, maybeF64: number | null, defaultF64: number, justBool: boolean, maybeBool: boolean | null, defaultBool: boolean, justEnum: OptionalByte, maybeEnum: OptionalByte | null, defaultEnum: OptionalByte): flatbuffers.Offset;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): ScalarStuff;
+  static getRootAsScalarStuff(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ScalarStuff,
+  ): ScalarStuff;
+  static getSizePrefixedRootAsScalarStuff(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ScalarStuff,
+  ): ScalarStuff;
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
+  justI8(): number;
+  maybeI8(): number | null;
+  defaultI8(): number;
+  justU8(): number;
+  maybeU8(): number | null;
+  defaultU8(): number;
+  justI16(): number;
+  maybeI16(): number | null;
+  defaultI16(): number;
+  justU16(): number;
+  maybeU16(): number | null;
+  defaultU16(): number;
+  justI32(): number;
+  maybeI32(): number | null;
+  defaultI32(): number;
+  justU32(): number;
+  maybeU32(): number | null;
+  defaultU32(): number;
+  justI64(): bigint;
+  maybeI64(): bigint | null;
+  defaultI64(): bigint;
+  justU64(): bigint;
+  maybeU64(): bigint | null;
+  defaultU64(): bigint;
+  justF32(): number;
+  maybeF32(): number | null;
+  defaultF32(): number;
+  justF64(): number;
+  maybeF64(): number | null;
+  defaultF64(): number;
+  justBool(): boolean;
+  maybeBool(): boolean | null;
+  defaultBool(): boolean;
+  justEnum(): OptionalByte;
+  maybeEnum(): OptionalByte | null;
+  defaultEnum(): OptionalByte;
+  static getFullyQualifiedName(): string;
+  static startScalarStuff(builder: flatbuffers.Builder): void;
+  static addJustI8(builder: flatbuffers.Builder, justI8: number): void;
+  static addMaybeI8(builder: flatbuffers.Builder, maybeI8: number): void;
+  static addDefaultI8(builder: flatbuffers.Builder, defaultI8: number): void;
+  static addJustU8(builder: flatbuffers.Builder, justU8: number): void;
+  static addMaybeU8(builder: flatbuffers.Builder, maybeU8: number): void;
+  static addDefaultU8(builder: flatbuffers.Builder, defaultU8: number): void;
+  static addJustI16(builder: flatbuffers.Builder, justI16: number): void;
+  static addMaybeI16(builder: flatbuffers.Builder, maybeI16: number): void;
+  static addDefaultI16(builder: flatbuffers.Builder, defaultI16: number): void;
+  static addJustU16(builder: flatbuffers.Builder, justU16: number): void;
+  static addMaybeU16(builder: flatbuffers.Builder, maybeU16: number): void;
+  static addDefaultU16(builder: flatbuffers.Builder, defaultU16: number): void;
+  static addJustI32(builder: flatbuffers.Builder, justI32: number): void;
+  static addMaybeI32(builder: flatbuffers.Builder, maybeI32: number): void;
+  static addDefaultI32(builder: flatbuffers.Builder, defaultI32: number): void;
+  static addJustU32(builder: flatbuffers.Builder, justU32: number): void;
+  static addMaybeU32(builder: flatbuffers.Builder, maybeU32: number): void;
+  static addDefaultU32(builder: flatbuffers.Builder, defaultU32: number): void;
+  static addJustI64(builder: flatbuffers.Builder, justI64: bigint): void;
+  static addMaybeI64(builder: flatbuffers.Builder, maybeI64: bigint): void;
+  static addDefaultI64(builder: flatbuffers.Builder, defaultI64: bigint): void;
+  static addJustU64(builder: flatbuffers.Builder, justU64: bigint): void;
+  static addMaybeU64(builder: flatbuffers.Builder, maybeU64: bigint): void;
+  static addDefaultU64(builder: flatbuffers.Builder, defaultU64: bigint): void;
+  static addJustF32(builder: flatbuffers.Builder, justF32: number): void;
+  static addMaybeF32(builder: flatbuffers.Builder, maybeF32: number): void;
+  static addDefaultF32(builder: flatbuffers.Builder, defaultF32: number): void;
+  static addJustF64(builder: flatbuffers.Builder, justF64: number): void;
+  static addMaybeF64(builder: flatbuffers.Builder, maybeF64: number): void;
+  static addDefaultF64(builder: flatbuffers.Builder, defaultF64: number): void;
+  static addJustBool(builder: flatbuffers.Builder, justBool: boolean): void;
+  static addMaybeBool(builder: flatbuffers.Builder, maybeBool: boolean): void;
+  static addDefaultBool(
+    builder: flatbuffers.Builder,
+    defaultBool: boolean,
+  ): void;
+  static addJustEnum(
+    builder: flatbuffers.Builder,
+    justEnum: OptionalByte,
+  ): void;
+  static addMaybeEnum(
+    builder: flatbuffers.Builder,
+    maybeEnum: OptionalByte,
+  ): void;
+  static addDefaultEnum(
+    builder: flatbuffers.Builder,
+    defaultEnum: OptionalByte,
+  ): void;
+  static endScalarStuff(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishScalarStuffBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedScalarStuffBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static createScalarStuff(
+    builder: flatbuffers.Builder,
+    justI8: number,
+    maybeI8: number | null,
+    defaultI8: number,
+    justU8: number,
+    maybeU8: number | null,
+    defaultU8: number,
+    justI16: number,
+    maybeI16: number | null,
+    defaultI16: number,
+    justU16: number,
+    maybeU16: number | null,
+    defaultU16: number,
+    justI32: number,
+    maybeI32: number | null,
+    defaultI32: number,
+    justU32: number,
+    maybeU32: number | null,
+    defaultU32: number,
+    justI64: bigint,
+    maybeI64: bigint | null,
+    defaultI64: bigint,
+    justU64: bigint,
+    maybeU64: bigint | null,
+    defaultU64: bigint,
+    justF32: number,
+    maybeF32: number | null,
+    defaultF32: number,
+    justF64: number,
+    maybeF64: number | null,
+    defaultF64: number,
+    justBool: boolean,
+    maybeBool: boolean | null,
+    defaultBool: boolean,
+    justEnum: OptionalByte,
+    maybeEnum: OptionalByte | null,
+    defaultEnum: OptionalByte,
+  ): flatbuffers.Offset;
 }
diff --git a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.js b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.js
index 5a175ec..ba16598 100644
--- a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.js
+++ b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.js
@@ -1,345 +1,344 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { OptionalByte } from '../optional-scalars/optional-byte';
+
+import {OptionalByte} from '../optional-scalars/optional-byte';
+
 export class ScalarStuff {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsScalarStuff(bb, obj) {
-        return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsScalarStuff(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static bufferHasIdentifier(bb) {
-        return bb.__has_identifier('NULL');
-    }
-    justI8() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : 0;
-    }
-    maybeI8() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : null;
-    }
-    defaultI8() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : 42;
-    }
-    justU8() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
-    }
-    maybeU8() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
-    }
-    defaultU8() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : 42;
-    }
-    justI16() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
-    }
-    maybeI16() {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : null;
-    }
-    defaultI16() {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        return offset ? this.bb.readInt16(this.bb_pos + offset) : 42;
-    }
-    justU16() {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
-    }
-    maybeU16() {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : null;
-    }
-    defaultU16() {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 42;
-    }
-    justI32() {
-        const offset = this.bb.__offset(this.bb_pos, 28);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    maybeI32() {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : null;
-    }
-    defaultI32() {
-        const offset = this.bb.__offset(this.bb_pos, 32);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 42;
-    }
-    justU32() {
-        const offset = this.bb.__offset(this.bb_pos, 34);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
-    }
-    maybeU32() {
-        const offset = this.bb.__offset(this.bb_pos, 36);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : null;
-    }
-    defaultU32() {
-        const offset = this.bb.__offset(this.bb_pos, 38);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 42;
-    }
-    justI64() {
-        const offset = this.bb.__offset(this.bb_pos, 40);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
-    }
-    maybeI64() {
-        const offset = this.bb.__offset(this.bb_pos, 42);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : null;
-    }
-    defaultI64() {
-        const offset = this.bb.__offset(this.bb_pos, 44);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('42');
-    }
-    justU64() {
-        const offset = this.bb.__offset(this.bb_pos, 46);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    maybeU64() {
-        const offset = this.bb.__offset(this.bb_pos, 48);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : null;
-    }
-    defaultU64() {
-        const offset = this.bb.__offset(this.bb_pos, 50);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('42');
-    }
-    justF32() {
-        const offset = this.bb.__offset(this.bb_pos, 52);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
-    }
-    maybeF32() {
-        const offset = this.bb.__offset(this.bb_pos, 54);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : null;
-    }
-    defaultF32() {
-        const offset = this.bb.__offset(this.bb_pos, 56);
-        return offset ? this.bb.readFloat32(this.bb_pos + offset) : 42.0;
-    }
-    justF64() {
-        const offset = this.bb.__offset(this.bb_pos, 58);
-        return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
-    }
-    maybeF64() {
-        const offset = this.bb.__offset(this.bb_pos, 60);
-        return offset ? this.bb.readFloat64(this.bb_pos + offset) : null;
-    }
-    defaultF64() {
-        const offset = this.bb.__offset(this.bb_pos, 62);
-        return offset ? this.bb.readFloat64(this.bb_pos + offset) : 42.0;
-    }
-    justBool() {
-        const offset = this.bb.__offset(this.bb_pos, 64);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    maybeBool() {
-        const offset = this.bb.__offset(this.bb_pos, 66);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : null;
-    }
-    defaultBool() {
-        const offset = this.bb.__offset(this.bb_pos, 68);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : true;
-    }
-    justEnum() {
-        const offset = this.bb.__offset(this.bb_pos, 70);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : OptionalByte.None;
-    }
-    maybeEnum() {
-        const offset = this.bb.__offset(this.bb_pos, 72);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : null;
-    }
-    defaultEnum() {
-        const offset = this.bb.__offset(this.bb_pos, 74);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : OptionalByte.One;
-    }
-    static getFullyQualifiedName() {
-        return 'optional_scalars.ScalarStuff';
-    }
-    static startScalarStuff(builder) {
-        builder.startObject(36);
-    }
-    static addJustI8(builder, justI8) {
-        builder.addFieldInt8(0, justI8, 0);
-    }
-    static addMaybeI8(builder, maybeI8) {
-        builder.addFieldInt8(1, maybeI8, null);
-    }
-    static addDefaultI8(builder, defaultI8) {
-        builder.addFieldInt8(2, defaultI8, 42);
-    }
-    static addJustU8(builder, justU8) {
-        builder.addFieldInt8(3, justU8, 0);
-    }
-    static addMaybeU8(builder, maybeU8) {
-        builder.addFieldInt8(4, maybeU8, null);
-    }
-    static addDefaultU8(builder, defaultU8) {
-        builder.addFieldInt8(5, defaultU8, 42);
-    }
-    static addJustI16(builder, justI16) {
-        builder.addFieldInt16(6, justI16, 0);
-    }
-    static addMaybeI16(builder, maybeI16) {
-        builder.addFieldInt16(7, maybeI16, null);
-    }
-    static addDefaultI16(builder, defaultI16) {
-        builder.addFieldInt16(8, defaultI16, 42);
-    }
-    static addJustU16(builder, justU16) {
-        builder.addFieldInt16(9, justU16, 0);
-    }
-    static addMaybeU16(builder, maybeU16) {
-        builder.addFieldInt16(10, maybeU16, null);
-    }
-    static addDefaultU16(builder, defaultU16) {
-        builder.addFieldInt16(11, defaultU16, 42);
-    }
-    static addJustI32(builder, justI32) {
-        builder.addFieldInt32(12, justI32, 0);
-    }
-    static addMaybeI32(builder, maybeI32) {
-        builder.addFieldInt32(13, maybeI32, null);
-    }
-    static addDefaultI32(builder, defaultI32) {
-        builder.addFieldInt32(14, defaultI32, 42);
-    }
-    static addJustU32(builder, justU32) {
-        builder.addFieldInt32(15, justU32, 0);
-    }
-    static addMaybeU32(builder, maybeU32) {
-        builder.addFieldInt32(16, maybeU32, null);
-    }
-    static addDefaultU32(builder, defaultU32) {
-        builder.addFieldInt32(17, defaultU32, 42);
-    }
-    static addJustI64(builder, justI64) {
-        builder.addFieldInt64(18, justI64, BigInt('0'));
-    }
-    static addMaybeI64(builder, maybeI64) {
-        builder.addFieldInt64(19, maybeI64, null);
-    }
-    static addDefaultI64(builder, defaultI64) {
-        builder.addFieldInt64(20, defaultI64, BigInt('42'));
-    }
-    static addJustU64(builder, justU64) {
-        builder.addFieldInt64(21, justU64, BigInt('0'));
-    }
-    static addMaybeU64(builder, maybeU64) {
-        builder.addFieldInt64(22, maybeU64, null);
-    }
-    static addDefaultU64(builder, defaultU64) {
-        builder.addFieldInt64(23, defaultU64, BigInt('42'));
-    }
-    static addJustF32(builder, justF32) {
-        builder.addFieldFloat32(24, justF32, 0.0);
-    }
-    static addMaybeF32(builder, maybeF32) {
-        builder.addFieldFloat32(25, maybeF32, null);
-    }
-    static addDefaultF32(builder, defaultF32) {
-        builder.addFieldFloat32(26, defaultF32, 42.0);
-    }
-    static addJustF64(builder, justF64) {
-        builder.addFieldFloat64(27, justF64, 0.0);
-    }
-    static addMaybeF64(builder, maybeF64) {
-        builder.addFieldFloat64(28, maybeF64, null);
-    }
-    static addDefaultF64(builder, defaultF64) {
-        builder.addFieldFloat64(29, defaultF64, 42.0);
-    }
-    static addJustBool(builder, justBool) {
-        builder.addFieldInt8(30, +justBool, +false);
-    }
-    static addMaybeBool(builder, maybeBool) {
-        builder.addFieldInt8(31, +maybeBool, null);
-    }
-    static addDefaultBool(builder, defaultBool) {
-        builder.addFieldInt8(32, +defaultBool, +true);
-    }
-    static addJustEnum(builder, justEnum) {
-        builder.addFieldInt8(33, justEnum, OptionalByte.None);
-    }
-    static addMaybeEnum(builder, maybeEnum) {
-        builder.addFieldInt8(34, maybeEnum, null);
-    }
-    static addDefaultEnum(builder, defaultEnum) {
-        builder.addFieldInt8(35, defaultEnum, OptionalByte.One);
-    }
-    static endScalarStuff(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static finishScalarStuffBuffer(builder, offset) {
-        builder.finish(offset, 'NULL');
-    }
-    static finishSizePrefixedScalarStuffBuffer(builder, offset) {
-        builder.finish(offset, 'NULL', true);
-    }
-    static createScalarStuff(builder, justI8, maybeI8, defaultI8, justU8, maybeU8, defaultU8, justI16, maybeI16, defaultI16, justU16, maybeU16, defaultU16, justI32, maybeI32, defaultI32, justU32, maybeU32, defaultU32, justI64, maybeI64, defaultI64, justU64, maybeU64, defaultU64, justF32, maybeF32, defaultF32, justF64, maybeF64, defaultF64, justBool, maybeBool, defaultBool, justEnum, maybeEnum, defaultEnum) {
-        ScalarStuff.startScalarStuff(builder);
-        ScalarStuff.addJustI8(builder, justI8);
-        if (maybeI8 !== null)
-            ScalarStuff.addMaybeI8(builder, maybeI8);
-        ScalarStuff.addDefaultI8(builder, defaultI8);
-        ScalarStuff.addJustU8(builder, justU8);
-        if (maybeU8 !== null)
-            ScalarStuff.addMaybeU8(builder, maybeU8);
-        ScalarStuff.addDefaultU8(builder, defaultU8);
-        ScalarStuff.addJustI16(builder, justI16);
-        if (maybeI16 !== null)
-            ScalarStuff.addMaybeI16(builder, maybeI16);
-        ScalarStuff.addDefaultI16(builder, defaultI16);
-        ScalarStuff.addJustU16(builder, justU16);
-        if (maybeU16 !== null)
-            ScalarStuff.addMaybeU16(builder, maybeU16);
-        ScalarStuff.addDefaultU16(builder, defaultU16);
-        ScalarStuff.addJustI32(builder, justI32);
-        if (maybeI32 !== null)
-            ScalarStuff.addMaybeI32(builder, maybeI32);
-        ScalarStuff.addDefaultI32(builder, defaultI32);
-        ScalarStuff.addJustU32(builder, justU32);
-        if (maybeU32 !== null)
-            ScalarStuff.addMaybeU32(builder, maybeU32);
-        ScalarStuff.addDefaultU32(builder, defaultU32);
-        ScalarStuff.addJustI64(builder, justI64);
-        if (maybeI64 !== null)
-            ScalarStuff.addMaybeI64(builder, maybeI64);
-        ScalarStuff.addDefaultI64(builder, defaultI64);
-        ScalarStuff.addJustU64(builder, justU64);
-        if (maybeU64 !== null)
-            ScalarStuff.addMaybeU64(builder, maybeU64);
-        ScalarStuff.addDefaultU64(builder, defaultU64);
-        ScalarStuff.addJustF32(builder, justF32);
-        if (maybeF32 !== null)
-            ScalarStuff.addMaybeF32(builder, maybeF32);
-        ScalarStuff.addDefaultF32(builder, defaultF32);
-        ScalarStuff.addJustF64(builder, justF64);
-        if (maybeF64 !== null)
-            ScalarStuff.addMaybeF64(builder, maybeF64);
-        ScalarStuff.addDefaultF64(builder, defaultF64);
-        ScalarStuff.addJustBool(builder, justBool);
-        if (maybeBool !== null)
-            ScalarStuff.addMaybeBool(builder, maybeBool);
-        ScalarStuff.addDefaultBool(builder, defaultBool);
-        ScalarStuff.addJustEnum(builder, justEnum);
-        if (maybeEnum !== null)
-            ScalarStuff.addMaybeEnum(builder, maybeEnum);
-        ScalarStuff.addDefaultEnum(builder, defaultEnum);
-        return ScalarStuff.endScalarStuff(builder);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsScalarStuff(bb, obj) {
+    return (obj || new ScalarStuff())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsScalarStuff(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new ScalarStuff())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static bufferHasIdentifier(bb) {
+    return bb.__has_identifier('NULL');
+  }
+  justI8() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : 0;
+  }
+  maybeI8() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : null;
+  }
+  defaultI8() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : 42;
+  }
+  justU8() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
+  }
+  maybeU8() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
+  }
+  defaultU8() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : 42;
+  }
+  justI16() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
+  }
+  maybeI16() {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : null;
+  }
+  defaultI16() {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    return offset ? this.bb.readInt16(this.bb_pos + offset) : 42;
+  }
+  justU16() {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  maybeU16() {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : null;
+  }
+  defaultU16() {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 42;
+  }
+  justI32() {
+    const offset = this.bb.__offset(this.bb_pos, 28);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  maybeI32() {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : null;
+  }
+  defaultI32() {
+    const offset = this.bb.__offset(this.bb_pos, 32);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 42;
+  }
+  justU32() {
+    const offset = this.bb.__offset(this.bb_pos, 34);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+  }
+  maybeU32() {
+    const offset = this.bb.__offset(this.bb_pos, 36);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : null;
+  }
+  defaultU32() {
+    const offset = this.bb.__offset(this.bb_pos, 38);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 42;
+  }
+  justI64() {
+    const offset = this.bb.__offset(this.bb_pos, 40);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  maybeI64() {
+    const offset = this.bb.__offset(this.bb_pos, 42);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : null;
+  }
+  defaultI64() {
+    const offset = this.bb.__offset(this.bb_pos, 44);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('42');
+  }
+  justU64() {
+    const offset = this.bb.__offset(this.bb_pos, 46);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  maybeU64() {
+    const offset = this.bb.__offset(this.bb_pos, 48);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : null;
+  }
+  defaultU64() {
+    const offset = this.bb.__offset(this.bb_pos, 50);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('42');
+  }
+  justF32() {
+    const offset = this.bb.__offset(this.bb_pos, 52);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
+  }
+  maybeF32() {
+    const offset = this.bb.__offset(this.bb_pos, 54);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : null;
+  }
+  defaultF32() {
+    const offset = this.bb.__offset(this.bb_pos, 56);
+    return offset ? this.bb.readFloat32(this.bb_pos + offset) : 42.0;
+  }
+  justF64() {
+    const offset = this.bb.__offset(this.bb_pos, 58);
+    return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
+  }
+  maybeF64() {
+    const offset = this.bb.__offset(this.bb_pos, 60);
+    return offset ? this.bb.readFloat64(this.bb_pos + offset) : null;
+  }
+  defaultF64() {
+    const offset = this.bb.__offset(this.bb_pos, 62);
+    return offset ? this.bb.readFloat64(this.bb_pos + offset) : 42.0;
+  }
+  justBool() {
+    const offset = this.bb.__offset(this.bb_pos, 64);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  maybeBool() {
+    const offset = this.bb.__offset(this.bb_pos, 66);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : null;
+  }
+  defaultBool() {
+    const offset = this.bb.__offset(this.bb_pos, 68);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : true;
+  }
+  justEnum() {
+    const offset = this.bb.__offset(this.bb_pos, 70);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : OptionalByte.None;
+  }
+  maybeEnum() {
+    const offset = this.bb.__offset(this.bb_pos, 72);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : null;
+  }
+  defaultEnum() {
+    const offset = this.bb.__offset(this.bb_pos, 74);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : OptionalByte.One;
+  }
+  static getFullyQualifiedName() {
+    return 'optional_scalars.ScalarStuff';
+  }
+  static startScalarStuff(builder) {
+    builder.startObject(36);
+  }
+  static addJustI8(builder, justI8) {
+    builder.addFieldInt8(0, justI8, 0);
+  }
+  static addMaybeI8(builder, maybeI8) {
+    builder.addFieldInt8(1, maybeI8, null);
+  }
+  static addDefaultI8(builder, defaultI8) {
+    builder.addFieldInt8(2, defaultI8, 42);
+  }
+  static addJustU8(builder, justU8) {
+    builder.addFieldInt8(3, justU8, 0);
+  }
+  static addMaybeU8(builder, maybeU8) {
+    builder.addFieldInt8(4, maybeU8, null);
+  }
+  static addDefaultU8(builder, defaultU8) {
+    builder.addFieldInt8(5, defaultU8, 42);
+  }
+  static addJustI16(builder, justI16) {
+    builder.addFieldInt16(6, justI16, 0);
+  }
+  static addMaybeI16(builder, maybeI16) {
+    builder.addFieldInt16(7, maybeI16, null);
+  }
+  static addDefaultI16(builder, defaultI16) {
+    builder.addFieldInt16(8, defaultI16, 42);
+  }
+  static addJustU16(builder, justU16) {
+    builder.addFieldInt16(9, justU16, 0);
+  }
+  static addMaybeU16(builder, maybeU16) {
+    builder.addFieldInt16(10, maybeU16, null);
+  }
+  static addDefaultU16(builder, defaultU16) {
+    builder.addFieldInt16(11, defaultU16, 42);
+  }
+  static addJustI32(builder, justI32) {
+    builder.addFieldInt32(12, justI32, 0);
+  }
+  static addMaybeI32(builder, maybeI32) {
+    builder.addFieldInt32(13, maybeI32, null);
+  }
+  static addDefaultI32(builder, defaultI32) {
+    builder.addFieldInt32(14, defaultI32, 42);
+  }
+  static addJustU32(builder, justU32) {
+    builder.addFieldInt32(15, justU32, 0);
+  }
+  static addMaybeU32(builder, maybeU32) {
+    builder.addFieldInt32(16, maybeU32, null);
+  }
+  static addDefaultU32(builder, defaultU32) {
+    builder.addFieldInt32(17, defaultU32, 42);
+  }
+  static addJustI64(builder, justI64) {
+    builder.addFieldInt64(18, justI64, BigInt('0'));
+  }
+  static addMaybeI64(builder, maybeI64) {
+    builder.addFieldInt64(19, maybeI64, null);
+  }
+  static addDefaultI64(builder, defaultI64) {
+    builder.addFieldInt64(20, defaultI64, BigInt('42'));
+  }
+  static addJustU64(builder, justU64) {
+    builder.addFieldInt64(21, justU64, BigInt('0'));
+  }
+  static addMaybeU64(builder, maybeU64) {
+    builder.addFieldInt64(22, maybeU64, null);
+  }
+  static addDefaultU64(builder, defaultU64) {
+    builder.addFieldInt64(23, defaultU64, BigInt('42'));
+  }
+  static addJustF32(builder, justF32) {
+    builder.addFieldFloat32(24, justF32, 0.0);
+  }
+  static addMaybeF32(builder, maybeF32) {
+    builder.addFieldFloat32(25, maybeF32, null);
+  }
+  static addDefaultF32(builder, defaultF32) {
+    builder.addFieldFloat32(26, defaultF32, 42.0);
+  }
+  static addJustF64(builder, justF64) {
+    builder.addFieldFloat64(27, justF64, 0.0);
+  }
+  static addMaybeF64(builder, maybeF64) {
+    builder.addFieldFloat64(28, maybeF64, null);
+  }
+  static addDefaultF64(builder, defaultF64) {
+    builder.addFieldFloat64(29, defaultF64, 42.0);
+  }
+  static addJustBool(builder, justBool) {
+    builder.addFieldInt8(30, +justBool, +false);
+  }
+  static addMaybeBool(builder, maybeBool) {
+    builder.addFieldInt8(31, +maybeBool, null);
+  }
+  static addDefaultBool(builder, defaultBool) {
+    builder.addFieldInt8(32, +defaultBool, +true);
+  }
+  static addJustEnum(builder, justEnum) {
+    builder.addFieldInt8(33, justEnum, OptionalByte.None);
+  }
+  static addMaybeEnum(builder, maybeEnum) {
+    builder.addFieldInt8(34, maybeEnum, null);
+  }
+  static addDefaultEnum(builder, defaultEnum) {
+    builder.addFieldInt8(35, defaultEnum, OptionalByte.One);
+  }
+  static endScalarStuff(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static finishScalarStuffBuffer(builder, offset) {
+    builder.finish(offset, 'NULL');
+  }
+  static finishSizePrefixedScalarStuffBuffer(builder, offset) {
+    builder.finish(offset, 'NULL', true);
+  }
+  static createScalarStuff(
+      builder, justI8, maybeI8, defaultI8, justU8, maybeU8, defaultU8, justI16,
+      maybeI16, defaultI16, justU16, maybeU16, defaultU16, justI32, maybeI32,
+      defaultI32, justU32, maybeU32, defaultU32, justI64, maybeI64, defaultI64,
+      justU64, maybeU64, defaultU64, justF32, maybeF32, defaultF32, justF64,
+      maybeF64, defaultF64, justBool, maybeBool, defaultBool, justEnum,
+      maybeEnum, defaultEnum) {
+    ScalarStuff.startScalarStuff(builder);
+    ScalarStuff.addJustI8(builder, justI8);
+    if (maybeI8 !== null) ScalarStuff.addMaybeI8(builder, maybeI8);
+    ScalarStuff.addDefaultI8(builder, defaultI8);
+    ScalarStuff.addJustU8(builder, justU8);
+    if (maybeU8 !== null) ScalarStuff.addMaybeU8(builder, maybeU8);
+    ScalarStuff.addDefaultU8(builder, defaultU8);
+    ScalarStuff.addJustI16(builder, justI16);
+    if (maybeI16 !== null) ScalarStuff.addMaybeI16(builder, maybeI16);
+    ScalarStuff.addDefaultI16(builder, defaultI16);
+    ScalarStuff.addJustU16(builder, justU16);
+    if (maybeU16 !== null) ScalarStuff.addMaybeU16(builder, maybeU16);
+    ScalarStuff.addDefaultU16(builder, defaultU16);
+    ScalarStuff.addJustI32(builder, justI32);
+    if (maybeI32 !== null) ScalarStuff.addMaybeI32(builder, maybeI32);
+    ScalarStuff.addDefaultI32(builder, defaultI32);
+    ScalarStuff.addJustU32(builder, justU32);
+    if (maybeU32 !== null) ScalarStuff.addMaybeU32(builder, maybeU32);
+    ScalarStuff.addDefaultU32(builder, defaultU32);
+    ScalarStuff.addJustI64(builder, justI64);
+    if (maybeI64 !== null) ScalarStuff.addMaybeI64(builder, maybeI64);
+    ScalarStuff.addDefaultI64(builder, defaultI64);
+    ScalarStuff.addJustU64(builder, justU64);
+    if (maybeU64 !== null) ScalarStuff.addMaybeU64(builder, maybeU64);
+    ScalarStuff.addDefaultU64(builder, defaultU64);
+    ScalarStuff.addJustF32(builder, justF32);
+    if (maybeF32 !== null) ScalarStuff.addMaybeF32(builder, maybeF32);
+    ScalarStuff.addDefaultF32(builder, defaultF32);
+    ScalarStuff.addJustF64(builder, justF64);
+    if (maybeF64 !== null) ScalarStuff.addMaybeF64(builder, maybeF64);
+    ScalarStuff.addDefaultF64(builder, defaultF64);
+    ScalarStuff.addJustBool(builder, justBool);
+    if (maybeBool !== null) ScalarStuff.addMaybeBool(builder, maybeBool);
+    ScalarStuff.addDefaultBool(builder, defaultBool);
+    ScalarStuff.addJustEnum(builder, justEnum);
+    if (maybeEnum !== null) ScalarStuff.addMaybeEnum(builder, maybeEnum);
+    ScalarStuff.addDefaultEnum(builder, defaultEnum);
+    return ScalarStuff.endScalarStuff(builder);
+  }
 }
diff --git a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.ts b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.ts
index 5416ab2..f843390 100644
--- a/tests/ts/no_import_ext/optional-scalars/scalar-stuff.ts
+++ b/tests/ts/no_import_ext/optional-scalars/scalar-stuff.ts
@@ -4,426 +4,472 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { OptionalByte } from '../optional-scalars/optional-byte';
-
+import {OptionalByte} from '../optional-scalars/optional-byte';
 
 export class ScalarStuff {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):ScalarStuff {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): ScalarStuff {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsScalarStuff(bb:flatbuffers.ByteBuffer, obj?:ScalarStuff):ScalarStuff {
-  return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsScalarStuff(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ScalarStuff,
+  ): ScalarStuff {
+    return (obj || new ScalarStuff()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsScalarStuff(bb:flatbuffers.ByteBuffer, obj?:ScalarStuff):ScalarStuff {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsScalarStuff(
+    bb: flatbuffers.ByteBuffer,
+    obj?: ScalarStuff,
+  ): ScalarStuff {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new ScalarStuff()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
-  return bb.__has_identifier('NULL');
-}
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean {
+    return bb.__has_identifier('NULL');
+  }
 
-justI8():number {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
-}
+  justI8(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
+  }
 
-maybeI8():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : null;
-}
+  maybeI8(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : null;
+  }
 
-defaultI8():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : 42;
-}
+  defaultI8(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : 42;
+  }
 
-justU8():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0;
-}
+  justU8(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0;
+  }
 
-maybeU8():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.readUint8(this.bb_pos + offset) : null;
-}
+  maybeU8(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.readUint8(this.bb_pos + offset) : null;
+  }
 
-defaultU8():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.readUint8(this.bb_pos + offset) : 42;
-}
+  defaultU8(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.readUint8(this.bb_pos + offset) : 42;
+  }
 
-justI16():number {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
-}
+  justI16(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
+  }
 
-maybeI16():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-  return offset ? this.bb!.readInt16(this.bb_pos + offset) : null;
-}
+  maybeI16(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+    return offset ? this.bb!.readInt16(this.bb_pos + offset) : null;
+  }
 
-defaultI16():number {
-  const offset = this.bb!.__offset(this.bb_pos, 20);
-  return offset ? this.bb!.readInt16(this.bb_pos + offset) : 42;
-}
+  defaultI16(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 20);
+    return offset ? this.bb!.readInt16(this.bb_pos + offset) : 42;
+  }
 
-justU16():number {
-  const offset = this.bb!.__offset(this.bb_pos, 22);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
-}
+  justU16(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 22);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
+  }
 
-maybeU16():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 24);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : null;
-}
+  maybeU16(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 24);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : null;
+  }
 
-defaultU16():number {
-  const offset = this.bb!.__offset(this.bb_pos, 26);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 42;
-}
+  defaultU16(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 26);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 42;
+  }
 
-justI32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 28);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
+  justI32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 28);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
+  }
 
-maybeI32():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 30);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : null;
-}
+  maybeI32(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 30);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : null;
+  }
 
-defaultI32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 32);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 42;
-}
+  defaultI32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 32);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 42;
+  }
 
-justU32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 34);
-  return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
-}
+  justU32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 34);
+    return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
+  }
 
-maybeU32():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 36);
-  return offset ? this.bb!.readUint32(this.bb_pos + offset) : null;
-}
+  maybeU32(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 36);
+    return offset ? this.bb!.readUint32(this.bb_pos + offset) : null;
+  }
 
-defaultU32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 38);
-  return offset ? this.bb!.readUint32(this.bb_pos + offset) : 42;
-}
+  defaultU32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 38);
+    return offset ? this.bb!.readUint32(this.bb_pos + offset) : 42;
+  }
 
-justI64():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 40);
-  return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
-}
+  justI64(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 40);
+    return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
 
-maybeI64():bigint|null {
-  const offset = this.bb!.__offset(this.bb_pos, 42);
-  return offset ? this.bb!.readInt64(this.bb_pos + offset) : null;
-}
+  maybeI64(): bigint | null {
+    const offset = this.bb!.__offset(this.bb_pos, 42);
+    return offset ? this.bb!.readInt64(this.bb_pos + offset) : null;
+  }
 
-defaultI64():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 44);
-  return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('42');
-}
+  defaultI64(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 44);
+    return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('42');
+  }
 
-justU64():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 46);
-  return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
-}
+  justU64(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 46);
+    return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
 
-maybeU64():bigint|null {
-  const offset = this.bb!.__offset(this.bb_pos, 48);
-  return offset ? this.bb!.readUint64(this.bb_pos + offset) : null;
-}
+  maybeU64(): bigint | null {
+    const offset = this.bb!.__offset(this.bb_pos, 48);
+    return offset ? this.bb!.readUint64(this.bb_pos + offset) : null;
+  }
 
-defaultU64():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 50);
-  return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('42');
-}
+  defaultU64(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 50);
+    return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('42');
+  }
 
-justF32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 52);
-  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
-}
+  justF32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 52);
+    return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
+  }
 
-maybeF32():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 54);
-  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null;
-}
+  maybeF32(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 54);
+    return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null;
+  }
 
-defaultF32():number {
-  const offset = this.bb!.__offset(this.bb_pos, 56);
-  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 42.0;
-}
+  defaultF32(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 56);
+    return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 42.0;
+  }
 
-justF64():number {
-  const offset = this.bb!.__offset(this.bb_pos, 58);
-  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
-}
+  justF64(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 58);
+    return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
+  }
 
-maybeF64():number|null {
-  const offset = this.bb!.__offset(this.bb_pos, 60);
-  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : null;
-}
+  maybeF64(): number | null {
+    const offset = this.bb!.__offset(this.bb_pos, 60);
+    return offset ? this.bb!.readFloat64(this.bb_pos + offset) : null;
+  }
 
-defaultF64():number {
-  const offset = this.bb!.__offset(this.bb_pos, 62);
-  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 42.0;
-}
+  defaultF64(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 62);
+    return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 42.0;
+  }
 
-justBool():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 64);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
+  justBool(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 64);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
-maybeBool():boolean|null {
-  const offset = this.bb!.__offset(this.bb_pos, 66);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null;
-}
+  maybeBool(): boolean | null {
+    const offset = this.bb!.__offset(this.bb_pos, 66);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null;
+  }
 
-defaultBool():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 68);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : true;
-}
+  defaultBool(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 68);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : true;
+  }
 
-justEnum():OptionalByte {
-  const offset = this.bb!.__offset(this.bb_pos, 70);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : OptionalByte.None;
-}
+  justEnum(): OptionalByte {
+    const offset = this.bb!.__offset(this.bb_pos, 70);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : OptionalByte.None;
+  }
 
-maybeEnum():OptionalByte|null {
-  const offset = this.bb!.__offset(this.bb_pos, 72);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : null;
-}
+  maybeEnum(): OptionalByte | null {
+    const offset = this.bb!.__offset(this.bb_pos, 72);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : null;
+  }
 
-defaultEnum():OptionalByte {
-  const offset = this.bb!.__offset(this.bb_pos, 74);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : OptionalByte.One;
-}
+  defaultEnum(): OptionalByte {
+    const offset = this.bb!.__offset(this.bb_pos, 74);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : OptionalByte.One;
+  }
 
-static getFullyQualifiedName():string {
-  return 'optional_scalars.ScalarStuff';
-}
+  static getFullyQualifiedName(): string {
+    return 'optional_scalars.ScalarStuff';
+  }
 
-static startScalarStuff(builder:flatbuffers.Builder) {
-  builder.startObject(36);
-}
+  static startScalarStuff(builder: flatbuffers.Builder) {
+    builder.startObject(36);
+  }
 
-static addJustI8(builder:flatbuffers.Builder, justI8:number) {
-  builder.addFieldInt8(0, justI8, 0);
-}
+  static addJustI8(builder: flatbuffers.Builder, justI8: number) {
+    builder.addFieldInt8(0, justI8, 0);
+  }
 
-static addMaybeI8(builder:flatbuffers.Builder, maybeI8:number) {
-  builder.addFieldInt8(1, maybeI8, null);
-}
+  static addMaybeI8(builder: flatbuffers.Builder, maybeI8: number) {
+    builder.addFieldInt8(1, maybeI8, null);
+  }
 
-static addDefaultI8(builder:flatbuffers.Builder, defaultI8:number) {
-  builder.addFieldInt8(2, defaultI8, 42);
-}
+  static addDefaultI8(builder: flatbuffers.Builder, defaultI8: number) {
+    builder.addFieldInt8(2, defaultI8, 42);
+  }
 
-static addJustU8(builder:flatbuffers.Builder, justU8:number) {
-  builder.addFieldInt8(3, justU8, 0);
-}
+  static addJustU8(builder: flatbuffers.Builder, justU8: number) {
+    builder.addFieldInt8(3, justU8, 0);
+  }
 
-static addMaybeU8(builder:flatbuffers.Builder, maybeU8:number) {
-  builder.addFieldInt8(4, maybeU8, null);
-}
+  static addMaybeU8(builder: flatbuffers.Builder, maybeU8: number) {
+    builder.addFieldInt8(4, maybeU8, null);
+  }
 
-static addDefaultU8(builder:flatbuffers.Builder, defaultU8:number) {
-  builder.addFieldInt8(5, defaultU8, 42);
-}
+  static addDefaultU8(builder: flatbuffers.Builder, defaultU8: number) {
+    builder.addFieldInt8(5, defaultU8, 42);
+  }
 
-static addJustI16(builder:flatbuffers.Builder, justI16:number) {
-  builder.addFieldInt16(6, justI16, 0);
-}
+  static addJustI16(builder: flatbuffers.Builder, justI16: number) {
+    builder.addFieldInt16(6, justI16, 0);
+  }
 
-static addMaybeI16(builder:flatbuffers.Builder, maybeI16:number) {
-  builder.addFieldInt16(7, maybeI16, null);
-}
+  static addMaybeI16(builder: flatbuffers.Builder, maybeI16: number) {
+    builder.addFieldInt16(7, maybeI16, null);
+  }
 
-static addDefaultI16(builder:flatbuffers.Builder, defaultI16:number) {
-  builder.addFieldInt16(8, defaultI16, 42);
-}
+  static addDefaultI16(builder: flatbuffers.Builder, defaultI16: number) {
+    builder.addFieldInt16(8, defaultI16, 42);
+  }
 
-static addJustU16(builder:flatbuffers.Builder, justU16:number) {
-  builder.addFieldInt16(9, justU16, 0);
-}
+  static addJustU16(builder: flatbuffers.Builder, justU16: number) {
+    builder.addFieldInt16(9, justU16, 0);
+  }
 
-static addMaybeU16(builder:flatbuffers.Builder, maybeU16:number) {
-  builder.addFieldInt16(10, maybeU16, null);
-}
+  static addMaybeU16(builder: flatbuffers.Builder, maybeU16: number) {
+    builder.addFieldInt16(10, maybeU16, null);
+  }
 
-static addDefaultU16(builder:flatbuffers.Builder, defaultU16:number) {
-  builder.addFieldInt16(11, defaultU16, 42);
-}
+  static addDefaultU16(builder: flatbuffers.Builder, defaultU16: number) {
+    builder.addFieldInt16(11, defaultU16, 42);
+  }
 
-static addJustI32(builder:flatbuffers.Builder, justI32:number) {
-  builder.addFieldInt32(12, justI32, 0);
-}
+  static addJustI32(builder: flatbuffers.Builder, justI32: number) {
+    builder.addFieldInt32(12, justI32, 0);
+  }
 
-static addMaybeI32(builder:flatbuffers.Builder, maybeI32:number) {
-  builder.addFieldInt32(13, maybeI32, null);
-}
+  static addMaybeI32(builder: flatbuffers.Builder, maybeI32: number) {
+    builder.addFieldInt32(13, maybeI32, null);
+  }
 
-static addDefaultI32(builder:flatbuffers.Builder, defaultI32:number) {
-  builder.addFieldInt32(14, defaultI32, 42);
-}
+  static addDefaultI32(builder: flatbuffers.Builder, defaultI32: number) {
+    builder.addFieldInt32(14, defaultI32, 42);
+  }
 
-static addJustU32(builder:flatbuffers.Builder, justU32:number) {
-  builder.addFieldInt32(15, justU32, 0);
-}
+  static addJustU32(builder: flatbuffers.Builder, justU32: number) {
+    builder.addFieldInt32(15, justU32, 0);
+  }
 
-static addMaybeU32(builder:flatbuffers.Builder, maybeU32:number) {
-  builder.addFieldInt32(16, maybeU32, null);
-}
+  static addMaybeU32(builder: flatbuffers.Builder, maybeU32: number) {
+    builder.addFieldInt32(16, maybeU32, null);
+  }
 
-static addDefaultU32(builder:flatbuffers.Builder, defaultU32:number) {
-  builder.addFieldInt32(17, defaultU32, 42);
-}
+  static addDefaultU32(builder: flatbuffers.Builder, defaultU32: number) {
+    builder.addFieldInt32(17, defaultU32, 42);
+  }
 
-static addJustI64(builder:flatbuffers.Builder, justI64:bigint) {
-  builder.addFieldInt64(18, justI64, BigInt('0'));
-}
+  static addJustI64(builder: flatbuffers.Builder, justI64: bigint) {
+    builder.addFieldInt64(18, justI64, BigInt('0'));
+  }
 
-static addMaybeI64(builder:flatbuffers.Builder, maybeI64:bigint) {
-  builder.addFieldInt64(19, maybeI64, null);
-}
+  static addMaybeI64(builder: flatbuffers.Builder, maybeI64: bigint) {
+    builder.addFieldInt64(19, maybeI64, null);
+  }
 
-static addDefaultI64(builder:flatbuffers.Builder, defaultI64:bigint) {
-  builder.addFieldInt64(20, defaultI64, BigInt('42'));
-}
+  static addDefaultI64(builder: flatbuffers.Builder, defaultI64: bigint) {
+    builder.addFieldInt64(20, defaultI64, BigInt('42'));
+  }
 
-static addJustU64(builder:flatbuffers.Builder, justU64:bigint) {
-  builder.addFieldInt64(21, justU64, BigInt('0'));
-}
+  static addJustU64(builder: flatbuffers.Builder, justU64: bigint) {
+    builder.addFieldInt64(21, justU64, BigInt('0'));
+  }
 
-static addMaybeU64(builder:flatbuffers.Builder, maybeU64:bigint) {
-  builder.addFieldInt64(22, maybeU64, null);
-}
+  static addMaybeU64(builder: flatbuffers.Builder, maybeU64: bigint) {
+    builder.addFieldInt64(22, maybeU64, null);
+  }
 
-static addDefaultU64(builder:flatbuffers.Builder, defaultU64:bigint) {
-  builder.addFieldInt64(23, defaultU64, BigInt('42'));
-}
+  static addDefaultU64(builder: flatbuffers.Builder, defaultU64: bigint) {
+    builder.addFieldInt64(23, defaultU64, BigInt('42'));
+  }
 
-static addJustF32(builder:flatbuffers.Builder, justF32:number) {
-  builder.addFieldFloat32(24, justF32, 0.0);
-}
+  static addJustF32(builder: flatbuffers.Builder, justF32: number) {
+    builder.addFieldFloat32(24, justF32, 0.0);
+  }
 
-static addMaybeF32(builder:flatbuffers.Builder, maybeF32:number) {
-  builder.addFieldFloat32(25, maybeF32, null);
-}
+  static addMaybeF32(builder: flatbuffers.Builder, maybeF32: number) {
+    builder.addFieldFloat32(25, maybeF32, null);
+  }
 
-static addDefaultF32(builder:flatbuffers.Builder, defaultF32:number) {
-  builder.addFieldFloat32(26, defaultF32, 42.0);
-}
+  static addDefaultF32(builder: flatbuffers.Builder, defaultF32: number) {
+    builder.addFieldFloat32(26, defaultF32, 42.0);
+  }
 
-static addJustF64(builder:flatbuffers.Builder, justF64:number) {
-  builder.addFieldFloat64(27, justF64, 0.0);
-}
+  static addJustF64(builder: flatbuffers.Builder, justF64: number) {
+    builder.addFieldFloat64(27, justF64, 0.0);
+  }
 
-static addMaybeF64(builder:flatbuffers.Builder, maybeF64:number) {
-  builder.addFieldFloat64(28, maybeF64, null);
-}
+  static addMaybeF64(builder: flatbuffers.Builder, maybeF64: number) {
+    builder.addFieldFloat64(28, maybeF64, null);
+  }
 
-static addDefaultF64(builder:flatbuffers.Builder, defaultF64:number) {
-  builder.addFieldFloat64(29, defaultF64, 42.0);
-}
+  static addDefaultF64(builder: flatbuffers.Builder, defaultF64: number) {
+    builder.addFieldFloat64(29, defaultF64, 42.0);
+  }
 
-static addJustBool(builder:flatbuffers.Builder, justBool:boolean) {
-  builder.addFieldInt8(30, +justBool, +false);
-}
+  static addJustBool(builder: flatbuffers.Builder, justBool: boolean) {
+    builder.addFieldInt8(30, +justBool, +false);
+  }
 
-static addMaybeBool(builder:flatbuffers.Builder, maybeBool:boolean) {
-  builder.addFieldInt8(31, +maybeBool, null);
-}
+  static addMaybeBool(builder: flatbuffers.Builder, maybeBool: boolean) {
+    builder.addFieldInt8(31, +maybeBool, null);
+  }
 
-static addDefaultBool(builder:flatbuffers.Builder, defaultBool:boolean) {
-  builder.addFieldInt8(32, +defaultBool, +true);
-}
+  static addDefaultBool(builder: flatbuffers.Builder, defaultBool: boolean) {
+    builder.addFieldInt8(32, +defaultBool, +true);
+  }
 
-static addJustEnum(builder:flatbuffers.Builder, justEnum:OptionalByte) {
-  builder.addFieldInt8(33, justEnum, OptionalByte.None);
-}
+  static addJustEnum(builder: flatbuffers.Builder, justEnum: OptionalByte) {
+    builder.addFieldInt8(33, justEnum, OptionalByte.None);
+  }
 
-static addMaybeEnum(builder:flatbuffers.Builder, maybeEnum:OptionalByte) {
-  builder.addFieldInt8(34, maybeEnum, null);
-}
+  static addMaybeEnum(builder: flatbuffers.Builder, maybeEnum: OptionalByte) {
+    builder.addFieldInt8(34, maybeEnum, null);
+  }
 
-static addDefaultEnum(builder:flatbuffers.Builder, defaultEnum:OptionalByte) {
-  builder.addFieldInt8(35, defaultEnum, OptionalByte.One);
-}
+  static addDefaultEnum(
+    builder: flatbuffers.Builder,
+    defaultEnum: OptionalByte,
+  ) {
+    builder.addFieldInt8(35, defaultEnum, OptionalByte.One);
+  }
 
-static endScalarStuff(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endScalarStuff(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static finishScalarStuffBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'NULL');
-}
+  static finishScalarStuffBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'NULL');
+  }
 
-static finishSizePrefixedScalarStuffBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'NULL', true);
-}
+  static finishSizePrefixedScalarStuffBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'NULL', true);
+  }
 
-static createScalarStuff(builder:flatbuffers.Builder, justI8:number, maybeI8:number|null, defaultI8:number, justU8:number, maybeU8:number|null, defaultU8:number, justI16:number, maybeI16:number|null, defaultI16:number, justU16:number, maybeU16:number|null, defaultU16:number, justI32:number, maybeI32:number|null, defaultI32:number, justU32:number, maybeU32:number|null, defaultU32:number, justI64:bigint, maybeI64:bigint|null, defaultI64:bigint, justU64:bigint, maybeU64:bigint|null, defaultU64:bigint, justF32:number, maybeF32:number|null, defaultF32:number, justF64:number, maybeF64:number|null, defaultF64:number, justBool:boolean, maybeBool:boolean|null, defaultBool:boolean, justEnum:OptionalByte, maybeEnum:OptionalByte|null, defaultEnum:OptionalByte):flatbuffers.Offset {
-  ScalarStuff.startScalarStuff(builder);
-  ScalarStuff.addJustI8(builder, justI8);
-  if (maybeI8 !== null)
-    ScalarStuff.addMaybeI8(builder, maybeI8);
-  ScalarStuff.addDefaultI8(builder, defaultI8);
-  ScalarStuff.addJustU8(builder, justU8);
-  if (maybeU8 !== null)
-    ScalarStuff.addMaybeU8(builder, maybeU8);
-  ScalarStuff.addDefaultU8(builder, defaultU8);
-  ScalarStuff.addJustI16(builder, justI16);
-  if (maybeI16 !== null)
-    ScalarStuff.addMaybeI16(builder, maybeI16);
-  ScalarStuff.addDefaultI16(builder, defaultI16);
-  ScalarStuff.addJustU16(builder, justU16);
-  if (maybeU16 !== null)
-    ScalarStuff.addMaybeU16(builder, maybeU16);
-  ScalarStuff.addDefaultU16(builder, defaultU16);
-  ScalarStuff.addJustI32(builder, justI32);
-  if (maybeI32 !== null)
-    ScalarStuff.addMaybeI32(builder, maybeI32);
-  ScalarStuff.addDefaultI32(builder, defaultI32);
-  ScalarStuff.addJustU32(builder, justU32);
-  if (maybeU32 !== null)
-    ScalarStuff.addMaybeU32(builder, maybeU32);
-  ScalarStuff.addDefaultU32(builder, defaultU32);
-  ScalarStuff.addJustI64(builder, justI64);
-  if (maybeI64 !== null)
-    ScalarStuff.addMaybeI64(builder, maybeI64);
-  ScalarStuff.addDefaultI64(builder, defaultI64);
-  ScalarStuff.addJustU64(builder, justU64);
-  if (maybeU64 !== null)
-    ScalarStuff.addMaybeU64(builder, maybeU64);
-  ScalarStuff.addDefaultU64(builder, defaultU64);
-  ScalarStuff.addJustF32(builder, justF32);
-  if (maybeF32 !== null)
-    ScalarStuff.addMaybeF32(builder, maybeF32);
-  ScalarStuff.addDefaultF32(builder, defaultF32);
-  ScalarStuff.addJustF64(builder, justF64);
-  if (maybeF64 !== null)
-    ScalarStuff.addMaybeF64(builder, maybeF64);
-  ScalarStuff.addDefaultF64(builder, defaultF64);
-  ScalarStuff.addJustBool(builder, justBool);
-  if (maybeBool !== null)
-    ScalarStuff.addMaybeBool(builder, maybeBool);
-  ScalarStuff.addDefaultBool(builder, defaultBool);
-  ScalarStuff.addJustEnum(builder, justEnum);
-  if (maybeEnum !== null)
-    ScalarStuff.addMaybeEnum(builder, maybeEnum);
-  ScalarStuff.addDefaultEnum(builder, defaultEnum);
-  return ScalarStuff.endScalarStuff(builder);
-}
+  static createScalarStuff(
+    builder: flatbuffers.Builder,
+    justI8: number,
+    maybeI8: number | null,
+    defaultI8: number,
+    justU8: number,
+    maybeU8: number | null,
+    defaultU8: number,
+    justI16: number,
+    maybeI16: number | null,
+    defaultI16: number,
+    justU16: number,
+    maybeU16: number | null,
+    defaultU16: number,
+    justI32: number,
+    maybeI32: number | null,
+    defaultI32: number,
+    justU32: number,
+    maybeU32: number | null,
+    defaultU32: number,
+    justI64: bigint,
+    maybeI64: bigint | null,
+    defaultI64: bigint,
+    justU64: bigint,
+    maybeU64: bigint | null,
+    defaultU64: bigint,
+    justF32: number,
+    maybeF32: number | null,
+    defaultF32: number,
+    justF64: number,
+    maybeF64: number | null,
+    defaultF64: number,
+    justBool: boolean,
+    maybeBool: boolean | null,
+    defaultBool: boolean,
+    justEnum: OptionalByte,
+    maybeEnum: OptionalByte | null,
+    defaultEnum: OptionalByte,
+  ): flatbuffers.Offset {
+    ScalarStuff.startScalarStuff(builder);
+    ScalarStuff.addJustI8(builder, justI8);
+    if (maybeI8 !== null) ScalarStuff.addMaybeI8(builder, maybeI8);
+    ScalarStuff.addDefaultI8(builder, defaultI8);
+    ScalarStuff.addJustU8(builder, justU8);
+    if (maybeU8 !== null) ScalarStuff.addMaybeU8(builder, maybeU8);
+    ScalarStuff.addDefaultU8(builder, defaultU8);
+    ScalarStuff.addJustI16(builder, justI16);
+    if (maybeI16 !== null) ScalarStuff.addMaybeI16(builder, maybeI16);
+    ScalarStuff.addDefaultI16(builder, defaultI16);
+    ScalarStuff.addJustU16(builder, justU16);
+    if (maybeU16 !== null) ScalarStuff.addMaybeU16(builder, maybeU16);
+    ScalarStuff.addDefaultU16(builder, defaultU16);
+    ScalarStuff.addJustI32(builder, justI32);
+    if (maybeI32 !== null) ScalarStuff.addMaybeI32(builder, maybeI32);
+    ScalarStuff.addDefaultI32(builder, defaultI32);
+    ScalarStuff.addJustU32(builder, justU32);
+    if (maybeU32 !== null) ScalarStuff.addMaybeU32(builder, maybeU32);
+    ScalarStuff.addDefaultU32(builder, defaultU32);
+    ScalarStuff.addJustI64(builder, justI64);
+    if (maybeI64 !== null) ScalarStuff.addMaybeI64(builder, maybeI64);
+    ScalarStuff.addDefaultI64(builder, defaultI64);
+    ScalarStuff.addJustU64(builder, justU64);
+    if (maybeU64 !== null) ScalarStuff.addMaybeU64(builder, maybeU64);
+    ScalarStuff.addDefaultU64(builder, defaultU64);
+    ScalarStuff.addJustF32(builder, justF32);
+    if (maybeF32 !== null) ScalarStuff.addMaybeF32(builder, maybeF32);
+    ScalarStuff.addDefaultF32(builder, defaultF32);
+    ScalarStuff.addJustF64(builder, justF64);
+    if (maybeF64 !== null) ScalarStuff.addMaybeF64(builder, maybeF64);
+    ScalarStuff.addDefaultF64(builder, defaultF64);
+    ScalarStuff.addJustBool(builder, justBool);
+    if (maybeBool !== null) ScalarStuff.addMaybeBool(builder, maybeBool);
+    ScalarStuff.addDefaultBool(builder, defaultBool);
+    ScalarStuff.addJustEnum(builder, justEnum);
+    if (maybeEnum !== null) ScalarStuff.addMaybeEnum(builder, maybeEnum);
+    ScalarStuff.addDefaultEnum(builder, defaultEnum);
+    return ScalarStuff.endScalarStuff(builder);
+  }
 }
diff --git a/tests/ts/no_import_ext/optional_scalars.js b/tests/ts/no_import_ext/optional_scalars.js
index d519b38..b4fa8e5 100644
--- a/tests/ts/no_import_ext/optional_scalars.js
+++ b/tests/ts/no_import_ext/optional_scalars.js
@@ -1,3 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 import * as optional_scalars_1 from './optional-scalars.js';
-export { optional_scalars_1 as optional_scalars };
+
+export {optional_scalars_1 as optional_scalars};
diff --git a/tests/ts/reflection.d.ts b/tests/ts/reflection.d.ts
index 5e1f876..371077e 100644
--- a/tests/ts/reflection.d.ts
+++ b/tests/ts/reflection.d.ts
@@ -1,12 +1,12 @@
-export { AdvancedFeatures } from './reflection/advanced-features.js';
-export { BaseType } from './reflection/base-type.js';
-export { Enum, EnumT } from './reflection/enum.js';
-export { EnumVal, EnumValT } from './reflection/enum-val.js';
-export { Field, FieldT } from './reflection/field.js';
-export { KeyValue, KeyValueT } from './reflection/key-value.js';
-export { Object_ } from './reflection/object.js';
-export { RPCCall, RPCCallT } from './reflection/rpccall.js';
-export { Schema, SchemaT } from './reflection/schema.js';
-export { SchemaFile, SchemaFileT } from './reflection/schema-file.js';
-export { Service, ServiceT } from './reflection/service.js';
-export { Type, TypeT } from './reflection/type.js';
+export {AdvancedFeatures} from './reflection/advanced-features.js';
+export {BaseType} from './reflection/base-type.js';
+export {EnumVal, EnumValT} from './reflection/enum-val.js';
+export {Enum, EnumT} from './reflection/enum.js';
+export {Field, FieldT} from './reflection/field.js';
+export {KeyValue, KeyValueT} from './reflection/key-value.js';
+export {Object_} from './reflection/object.js';
+export {RPCCall, RPCCallT} from './reflection/rpccall.js';
+export {SchemaFile, SchemaFileT} from './reflection/schema-file.js';
+export {Schema, SchemaT} from './reflection/schema.js';
+export {Service, ServiceT} from './reflection/service.js';
+export {Type, TypeT} from './reflection/type.js';
diff --git a/tests/ts/reflection.js b/tests/ts/reflection.js
index ac07056..4fb7196 100644
--- a/tests/ts/reflection.js
+++ b/tests/ts/reflection.js
@@ -1,14 +1,15 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { AdvancedFeatures } from './reflection/advanced-features.js';
-export { BaseType } from './reflection/base-type.js';
-export { Enum, EnumT } from './reflection/enum.js';
-export { EnumVal, EnumValT } from './reflection/enum-val.js';
-export { Field, FieldT } from './reflection/field.js';
-export { KeyValue, KeyValueT } from './reflection/key-value.js';
-export { Object_ } from './reflection/object.js';
-export { RPCCall, RPCCallT } from './reflection/rpccall.js';
-export { Schema, SchemaT } from './reflection/schema.js';
-export { SchemaFile, SchemaFileT } from './reflection/schema-file.js';
-export { Service, ServiceT } from './reflection/service.js';
-export { Type, TypeT } from './reflection/type.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {AdvancedFeatures} from './reflection/advanced-features.js';
+export {BaseType} from './reflection/base-type.js';
+export {EnumVal, EnumValT} from './reflection/enum-val.js';
+export {Enum, EnumT} from './reflection/enum.js';
+export {Field, FieldT} from './reflection/field.js';
+export {KeyValue, KeyValueT} from './reflection/key-value.js';
+export {Object_} from './reflection/object.js';
+export {RPCCall, RPCCallT} from './reflection/rpccall.js';
+export {SchemaFile, SchemaFileT} from './reflection/schema-file.js';
+export {Schema, SchemaT} from './reflection/schema.js';
+export {Service, ServiceT} from './reflection/service.js';
+export {Type, TypeT} from './reflection/type.js';
diff --git a/tests/ts/reflection.ts b/tests/ts/reflection.ts
index a43d07d..20d7fd3 100644
--- a/tests/ts/reflection.ts
+++ b/tests/ts/reflection.ts
@@ -2,15 +2,15 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { AdvancedFeatures } from './reflection/advanced-features.js';
-export { BaseType } from './reflection/base-type.js';
-export { Enum, EnumT } from './reflection/enum.js';
-export { EnumVal, EnumValT } from './reflection/enum-val.js';
-export { Field, FieldT } from './reflection/field.js';
-export { KeyValue, KeyValueT } from './reflection/key-value.js';
-export { Object_ } from './reflection/object.js';
-export { RPCCall, RPCCallT } from './reflection/rpccall.js';
-export { Schema, SchemaT } from './reflection/schema.js';
-export { SchemaFile, SchemaFileT } from './reflection/schema-file.js';
-export { Service, ServiceT } from './reflection/service.js';
-export { Type, TypeT } from './reflection/type.js';
+export {AdvancedFeatures} from './reflection/advanced-features.js';
+export {BaseType} from './reflection/base-type.js';
+export {EnumVal, EnumValT} from './reflection/enum-val.js';
+export {Enum, EnumT} from './reflection/enum.js';
+export {Field, FieldT} from './reflection/field.js';
+export {KeyValue, KeyValueT} from './reflection/key-value.js';
+export {Object_} from './reflection/object.js';
+export {RPCCall, RPCCallT} from './reflection/rpccall.js';
+export {SchemaFile, SchemaFileT} from './reflection/schema-file.js';
+export {Schema, SchemaT} from './reflection/schema.js';
+export {Service, ServiceT} from './reflection/service.js';
+export {Type, TypeT} from './reflection/type.js';
diff --git a/tests/ts/reflection/advanced-features.d.ts b/tests/ts/reflection/advanced-features.d.ts
index a51745e..cb4705b 100644
--- a/tests/ts/reflection/advanced-features.d.ts
+++ b/tests/ts/reflection/advanced-features.d.ts
@@ -2,8 +2,8 @@
  * New schema language features that are not supported by old code generators.
  */
 export declare enum AdvancedFeatures {
-    AdvancedArrayFeatures = "1",
-    AdvancedUnionFeatures = "2",
-    OptionalScalars = "4",
-    DefaultVectorsAndStrings = "8"
+  AdvancedArrayFeatures = '1',
+  AdvancedUnionFeatures = '2',
+  OptionalScalars = '4',
+  DefaultVectorsAndStrings = '8',
 }
diff --git a/tests/ts/reflection/advanced-features.js b/tests/ts/reflection/advanced-features.js
index aeef1a7..c7f8844 100644
--- a/tests/ts/reflection/advanced-features.js
+++ b/tests/ts/reflection/advanced-features.js
@@ -1,12 +1,13 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 /**
  * New schema language features that are not supported by old code generators.
  */
 export var AdvancedFeatures;
-(function (AdvancedFeatures) {
-    AdvancedFeatures["AdvancedArrayFeatures"] = "1";
-    AdvancedFeatures["AdvancedUnionFeatures"] = "2";
-    AdvancedFeatures["OptionalScalars"] = "4";
-    AdvancedFeatures["DefaultVectorsAndStrings"] = "8";
+(function(AdvancedFeatures) {
+AdvancedFeatures['AdvancedArrayFeatures'] = '1';
+AdvancedFeatures['AdvancedUnionFeatures'] = '2';
+AdvancedFeatures['OptionalScalars'] = '4';
+AdvancedFeatures['DefaultVectorsAndStrings'] = '8';
 })(AdvancedFeatures || (AdvancedFeatures = {}));
diff --git a/tests/ts/reflection/advanced-features.ts b/tests/ts/reflection/advanced-features.ts
index f68b7e2..60990f6 100644
--- a/tests/ts/reflection/advanced-features.ts
+++ b/tests/ts/reflection/advanced-features.ts
@@ -9,5 +9,5 @@
   AdvancedArrayFeatures = '1',
   AdvancedUnionFeatures = '2',
   OptionalScalars = '4',
-  DefaultVectorsAndStrings = '8'
+  DefaultVectorsAndStrings = '8',
 }
diff --git a/tests/ts/reflection/base-type.d.ts b/tests/ts/reflection/base-type.d.ts
index a4aea8b..9cce326 100644
--- a/tests/ts/reflection/base-type.d.ts
+++ b/tests/ts/reflection/base-type.d.ts
@@ -1,22 +1,22 @@
 export declare enum BaseType {
-    None = 0,
-    UType = 1,
-    Bool = 2,
-    Byte = 3,
-    UByte = 4,
-    Short = 5,
-    UShort = 6,
-    Int = 7,
-    UInt = 8,
-    Long = 9,
-    ULong = 10,
-    Float = 11,
-    Double = 12,
-    String = 13,
-    Vector = 14,
-    Obj = 15,
-    Union = 16,
-    Array = 17,
-    Vector64 = 18,
-    MaxBaseType = 19
+  None = 0,
+  UType = 1,
+  Bool = 2,
+  Byte = 3,
+  UByte = 4,
+  Short = 5,
+  UShort = 6,
+  Int = 7,
+  UInt = 8,
+  Long = 9,
+  ULong = 10,
+  Float = 11,
+  Double = 12,
+  String = 13,
+  Vector = 14,
+  Obj = 15,
+  Union = 16,
+  Array = 17,
+  Vector64 = 18,
+  MaxBaseType = 19,
 }
diff --git a/tests/ts/reflection/base-type.js b/tests/ts/reflection/base-type.js
index 957d9fd..c8a904b 100644
--- a/tests/ts/reflection/base-type.js
+++ b/tests/ts/reflection/base-type.js
@@ -1,25 +1,26 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var BaseType;
-(function (BaseType) {
-    BaseType[BaseType["None"] = 0] = "None";
-    BaseType[BaseType["UType"] = 1] = "UType";
-    BaseType[BaseType["Bool"] = 2] = "Bool";
-    BaseType[BaseType["Byte"] = 3] = "Byte";
-    BaseType[BaseType["UByte"] = 4] = "UByte";
-    BaseType[BaseType["Short"] = 5] = "Short";
-    BaseType[BaseType["UShort"] = 6] = "UShort";
-    BaseType[BaseType["Int"] = 7] = "Int";
-    BaseType[BaseType["UInt"] = 8] = "UInt";
-    BaseType[BaseType["Long"] = 9] = "Long";
-    BaseType[BaseType["ULong"] = 10] = "ULong";
-    BaseType[BaseType["Float"] = 11] = "Float";
-    BaseType[BaseType["Double"] = 12] = "Double";
-    BaseType[BaseType["String"] = 13] = "String";
-    BaseType[BaseType["Vector"] = 14] = "Vector";
-    BaseType[BaseType["Obj"] = 15] = "Obj";
-    BaseType[BaseType["Union"] = 16] = "Union";
-    BaseType[BaseType["Array"] = 17] = "Array";
-    BaseType[BaseType["Vector64"] = 18] = "Vector64";
-    BaseType[BaseType["MaxBaseType"] = 19] = "MaxBaseType";
+(function(BaseType) {
+BaseType[BaseType['None'] = 0] = 'None';
+BaseType[BaseType['UType'] = 1] = 'UType';
+BaseType[BaseType['Bool'] = 2] = 'Bool';
+BaseType[BaseType['Byte'] = 3] = 'Byte';
+BaseType[BaseType['UByte'] = 4] = 'UByte';
+BaseType[BaseType['Short'] = 5] = 'Short';
+BaseType[BaseType['UShort'] = 6] = 'UShort';
+BaseType[BaseType['Int'] = 7] = 'Int';
+BaseType[BaseType['UInt'] = 8] = 'UInt';
+BaseType[BaseType['Long'] = 9] = 'Long';
+BaseType[BaseType['ULong'] = 10] = 'ULong';
+BaseType[BaseType['Float'] = 11] = 'Float';
+BaseType[BaseType['Double'] = 12] = 'Double';
+BaseType[BaseType['String'] = 13] = 'String';
+BaseType[BaseType['Vector'] = 14] = 'Vector';
+BaseType[BaseType['Obj'] = 15] = 'Obj';
+BaseType[BaseType['Union'] = 16] = 'Union';
+BaseType[BaseType['Array'] = 17] = 'Array';
+BaseType[BaseType['Vector64'] = 18] = 'Vector64';
+BaseType[BaseType['MaxBaseType'] = 19] = 'MaxBaseType';
 })(BaseType || (BaseType = {}));
diff --git a/tests/ts/reflection/base-type.ts b/tests/ts/reflection/base-type.ts
index 38ef9fa..a5bec6f 100644
--- a/tests/ts/reflection/base-type.ts
+++ b/tests/ts/reflection/base-type.ts
@@ -22,5 +22,5 @@
   Union = 16,
   Array = 17,
   Vector64 = 18,
-  MaxBaseType = 19
+  MaxBaseType = 19,
 }
diff --git a/tests/ts/reflection/enum-val.d.ts b/tests/ts/reflection/enum-val.d.ts
index ba436ff..da471f3 100644
--- a/tests/ts/reflection/enum-val.d.ts
+++ b/tests/ts/reflection/enum-val.d.ts
@@ -1,43 +1,81 @@
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
-export declare class EnumVal implements flatbuffers.IUnpackableObject<EnumValT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): EnumVal;
-    static getRootAsEnumVal(bb: flatbuffers.ByteBuffer, obj?: EnumVal): EnumVal;
-    static getSizePrefixedRootAsEnumVal(bb: flatbuffers.ByteBuffer, obj?: EnumVal): EnumVal;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    value(): bigint;
-    mutate_value(value: bigint): boolean;
-    unionType(obj?: Type): Type | null;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    static getFullyQualifiedName(): string;
-    static startEnumVal(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addValue(builder: flatbuffers.Builder, value: bigint): void;
-    static addUnionType(builder: flatbuffers.Builder, unionTypeOffset: flatbuffers.Offset): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endEnumVal(builder: flatbuffers.Builder): flatbuffers.Offset;
-    unpack(): EnumValT;
-    unpackTo(_o: EnumValT): void;
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
+export declare class EnumVal
+  implements flatbuffers.IUnpackableObject<EnumValT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): EnumVal;
+  static getRootAsEnumVal(bb: flatbuffers.ByteBuffer, obj?: EnumVal): EnumVal;
+  static getSizePrefixedRootAsEnumVal(
+    bb: flatbuffers.ByteBuffer,
+    obj?: EnumVal,
+  ): EnumVal;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  value(): bigint;
+  mutate_value(value: bigint): boolean;
+  unionType(obj?: Type): Type | null;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  static getFullyQualifiedName(): string;
+  static startEnumVal(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addValue(builder: flatbuffers.Builder, value: bigint): void;
+  static addUnionType(
+    builder: flatbuffers.Builder,
+    unionTypeOffset: flatbuffers.Offset,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endEnumVal(builder: flatbuffers.Builder): flatbuffers.Offset;
+  unpack(): EnumValT;
+  unpackTo(_o: EnumValT): void;
 }
 export declare class EnumValT implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    value: bigint;
-    unionType: TypeT | null;
-    documentation: (string)[];
-    attributes: (KeyValueT)[];
-    constructor(name?: string | Uint8Array | null, value?: bigint, unionType?: TypeT | null, documentation?: (string)[], attributes?: (KeyValueT)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  value: bigint;
+  unionType: TypeT | null;
+  documentation: string[];
+  attributes: KeyValueT[];
+  constructor(
+    name?: string | Uint8Array | null,
+    value?: bigint,
+    unionType?: TypeT | null,
+    documentation?: string[],
+    attributes?: KeyValueT[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/enum-val.js b/tests/ts/reflection/enum-val.js
index c937455..6326367 100644
--- a/tests/ts/reflection/enum-val.js
+++ b/tests/ts/reflection/enum-val.js
@@ -1,137 +1,169 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue } from '../reflection/key-value.js';
-import { Type } from '../reflection/type.js';
+
+import {KeyValue} from '../reflection/key-value.js';
+import {Type} from '../reflection/type.js';
+
 export class EnumVal {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsEnumVal(bb, obj) {
+    return (obj || new EnumVal())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsEnumVal(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new EnumVal())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  value() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_value(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  unionType(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ?
+        (obj || new Type())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.EnumVal';
+  }
+  static startEnumVal(builder) {
+    builder.startObject(6);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addValue(builder, value) {
+    builder.addFieldInt64(1, value, BigInt('0'));
+  }
+  static addUnionType(builder, unionTypeOffset) {
+    builder.addFieldOffset(3, unionTypeOffset, 0);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(4, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsEnumVal(bb, obj) {
-        return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(5, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getSizePrefixedRootAsEnumVal(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    value() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_value(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
-    }
-    unionType(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? (obj || new Type()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.EnumVal';
-    }
-    static startEnumVal(builder) {
-        builder.startObject(6);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addValue(builder, value) {
-        builder.addFieldInt64(1, value, BigInt('0'));
-    }
-    static addUnionType(builder, unionTypeOffset) {
-        builder.addFieldOffset(3, unionTypeOffset, 0);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(4, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(5, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endEnumVal(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        return offset;
-    }
-    unpack() {
-        return new EnumValT(this.name(), this.value(), (this.unionType() !== null ? this.unionType().unpack() : null), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()));
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.value = this.value();
-        _o.unionType = (this.unionType() !== null ? this.unionType().unpack() : null);
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-    }
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endEnumVal(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // name
+    return offset;
+  }
+  unpack() {
+    return new EnumValT(
+        this.name(), this.value(),
+        (this.unionType() !== null ? this.unionType().unpack() : null),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()));
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.value = this.value();
+    _o.unionType =
+        (this.unionType() !== null ? this.unionType().unpack() : null);
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+  }
 }
 export class EnumValT {
-    constructor(name = null, value = BigInt('0'), unionType = null, documentation = [], attributes = []) {
-        this.name = name;
-        this.value = value;
-        this.unionType = unionType;
-        this.documentation = documentation;
-        this.attributes = attributes;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const unionType = (this.unionType !== null ? this.unionType.pack(builder) : 0);
-        const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        EnumVal.startEnumVal(builder);
-        EnumVal.addName(builder, name);
-        EnumVal.addValue(builder, this.value);
-        EnumVal.addUnionType(builder, unionType);
-        EnumVal.addDocumentation(builder, documentation);
-        EnumVal.addAttributes(builder, attributes);
-        return EnumVal.endEnumVal(builder);
-    }
+  constructor(
+      name = null, value = BigInt('0'), unionType = null, documentation = [],
+      attributes = []) {
+    this.name = name;
+    this.value = value;
+    this.unionType = unionType;
+    this.documentation = documentation;
+    this.attributes = attributes;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const unionType =
+        (this.unionType !== null ? this.unionType.pack(builder) : 0);
+    const documentation = EnumVal.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    const attributes = EnumVal.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    EnumVal.startEnumVal(builder);
+    EnumVal.addName(builder, name);
+    EnumVal.addValue(builder, this.value);
+    EnumVal.addUnionType(builder, unionType);
+    EnumVal.addDocumentation(builder, documentation);
+    EnumVal.addAttributes(builder, attributes);
+    return EnumVal.endEnumVal(builder);
+  }
 }
diff --git a/tests/ts/reflection/enum-val.ts b/tests/ts/reflection/enum-val.ts
index 49e4a21..092394a 100644
--- a/tests/ts/reflection/enum-val.ts
+++ b/tests/ts/reflection/enum-val.ts
@@ -4,180 +4,248 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
-
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
 
 export class EnumVal implements flatbuffers.IUnpackableObject<EnumValT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):EnumVal {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsEnumVal(bb:flatbuffers.ByteBuffer, obj?:EnumVal):EnumVal {
-  return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsEnumVal(bb:flatbuffers.ByteBuffer, obj?:EnumVal):EnumVal {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new EnumVal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-value():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
-}
-
-mutate_value(value:bigint):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): EnumVal {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt64(this.bb_pos + offset, value);
-  return true;
-}
-
-unionType(obj?:Type):Type|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.EnumVal';
-}
-
-static startEnumVal(builder:flatbuffers.Builder) {
-  builder.startObject(6);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addValue(builder:flatbuffers.Builder, value:bigint) {
-  builder.addFieldInt64(1, value, BigInt('0'));
-}
-
-static addUnionType(builder:flatbuffers.Builder, unionTypeOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, unionTypeOffset, 0);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(4, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsEnumVal(bb: flatbuffers.ByteBuffer, obj?: EnumVal): EnumVal {
+    return (obj || new EnumVal()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(5, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getSizePrefixedRootAsEnumVal(
+    bb: flatbuffers.ByteBuffer,
+    obj?: EnumVal,
+  ): EnumVal {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new EnumVal()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-static endEnumVal(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  return offset;
-}
+  value(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
 
+  mutate_value(value: bigint): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
 
-unpack(): EnumValT {
-  return new EnumValT(
-    this.name(),
-    this.value(),
-    (this.unionType() !== null ? this.unionType()!.unpack() : null),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength())
-  );
-}
+    if (offset === 0) {
+      return false;
+    }
 
+    this.bb!.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
 
-unpackTo(_o: EnumValT): void {
-  _o.name = this.name();
-  _o.value = this.value();
-  _o.unionType = (this.unionType() !== null ? this.unionType()!.unpack() : null);
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-}
+  unionType(obj?: Type): Type | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? (obj || new Type()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
+
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
+
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
+
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.EnumVal';
+  }
+
+  static startEnumVal(builder: flatbuffers.Builder) {
+    builder.startObject(6);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addValue(builder: flatbuffers.Builder, value: bigint) {
+    builder.addFieldInt64(1, value, BigInt('0'));
+  }
+
+  static addUnionType(
+    builder: flatbuffers.Builder,
+    unionTypeOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, unionTypeOffset, 0);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(4, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(5, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static endEnumVal(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    return offset;
+  }
+
+  unpack(): EnumValT {
+    return new EnumValT(
+      this.name(),
+      this.value(),
+      this.unionType() !== null ? this.unionType()!.unpack() : null,
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+    );
+  }
+
+  unpackTo(_o: EnumValT): void {
+    _o.name = this.name();
+    _o.value = this.value();
+    _o.unionType =
+      this.unionType() !== null ? this.unionType()!.unpack() : null;
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+  }
 }
 
 export class EnumValT implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public value: bigint = BigInt('0'),
-  public unionType: TypeT|null = null,
-  public documentation: (string)[] = [],
-  public attributes: (KeyValueT)[] = []
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public value: bigint = BigInt('0'),
+    public unionType: TypeT | null = null,
+    public documentation: string[] = [],
+    public attributes: KeyValueT[] = [],
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const unionType =
+      this.unionType !== null ? this.unionType!.pack(builder) : 0;
+    const documentation = EnumVal.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
+    const attributes = EnumVal.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const unionType = (this.unionType !== null ? this.unionType!.pack(builder) : 0);
-  const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-  const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
+    EnumVal.startEnumVal(builder);
+    EnumVal.addName(builder, name);
+    EnumVal.addValue(builder, this.value);
+    EnumVal.addUnionType(builder, unionType);
+    EnumVal.addDocumentation(builder, documentation);
+    EnumVal.addAttributes(builder, attributes);
 
-  EnumVal.startEnumVal(builder);
-  EnumVal.addName(builder, name);
-  EnumVal.addValue(builder, this.value);
-  EnumVal.addUnionType(builder, unionType);
-  EnumVal.addDocumentation(builder, documentation);
-  EnumVal.addAttributes(builder, attributes);
-
-  return EnumVal.endEnumVal(builder);
-}
+    return EnumVal.endEnumVal(builder);
+  }
 }
diff --git a/tests/ts/reflection/enum.d.ts b/tests/ts/reflection/enum.d.ts
index e4226bf..4d5aaa0 100644
--- a/tests/ts/reflection/enum.d.ts
+++ b/tests/ts/reflection/enum.d.ts
@@ -1,57 +1,109 @@
 import * as flatbuffers from 'flatbuffers';
-import { EnumVal, EnumValT } from '../reflection/enum-val.js';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
+import {EnumVal, EnumValT} from '../reflection/enum-val.js';
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
 export declare class Enum implements flatbuffers.IUnpackableObject<EnumT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Enum;
-    static getRootAsEnum(bb: flatbuffers.ByteBuffer, obj?: Enum): Enum;
-    static getSizePrefixedRootAsEnum(bb: flatbuffers.ByteBuffer, obj?: Enum): Enum;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    values(index: number, obj?: EnumVal): EnumVal | null;
-    valuesLength(): number;
-    isUnion(): boolean;
-    mutate_is_union(value: boolean): boolean;
-    underlyingType(obj?: Type): Type | null;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    /**
-     * File that this Enum is declared in.
-     */
-    declarationFile(): string | null;
-    declarationFile(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    static getFullyQualifiedName(): string;
-    static startEnum(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addValues(builder: flatbuffers.Builder, valuesOffset: flatbuffers.Offset): void;
-    static createValuesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startValuesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addIsUnion(builder: flatbuffers.Builder, isUnion: boolean): void;
-    static addUnderlyingType(builder: flatbuffers.Builder, underlyingTypeOffset: flatbuffers.Offset): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDeclarationFile(builder: flatbuffers.Builder, declarationFileOffset: flatbuffers.Offset): void;
-    static endEnum(builder: flatbuffers.Builder): flatbuffers.Offset;
-    unpack(): EnumT;
-    unpackTo(_o: EnumT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Enum;
+  static getRootAsEnum(bb: flatbuffers.ByteBuffer, obj?: Enum): Enum;
+  static getSizePrefixedRootAsEnum(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Enum,
+  ): Enum;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  values(index: number, obj?: EnumVal): EnumVal | null;
+  valuesLength(): number;
+  isUnion(): boolean;
+  mutate_is_union(value: boolean): boolean;
+  underlyingType(obj?: Type): Type | null;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  /**
+   * File that this Enum is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  static getFullyQualifiedName(): string;
+  static startEnum(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addValues(
+    builder: flatbuffers.Builder,
+    valuesOffset: flatbuffers.Offset,
+  ): void;
+  static createValuesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startValuesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addIsUnion(builder: flatbuffers.Builder, isUnion: boolean): void;
+  static addUnderlyingType(
+    builder: flatbuffers.Builder,
+    underlyingTypeOffset: flatbuffers.Offset,
+  ): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ): void;
+  static endEnum(builder: flatbuffers.Builder): flatbuffers.Offset;
+  unpack(): EnumT;
+  unpackTo(_o: EnumT): void;
 }
 export declare class EnumT implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    values: (EnumValT)[];
-    isUnion: boolean;
-    underlyingType: TypeT | null;
-    attributes: (KeyValueT)[];
-    documentation: (string)[];
-    declarationFile: string | Uint8Array | null;
-    constructor(name?: string | Uint8Array | null, values?: (EnumValT)[], isUnion?: boolean, underlyingType?: TypeT | null, attributes?: (KeyValueT)[], documentation?: (string)[], declarationFile?: string | Uint8Array | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  values: EnumValT[];
+  isUnion: boolean;
+  underlyingType: TypeT | null;
+  attributes: KeyValueT[];
+  documentation: string[];
+  declarationFile: string | Uint8Array | null;
+  constructor(
+    name?: string | Uint8Array | null,
+    values?: EnumValT[],
+    isUnion?: boolean,
+    underlyingType?: TypeT | null,
+    attributes?: KeyValueT[],
+    documentation?: string[],
+    declarationFile?: string | Uint8Array | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/enum.js b/tests/ts/reflection/enum.js
index e2cb646..87b2942 100644
--- a/tests/ts/reflection/enum.js
+++ b/tests/ts/reflection/enum.js
@@ -1,176 +1,225 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { EnumVal } from '../reflection/enum-val.js';
-import { KeyValue } from '../reflection/key-value.js';
-import { Type } from '../reflection/type.js';
+
+import {EnumVal} from '../reflection/enum-val.js';
+import {KeyValue} from '../reflection/key-value.js';
+import {Type} from '../reflection/type.js';
+
 export class Enum {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsEnum(bb, obj) {
+    return (obj || new Enum())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsEnum(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Enum())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  values(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new EnumVal())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  valuesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  isUnion() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_is_union(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  underlyingType(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ?
+        (obj || new Type())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  declarationFile(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Enum';
+  }
+  static startEnum(builder) {
+    builder.startObject(7);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addValues(builder, valuesOffset) {
+    builder.addFieldOffset(1, valuesOffset, 0);
+  }
+  static createValuesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsEnum(bb, obj) {
-        return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startValuesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addIsUnion(builder, isUnion) {
+    builder.addFieldInt8(2, +isUnion, +false);
+  }
+  static addUnderlyingType(builder, underlyingTypeOffset) {
+    builder.addFieldOffset(3, underlyingTypeOffset, 0);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(4, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getSizePrefixedRootAsEnum(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(5, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    values(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new EnumVal()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    valuesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    isUnion() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_is_union(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    underlyingType(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? (obj || new Type()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    declarationFile(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Enum';
-    }
-    static startEnum(builder) {
-        builder.startObject(7);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addValues(builder, valuesOffset) {
-        builder.addFieldOffset(1, valuesOffset, 0);
-    }
-    static createValuesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startValuesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addIsUnion(builder, isUnion) {
-        builder.addFieldInt8(2, +isUnion, +false);
-    }
-    static addUnderlyingType(builder, underlyingTypeOffset) {
-        builder.addFieldOffset(3, underlyingTypeOffset, 0);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(4, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(5, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDeclarationFile(builder, declarationFileOffset) {
-        builder.addFieldOffset(6, declarationFileOffset, 0);
-    }
-    static endEnum(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        builder.requiredField(offset, 6); // values
-        builder.requiredField(offset, 10); // underlying_type
-        return offset;
-    }
-    unpack() {
-        return new EnumT(this.name(), this.bb.createObjList(this.values.bind(this), this.valuesLength()), this.isUnion(), (this.underlyingType() !== null ? this.underlyingType().unpack() : null), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile());
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.values = this.bb.createObjList(this.values.bind(this), this.valuesLength());
-        _o.isUnion = this.isUnion();
-        _o.underlyingType = (this.underlyingType() !== null ? this.underlyingType().unpack() : null);
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-        _o.declarationFile = this.declarationFile();
-    }
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDeclarationFile(builder, declarationFileOffset) {
+    builder.addFieldOffset(6, declarationFileOffset, 0);
+  }
+  static endEnum(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);   // name
+    builder.requiredField(offset, 6);   // values
+    builder.requiredField(offset, 10);  // underlying_type
+    return offset;
+  }
+  unpack() {
+    return new EnumT(
+        this.name(),
+        this.bb.createObjList(this.values.bind(this), this.valuesLength()),
+        this.isUnion(),
+        (this.underlyingType() !== null ? this.underlyingType().unpack() :
+                                          null),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()),
+        this.declarationFile());
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.values =
+        this.bb.createObjList(this.values.bind(this), this.valuesLength());
+    _o.isUnion = this.isUnion();
+    _o.underlyingType =
+        (this.underlyingType() !== null ? this.underlyingType().unpack() :
+                                          null);
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+    _o.declarationFile = this.declarationFile();
+  }
 }
 export class EnumT {
-    constructor(name = null, values = [], isUnion = false, underlyingType = null, attributes = [], documentation = [], declarationFile = null) {
-        this.name = name;
-        this.values = values;
-        this.isUnion = isUnion;
-        this.underlyingType = underlyingType;
-        this.attributes = attributes;
-        this.documentation = documentation;
-        this.declarationFile = declarationFile;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const values = Enum.createValuesVector(builder, builder.createObjectOffsetList(this.values));
-        const underlyingType = (this.underlyingType !== null ? this.underlyingType.pack(builder) : 0);
-        const attributes = Enum.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        const documentation = Enum.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile) : 0);
-        Enum.startEnum(builder);
-        Enum.addName(builder, name);
-        Enum.addValues(builder, values);
-        Enum.addIsUnion(builder, this.isUnion);
-        Enum.addUnderlyingType(builder, underlyingType);
-        Enum.addAttributes(builder, attributes);
-        Enum.addDocumentation(builder, documentation);
-        Enum.addDeclarationFile(builder, declarationFile);
-        return Enum.endEnum(builder);
-    }
+  constructor(
+      name = null, values = [], isUnion = false, underlyingType = null,
+      attributes = [], documentation = [], declarationFile = null) {
+    this.name = name;
+    this.values = values;
+    this.isUnion = isUnion;
+    this.underlyingType = underlyingType;
+    this.attributes = attributes;
+    this.documentation = documentation;
+    this.declarationFile = declarationFile;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const values = Enum.createValuesVector(
+        builder, builder.createObjectOffsetList(this.values));
+    const underlyingType =
+        (this.underlyingType !== null ? this.underlyingType.pack(builder) : 0);
+    const attributes = Enum.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    const documentation = Enum.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    const declarationFile =
+        (this.declarationFile !== null ?
+             builder.createString(this.declarationFile) :
+             0);
+    Enum.startEnum(builder);
+    Enum.addName(builder, name);
+    Enum.addValues(builder, values);
+    Enum.addIsUnion(builder, this.isUnion);
+    Enum.addUnderlyingType(builder, underlyingType);
+    Enum.addAttributes(builder, attributes);
+    Enum.addDocumentation(builder, documentation);
+    Enum.addDeclarationFile(builder, declarationFile);
+    return Enum.endEnum(builder);
+  }
 }
diff --git a/tests/ts/reflection/enum.ts b/tests/ts/reflection/enum.ts
index 88336a7..f76f146 100644
--- a/tests/ts/reflection/enum.ts
+++ b/tests/ts/reflection/enum.ts
@@ -4,233 +4,333 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { EnumVal, EnumValT } from '../reflection/enum-val.js';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
-
+import {EnumVal, EnumValT} from '../reflection/enum-val.js';
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
 
 export class Enum implements flatbuffers.IUnpackableObject<EnumT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Enum {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsEnum(bb:flatbuffers.ByteBuffer, obj?:Enum):Enum {
-  return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsEnum(bb:flatbuffers.ByteBuffer, obj?:Enum):Enum {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Enum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-values(index: number, obj?:EnumVal):EnumVal|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new EnumVal()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-valuesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-isUnion():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_is_union(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Enum {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
-
-underlyingType(obj?:Type):Type|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-/**
- * File that this Enum is declared in.
- */
-declarationFile():string|null
-declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-declarationFile(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.Enum';
-}
-
-static startEnum(builder:flatbuffers.Builder) {
-  builder.startObject(7);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addValues(builder:flatbuffers.Builder, valuesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, valuesOffset, 0);
-}
-
-static createValuesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsEnum(bb: flatbuffers.ByteBuffer, obj?: Enum): Enum {
+    return (obj || new Enum()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startValuesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addIsUnion(builder:flatbuffers.Builder, isUnion:boolean) {
-  builder.addFieldInt8(2, +isUnion, +false);
-}
-
-static addUnderlyingType(builder:flatbuffers.Builder, underlyingTypeOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, underlyingTypeOffset, 0);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(4, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getSizePrefixedRootAsEnum(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Enum,
+  ): Enum {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Enum()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(5, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  values(index: number, obj?: EnumVal): EnumVal | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new EnumVal()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(6, declarationFileOffset, 0);
-}
+  valuesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
-static endEnum(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  builder.requiredField(offset, 6) // values
-  builder.requiredField(offset, 10) // underlying_type
-  return offset;
-}
+  isUnion(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
+  mutate_is_union(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
 
-unpack(): EnumT {
-  return new EnumT(
-    this.name(),
-    this.bb!.createObjList<EnumVal, EnumValT>(this.values.bind(this), this.valuesLength()),
-    this.isUnion(),
-    (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
-    this.declarationFile()
-  );
-}
+    if (offset === 0) {
+      return false;
+    }
 
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
 
-unpackTo(_o: EnumT): void {
-  _o.name = this.name();
-  _o.values = this.bb!.createObjList<EnumVal, EnumValT>(this.values.bind(this), this.valuesLength());
-  _o.isUnion = this.isUnion();
-  _o.underlyingType = (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null);
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-  _o.declarationFile = this.declarationFile();
-}
+  underlyingType(obj?: Type): Type | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? (obj || new Type()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
+
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
+
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
+
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  /**
+   * File that this Enum is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  declarationFile(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Enum';
+  }
+
+  static startEnum(builder: flatbuffers.Builder) {
+    builder.startObject(7);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addValues(
+    builder: flatbuffers.Builder,
+    valuesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, valuesOffset, 0);
+  }
+
+  static createValuesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startValuesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addIsUnion(builder: flatbuffers.Builder, isUnion: boolean) {
+    builder.addFieldInt8(2, +isUnion, +false);
+  }
+
+  static addUnderlyingType(
+    builder: flatbuffers.Builder,
+    underlyingTypeOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, underlyingTypeOffset, 0);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(4, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(5, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(6, declarationFileOffset, 0);
+  }
+
+  static endEnum(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    builder.requiredField(offset, 6); // values
+    builder.requiredField(offset, 10); // underlying_type
+    return offset;
+  }
+
+  unpack(): EnumT {
+    return new EnumT(
+      this.name(),
+      this.bb!.createObjList<EnumVal, EnumValT>(
+        this.values.bind(this),
+        this.valuesLength(),
+      ),
+      this.isUnion(),
+      this.underlyingType() !== null ? this.underlyingType()!.unpack() : null,
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+      this.declarationFile(),
+    );
+  }
+
+  unpackTo(_o: EnumT): void {
+    _o.name = this.name();
+    _o.values = this.bb!.createObjList<EnumVal, EnumValT>(
+      this.values.bind(this),
+      this.valuesLength(),
+    );
+    _o.isUnion = this.isUnion();
+    _o.underlyingType =
+      this.underlyingType() !== null ? this.underlyingType()!.unpack() : null;
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+    _o.declarationFile = this.declarationFile();
+  }
 }
 
 export class EnumT implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public values: (EnumValT)[] = [],
-  public isUnion: boolean = false,
-  public underlyingType: TypeT|null = null,
-  public attributes: (KeyValueT)[] = [],
-  public documentation: (string)[] = [],
-  public declarationFile: string|Uint8Array|null = null
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public values: EnumValT[] = [],
+    public isUnion: boolean = false,
+    public underlyingType: TypeT | null = null,
+    public attributes: KeyValueT[] = [],
+    public documentation: string[] = [],
+    public declarationFile: string | Uint8Array | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const values = Enum.createValuesVector(
+      builder,
+      builder.createObjectOffsetList(this.values),
+    );
+    const underlyingType =
+      this.underlyingType !== null ? this.underlyingType!.pack(builder) : 0;
+    const attributes = Enum.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
+    const documentation = Enum.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
+    const declarationFile =
+      this.declarationFile !== null
+        ? builder.createString(this.declarationFile!)
+        : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const values = Enum.createValuesVector(builder, builder.createObjectOffsetList(this.values));
-  const underlyingType = (this.underlyingType !== null ? this.underlyingType!.pack(builder) : 0);
-  const attributes = Enum.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-  const documentation = Enum.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-  const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
+    Enum.startEnum(builder);
+    Enum.addName(builder, name);
+    Enum.addValues(builder, values);
+    Enum.addIsUnion(builder, this.isUnion);
+    Enum.addUnderlyingType(builder, underlyingType);
+    Enum.addAttributes(builder, attributes);
+    Enum.addDocumentation(builder, documentation);
+    Enum.addDeclarationFile(builder, declarationFile);
 
-  Enum.startEnum(builder);
-  Enum.addName(builder, name);
-  Enum.addValues(builder, values);
-  Enum.addIsUnion(builder, this.isUnion);
-  Enum.addUnderlyingType(builder, underlyingType);
-  Enum.addAttributes(builder, attributes);
-  Enum.addDocumentation(builder, documentation);
-  Enum.addDeclarationFile(builder, declarationFile);
-
-  return Enum.endEnum(builder);
-}
+    return Enum.endEnum(builder);
+  }
 }
diff --git a/tests/ts/reflection/field.d.ts b/tests/ts/reflection/field.d.ts
index e4f4bf5..a7d5077 100644
--- a/tests/ts/reflection/field.d.ts
+++ b/tests/ts/reflection/field.d.ts
@@ -1,85 +1,136 @@
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
 export declare class Field implements flatbuffers.IUnpackableObject<FieldT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Field;
-    static getRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
-    static getSizePrefixedRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    type(obj?: Type): Type | null;
-    id(): number;
-    mutate_id(value: number): boolean;
-    offset(): number;
-    mutate_offset(value: number): boolean;
-    defaultInteger(): bigint;
-    mutate_default_integer(value: bigint): boolean;
-    defaultReal(): number;
-    mutate_default_real(value: number): boolean;
-    deprecated(): boolean;
-    mutate_deprecated(value: boolean): boolean;
-    required(): boolean;
-    mutate_required(value: boolean): boolean;
-    key(): boolean;
-    mutate_key(value: boolean): boolean;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    optional(): boolean;
-    mutate_optional(value: boolean): boolean;
-    /**
-     * Number of padding octets to always add after this field. Structs only.
-     */
-    padding(): number;
-    mutate_padding(value: number): boolean;
-    /**
-     * If the field uses 64-bit offsets.
-     */
-    offset64(): boolean;
-    mutate_offset64(value: boolean): boolean;
-    static getFullyQualifiedName(): string;
-    static startField(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addType(builder: flatbuffers.Builder, typeOffset: flatbuffers.Offset): void;
-    static addId(builder: flatbuffers.Builder, id: number): void;
-    static addOffset(builder: flatbuffers.Builder, offset: number): void;
-    static addDefaultInteger(builder: flatbuffers.Builder, defaultInteger: bigint): void;
-    static addDefaultReal(builder: flatbuffers.Builder, defaultReal: number): void;
-    static addDeprecated(builder: flatbuffers.Builder, deprecated: boolean): void;
-    static addRequired(builder: flatbuffers.Builder, required: boolean): void;
-    static addKey(builder: flatbuffers.Builder, key: boolean): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addOptional(builder: flatbuffers.Builder, optional: boolean): void;
-    static addPadding(builder: flatbuffers.Builder, padding: number): void;
-    static addOffset64(builder: flatbuffers.Builder, offset64: boolean): void;
-    static endField(builder: flatbuffers.Builder): flatbuffers.Offset;
-    unpack(): FieldT;
-    unpackTo(_o: FieldT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Field;
+  static getRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
+  static getSizePrefixedRootAsField(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Field,
+  ): Field;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  type(obj?: Type): Type | null;
+  id(): number;
+  mutate_id(value: number): boolean;
+  offset(): number;
+  mutate_offset(value: number): boolean;
+  defaultInteger(): bigint;
+  mutate_default_integer(value: bigint): boolean;
+  defaultReal(): number;
+  mutate_default_real(value: number): boolean;
+  deprecated(): boolean;
+  mutate_deprecated(value: boolean): boolean;
+  required(): boolean;
+  mutate_required(value: boolean): boolean;
+  key(): boolean;
+  mutate_key(value: boolean): boolean;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  optional(): boolean;
+  mutate_optional(value: boolean): boolean;
+  /**
+   * Number of padding octets to always add after this field. Structs only.
+   */
+  padding(): number;
+  mutate_padding(value: number): boolean;
+  /**
+   * If the field uses 64-bit offsets.
+   */
+  offset64(): boolean;
+  mutate_offset64(value: boolean): boolean;
+  static getFullyQualifiedName(): string;
+  static startField(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addType(
+    builder: flatbuffers.Builder,
+    typeOffset: flatbuffers.Offset,
+  ): void;
+  static addId(builder: flatbuffers.Builder, id: number): void;
+  static addOffset(builder: flatbuffers.Builder, offset: number): void;
+  static addDefaultInteger(
+    builder: flatbuffers.Builder,
+    defaultInteger: bigint,
+  ): void;
+  static addDefaultReal(
+    builder: flatbuffers.Builder,
+    defaultReal: number,
+  ): void;
+  static addDeprecated(builder: flatbuffers.Builder, deprecated: boolean): void;
+  static addRequired(builder: flatbuffers.Builder, required: boolean): void;
+  static addKey(builder: flatbuffers.Builder, key: boolean): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addOptional(builder: flatbuffers.Builder, optional: boolean): void;
+  static addPadding(builder: flatbuffers.Builder, padding: number): void;
+  static addOffset64(builder: flatbuffers.Builder, offset64: boolean): void;
+  static endField(builder: flatbuffers.Builder): flatbuffers.Offset;
+  unpack(): FieldT;
+  unpackTo(_o: FieldT): void;
 }
 export declare class FieldT implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    type: TypeT | null;
-    id: number;
-    offset: number;
-    defaultInteger: bigint;
-    defaultReal: number;
-    deprecated: boolean;
-    required: boolean;
-    key: boolean;
-    attributes: (KeyValueT)[];
-    documentation: (string)[];
-    optional: boolean;
-    padding: number;
-    offset64: boolean;
-    constructor(name?: string | Uint8Array | null, type?: TypeT | null, id?: number, offset?: number, defaultInteger?: bigint, defaultReal?: number, deprecated?: boolean, required?: boolean, key?: boolean, attributes?: (KeyValueT)[], documentation?: (string)[], optional?: boolean, padding?: number, offset64?: boolean);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  type: TypeT | null;
+  id: number;
+  offset: number;
+  defaultInteger: bigint;
+  defaultReal: number;
+  deprecated: boolean;
+  required: boolean;
+  key: boolean;
+  attributes: KeyValueT[];
+  documentation: string[];
+  optional: boolean;
+  padding: number;
+  offset64: boolean;
+  constructor(
+    name?: string | Uint8Array | null,
+    type?: TypeT | null,
+    id?: number,
+    offset?: number,
+    defaultInteger?: bigint,
+    defaultReal?: number,
+    deprecated?: boolean,
+    required?: boolean,
+    key?: boolean,
+    attributes?: KeyValueT[],
+    documentation?: string[],
+    optional?: boolean,
+    padding?: number,
+    offset64?: boolean,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/field.js b/tests/ts/reflection/field.js
index a8a8fd3..0dceec4 100644
--- a/tests/ts/reflection/field.js
+++ b/tests/ts/reflection/field.js
@@ -1,306 +1,340 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue } from '../reflection/key-value.js';
-import { Type } from '../reflection/type.js';
+
+import {KeyValue} from '../reflection/key-value.js';
+import {Type} from '../reflection/type.js';
+
 export class Field {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsField(bb, obj) {
+    return (obj || new Field())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsField(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Field())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  type(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new Type())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  id() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_id(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  offset() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_offset(value) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsField(bb, obj) {
-        return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  defaultInteger() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_default_integer(value) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsField(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt64(this.bb_pos + offset, value);
+    return true;
+  }
+  defaultReal() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
+  }
+  mutate_default_real(value) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    if (offset === 0) {
+      return false;
     }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
+    this.bb.writeFloat64(this.bb_pos + offset, value);
+    return true;
+  }
+  deprecated() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_deprecated(value) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    if (offset === 0) {
+      return false;
     }
-    type(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new Type()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  required() {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_required(value) {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    if (offset === 0) {
+      return false;
     }
-    id() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  key() {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_key(value) {
+    const offset = this.bb.__offset(this.bb_pos, 20);
+    if (offset === 0) {
+      return false;
     }
-    mutate_id(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 22);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 24);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  optional() {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_optional(value) {
+    const offset = this.bb.__offset(this.bb_pos, 26);
+    if (offset === 0) {
+      return false;
     }
-    offset() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  /**
+   * Number of padding octets to always add after this field. Structs only.
+   */
+  padding() {
+    const offset = this.bb.__offset(this.bb_pos, 28);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_padding(value) {
+    const offset = this.bb.__offset(this.bb_pos, 28);
+    if (offset === 0) {
+      return false;
     }
-    mutate_offset(value) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  /**
+   * If the field uses 64-bit offsets.
+   */
+  offset64() {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_offset64(value) {
+    const offset = this.bb.__offset(this.bb_pos, 30);
+    if (offset === 0) {
+      return false;
     }
-    defaultInteger() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Field';
+  }
+  static startField(builder) {
+    builder.startObject(14);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addType(builder, typeOffset) {
+    builder.addFieldOffset(1, typeOffset, 0);
+  }
+  static addId(builder, id) {
+    builder.addFieldInt16(2, id, 0);
+  }
+  static addOffset(builder, offset) {
+    builder.addFieldInt16(3, offset, 0);
+  }
+  static addDefaultInteger(builder, defaultInteger) {
+    builder.addFieldInt64(4, defaultInteger, BigInt('0'));
+  }
+  static addDefaultReal(builder, defaultReal) {
+    builder.addFieldFloat64(5, defaultReal, 0.0);
+  }
+  static addDeprecated(builder, deprecated) {
+    builder.addFieldInt8(6, +deprecated, +false);
+  }
+  static addRequired(builder, required) {
+    builder.addFieldInt8(7, +required, +false);
+  }
+  static addKey(builder, key) {
+    builder.addFieldInt8(8, +key, +false);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(9, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    mutate_default_integer(value) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt64(this.bb_pos + offset, value);
-        return true;
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(10, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    defaultReal() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
-    }
-    mutate_default_real(value) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeFloat64(this.bb_pos + offset, value);
-        return true;
-    }
-    deprecated() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_deprecated(value) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    required() {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_required(value) {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    key() {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_key(value) {
-        const offset = this.bb.__offset(this.bb_pos, 20);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 22);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 24);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    optional() {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_optional(value) {
-        const offset = this.bb.__offset(this.bb_pos, 26);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    /**
-     * Number of padding octets to always add after this field. Structs only.
-     */
-    padding() {
-        const offset = this.bb.__offset(this.bb_pos, 28);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
-    }
-    mutate_padding(value) {
-        const offset = this.bb.__offset(this.bb_pos, 28);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
-    }
-    /**
-     * If the field uses 64-bit offsets.
-     */
-    offset64() {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_offset64(value) {
-        const offset = this.bb.__offset(this.bb_pos, 30);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Field';
-    }
-    static startField(builder) {
-        builder.startObject(14);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addType(builder, typeOffset) {
-        builder.addFieldOffset(1, typeOffset, 0);
-    }
-    static addId(builder, id) {
-        builder.addFieldInt16(2, id, 0);
-    }
-    static addOffset(builder, offset) {
-        builder.addFieldInt16(3, offset, 0);
-    }
-    static addDefaultInteger(builder, defaultInteger) {
-        builder.addFieldInt64(4, defaultInteger, BigInt('0'));
-    }
-    static addDefaultReal(builder, defaultReal) {
-        builder.addFieldFloat64(5, defaultReal, 0.0);
-    }
-    static addDeprecated(builder, deprecated) {
-        builder.addFieldInt8(6, +deprecated, +false);
-    }
-    static addRequired(builder, required) {
-        builder.addFieldInt8(7, +required, +false);
-    }
-    static addKey(builder, key) {
-        builder.addFieldInt8(8, +key, +false);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(9, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(10, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addOptional(builder, optional) {
-        builder.addFieldInt8(11, +optional, +false);
-    }
-    static addPadding(builder, padding) {
-        builder.addFieldInt16(12, padding, 0);
-    }
-    static addOffset64(builder, offset64) {
-        builder.addFieldInt8(13, +offset64, +false);
-    }
-    static endField(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        builder.requiredField(offset, 6); // type
-        return offset;
-    }
-    unpack() {
-        return new FieldT(this.name(), (this.type() !== null ? this.type().unpack() : null), this.id(), this.offset(), this.defaultInteger(), this.defaultReal(), this.deprecated(), this.required(), this.key(), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.optional(), this.padding(), this.offset64());
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.type = (this.type() !== null ? this.type().unpack() : null);
-        _o.id = this.id();
-        _o.offset = this.offset();
-        _o.defaultInteger = this.defaultInteger();
-        _o.defaultReal = this.defaultReal();
-        _o.deprecated = this.deprecated();
-        _o.required = this.required();
-        _o.key = this.key();
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-        _o.optional = this.optional();
-        _o.padding = this.padding();
-        _o.offset64 = this.offset64();
-    }
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addOptional(builder, optional) {
+    builder.addFieldInt8(11, +optional, +false);
+  }
+  static addPadding(builder, padding) {
+    builder.addFieldInt16(12, padding, 0);
+  }
+  static addOffset64(builder, offset64) {
+    builder.addFieldInt8(13, +offset64, +false);
+  }
+  static endField(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // name
+    builder.requiredField(offset, 6);  // type
+    return offset;
+  }
+  unpack() {
+    return new FieldT(
+        this.name(), (this.type() !== null ? this.type().unpack() : null),
+        this.id(), this.offset(), this.defaultInteger(), this.defaultReal(),
+        this.deprecated(), this.required(), this.key(),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()),
+        this.optional(), this.padding(), this.offset64());
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.type = (this.type() !== null ? this.type().unpack() : null);
+    _o.id = this.id();
+    _o.offset = this.offset();
+    _o.defaultInteger = this.defaultInteger();
+    _o.defaultReal = this.defaultReal();
+    _o.deprecated = this.deprecated();
+    _o.required = this.required();
+    _o.key = this.key();
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+    _o.optional = this.optional();
+    _o.padding = this.padding();
+    _o.offset64 = this.offset64();
+  }
 }
 export class FieldT {
-    constructor(name = null, type = null, id = 0, offset = 0, defaultInteger = BigInt('0'), defaultReal = 0.0, deprecated = false, required = false, key = false, attributes = [], documentation = [], optional = false, padding = 0, offset64 = false) {
-        this.name = name;
-        this.type = type;
-        this.id = id;
-        this.offset = offset;
-        this.defaultInteger = defaultInteger;
-        this.defaultReal = defaultReal;
-        this.deprecated = deprecated;
-        this.required = required;
-        this.key = key;
-        this.attributes = attributes;
-        this.documentation = documentation;
-        this.optional = optional;
-        this.padding = padding;
-        this.offset64 = offset64;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const type = (this.type !== null ? this.type.pack(builder) : 0);
-        const attributes = Field.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        const documentation = Field.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        Field.startField(builder);
-        Field.addName(builder, name);
-        Field.addType(builder, type);
-        Field.addId(builder, this.id);
-        Field.addOffset(builder, this.offset);
-        Field.addDefaultInteger(builder, this.defaultInteger);
-        Field.addDefaultReal(builder, this.defaultReal);
-        Field.addDeprecated(builder, this.deprecated);
-        Field.addRequired(builder, this.required);
-        Field.addKey(builder, this.key);
-        Field.addAttributes(builder, attributes);
-        Field.addDocumentation(builder, documentation);
-        Field.addOptional(builder, this.optional);
-        Field.addPadding(builder, this.padding);
-        Field.addOffset64(builder, this.offset64);
-        return Field.endField(builder);
-    }
+  constructor(
+      name = null, type = null, id = 0, offset = 0,
+      defaultInteger = BigInt('0'), defaultReal = 0.0, deprecated = false,
+      required = false, key = false, attributes = [], documentation = [],
+      optional = false, padding = 0, offset64 = false) {
+    this.name = name;
+    this.type = type;
+    this.id = id;
+    this.offset = offset;
+    this.defaultInteger = defaultInteger;
+    this.defaultReal = defaultReal;
+    this.deprecated = deprecated;
+    this.required = required;
+    this.key = key;
+    this.attributes = attributes;
+    this.documentation = documentation;
+    this.optional = optional;
+    this.padding = padding;
+    this.offset64 = offset64;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const type = (this.type !== null ? this.type.pack(builder) : 0);
+    const attributes = Field.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    const documentation = Field.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    Field.startField(builder);
+    Field.addName(builder, name);
+    Field.addType(builder, type);
+    Field.addId(builder, this.id);
+    Field.addOffset(builder, this.offset);
+    Field.addDefaultInteger(builder, this.defaultInteger);
+    Field.addDefaultReal(builder, this.defaultReal);
+    Field.addDeprecated(builder, this.deprecated);
+    Field.addRequired(builder, this.required);
+    Field.addKey(builder, this.key);
+    Field.addAttributes(builder, attributes);
+    Field.addDocumentation(builder, documentation);
+    Field.addOptional(builder, this.optional);
+    Field.addPadding(builder, this.padding);
+    Field.addOffset64(builder, this.offset64);
+    return Field.endField(builder);
+  }
 }
diff --git a/tests/ts/reflection/field.ts b/tests/ts/reflection/field.ts
index 75a2d34..7f8eefd 100644
--- a/tests/ts/reflection/field.ts
+++ b/tests/ts/reflection/field.ts
@@ -4,403 +4,469 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Type, TypeT } from '../reflection/type.js';
-
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Type, TypeT} from '../reflection/type.js';
 
 export class Field implements flatbuffers.IUnpackableObject<FieldT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Field {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsField(bb:flatbuffers.ByteBuffer, obj?:Field):Field {
-  return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsField(bb:flatbuffers.ByteBuffer, obj?:Field):Field {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-type(obj?:Type):Type|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new Type()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-id():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
-}
-
-mutate_id(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Field {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeUint16(this.bb_pos + offset, value);
-  return true;
-}
-
-offset():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
-}
-
-mutate_offset(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-
-  if (offset === 0) {
-    return false;
+  static getRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field {
+    return (obj || new Field()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeUint16(this.bb_pos + offset, value);
-  return true;
-}
-
-defaultInteger():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
-}
-
-mutate_default_integer(value:bigint):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-
-  if (offset === 0) {
-    return false;
+  static getSizePrefixedRootAsField(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Field,
+  ): Field {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Field()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt64(this.bb_pos + offset, value);
-  return true;
-}
-
-defaultReal():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
-}
-
-mutate_default_real(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-
-  if (offset === 0) {
-    return false;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
   }
 
-  this.bb!.writeFloat64(this.bb_pos + offset, value);
-  return true;
-}
-
-deprecated():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_deprecated(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-
-  if (offset === 0) {
-    return false;
+  type(obj?: Type): Type | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new Type()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
-
-required():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_required(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-
-  if (offset === 0) {
-    return false;
+  id(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
+  mutate_id(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
 
-key():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 20);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-mutate_key(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 20);
-
-  if (offset === 0) {
-    return false;
+    this.bb!.writeUint16(this.bb_pos + offset, value);
+    return true;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 22);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 22);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 24);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 24);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-optional():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 26);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_optional(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 26);
-
-  if (offset === 0) {
-    return false;
+  offset(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
+  mutate_offset(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
 
-/**
- * Number of padding octets to always add after this field. Structs only.
- */
-padding():number {
-  const offset = this.bb!.__offset(this.bb_pos, 28);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-mutate_padding(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 28);
-
-  if (offset === 0) {
-    return false;
+    this.bb!.writeUint16(this.bb_pos + offset, value);
+    return true;
   }
 
-  this.bb!.writeUint16(this.bb_pos + offset, value);
-  return true;
-}
-
-/**
- * If the field uses 64-bit offsets.
- */
-offset64():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 30);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_offset64(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 30);
-
-  if (offset === 0) {
-    return false;
+  defaultInteger(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
+  mutate_default_integer(value: bigint): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
 
-static getFullyQualifiedName():string {
-  return 'reflection.Field';
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static startField(builder:flatbuffers.Builder) {
-  builder.startObject(14);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addType(builder:flatbuffers.Builder, typeOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, typeOffset, 0);
-}
-
-static addId(builder:flatbuffers.Builder, id:number) {
-  builder.addFieldInt16(2, id, 0);
-}
-
-static addOffset(builder:flatbuffers.Builder, offset:number) {
-  builder.addFieldInt16(3, offset, 0);
-}
-
-static addDefaultInteger(builder:flatbuffers.Builder, defaultInteger:bigint) {
-  builder.addFieldInt64(4, defaultInteger, BigInt('0'));
-}
-
-static addDefaultReal(builder:flatbuffers.Builder, defaultReal:number) {
-  builder.addFieldFloat64(5, defaultReal, 0.0);
-}
-
-static addDeprecated(builder:flatbuffers.Builder, deprecated:boolean) {
-  builder.addFieldInt8(6, +deprecated, +false);
-}
-
-static addRequired(builder:flatbuffers.Builder, required:boolean) {
-  builder.addFieldInt8(7, +required, +false);
-}
-
-static addKey(builder:flatbuffers.Builder, key:boolean) {
-  builder.addFieldInt8(8, +key, +false);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(9, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+    this.bb!.writeInt64(this.bb_pos + offset, value);
+    return true;
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(10, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  defaultReal(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  mutate_default_real(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
 
-static addOptional(builder:flatbuffers.Builder, optional:boolean) {
-  builder.addFieldInt8(11, +optional, +false);
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static addPadding(builder:flatbuffers.Builder, padding:number) {
-  builder.addFieldInt16(12, padding, 0);
-}
+    this.bb!.writeFloat64(this.bb_pos + offset, value);
+    return true;
+  }
 
-static addOffset64(builder:flatbuffers.Builder, offset64:boolean) {
-  builder.addFieldInt8(13, +offset64, +false);
-}
+  deprecated(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
-static endField(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  builder.requiredField(offset, 6) // type
-  return offset;
-}
+  mutate_deprecated(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
 
+    if (offset === 0) {
+      return false;
+    }
 
-unpack(): FieldT {
-  return new FieldT(
-    this.name(),
-    (this.type() !== null ? this.type()!.unpack() : null),
-    this.id(),
-    this.offset(),
-    this.defaultInteger(),
-    this.defaultReal(),
-    this.deprecated(),
-    this.required(),
-    this.key(),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
-    this.optional(),
-    this.padding(),
-    this.offset64()
-  );
-}
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
 
+  required(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
-unpackTo(_o: FieldT): void {
-  _o.name = this.name();
-  _o.type = (this.type() !== null ? this.type()!.unpack() : null);
-  _o.id = this.id();
-  _o.offset = this.offset();
-  _o.defaultInteger = this.defaultInteger();
-  _o.defaultReal = this.defaultReal();
-  _o.deprecated = this.deprecated();
-  _o.required = this.required();
-  _o.key = this.key();
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-  _o.optional = this.optional();
-  _o.padding = this.padding();
-  _o.offset64 = this.offset64();
-}
+  mutate_required(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+
+  key(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 20);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
+
+  mutate_key(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 20);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 22);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
+
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 22);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 24);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
+
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 24);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  optional(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 26);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
+
+  mutate_optional(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 26);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+
+  /**
+   * Number of padding octets to always add after this field. Structs only.
+   */
+  padding(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 28);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
+  }
+
+  mutate_padding(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 28);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+
+  /**
+   * If the field uses 64-bit offsets.
+   */
+  offset64(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 30);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
+
+  mutate_offset64(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 30);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Field';
+  }
+
+  static startField(builder: flatbuffers.Builder) {
+    builder.startObject(14);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addType(builder: flatbuffers.Builder, typeOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(1, typeOffset, 0);
+  }
+
+  static addId(builder: flatbuffers.Builder, id: number) {
+    builder.addFieldInt16(2, id, 0);
+  }
+
+  static addOffset(builder: flatbuffers.Builder, offset: number) {
+    builder.addFieldInt16(3, offset, 0);
+  }
+
+  static addDefaultInteger(
+    builder: flatbuffers.Builder,
+    defaultInteger: bigint,
+  ) {
+    builder.addFieldInt64(4, defaultInteger, BigInt('0'));
+  }
+
+  static addDefaultReal(builder: flatbuffers.Builder, defaultReal: number) {
+    builder.addFieldFloat64(5, defaultReal, 0.0);
+  }
+
+  static addDeprecated(builder: flatbuffers.Builder, deprecated: boolean) {
+    builder.addFieldInt8(6, +deprecated, +false);
+  }
+
+  static addRequired(builder: flatbuffers.Builder, required: boolean) {
+    builder.addFieldInt8(7, +required, +false);
+  }
+
+  static addKey(builder: flatbuffers.Builder, key: boolean) {
+    builder.addFieldInt8(8, +key, +false);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(9, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(10, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addOptional(builder: flatbuffers.Builder, optional: boolean) {
+    builder.addFieldInt8(11, +optional, +false);
+  }
+
+  static addPadding(builder: flatbuffers.Builder, padding: number) {
+    builder.addFieldInt16(12, padding, 0);
+  }
+
+  static addOffset64(builder: flatbuffers.Builder, offset64: boolean) {
+    builder.addFieldInt8(13, +offset64, +false);
+  }
+
+  static endField(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    builder.requiredField(offset, 6); // type
+    return offset;
+  }
+
+  unpack(): FieldT {
+    return new FieldT(
+      this.name(),
+      this.type() !== null ? this.type()!.unpack() : null,
+      this.id(),
+      this.offset(),
+      this.defaultInteger(),
+      this.defaultReal(),
+      this.deprecated(),
+      this.required(),
+      this.key(),
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+      this.optional(),
+      this.padding(),
+      this.offset64(),
+    );
+  }
+
+  unpackTo(_o: FieldT): void {
+    _o.name = this.name();
+    _o.type = this.type() !== null ? this.type()!.unpack() : null;
+    _o.id = this.id();
+    _o.offset = this.offset();
+    _o.defaultInteger = this.defaultInteger();
+    _o.defaultReal = this.defaultReal();
+    _o.deprecated = this.deprecated();
+    _o.required = this.required();
+    _o.key = this.key();
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+    _o.optional = this.optional();
+    _o.padding = this.padding();
+    _o.offset64 = this.offset64();
+  }
 }
 
 export class FieldT implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public type: TypeT|null = null,
-  public id: number = 0,
-  public offset: number = 0,
-  public defaultInteger: bigint = BigInt('0'),
-  public defaultReal: number = 0.0,
-  public deprecated: boolean = false,
-  public required: boolean = false,
-  public key: boolean = false,
-  public attributes: (KeyValueT)[] = [],
-  public documentation: (string)[] = [],
-  public optional: boolean = false,
-  public padding: number = 0,
-  public offset64: boolean = false
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public type: TypeT | null = null,
+    public id: number = 0,
+    public offset: number = 0,
+    public defaultInteger: bigint = BigInt('0'),
+    public defaultReal: number = 0.0,
+    public deprecated: boolean = false,
+    public required: boolean = false,
+    public key: boolean = false,
+    public attributes: KeyValueT[] = [],
+    public documentation: string[] = [],
+    public optional: boolean = false,
+    public padding: number = 0,
+    public offset64: boolean = false,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const type = this.type !== null ? this.type!.pack(builder) : 0;
+    const attributes = Field.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
+    const documentation = Field.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const type = (this.type !== null ? this.type!.pack(builder) : 0);
-  const attributes = Field.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-  const documentation = Field.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
+    Field.startField(builder);
+    Field.addName(builder, name);
+    Field.addType(builder, type);
+    Field.addId(builder, this.id);
+    Field.addOffset(builder, this.offset);
+    Field.addDefaultInteger(builder, this.defaultInteger);
+    Field.addDefaultReal(builder, this.defaultReal);
+    Field.addDeprecated(builder, this.deprecated);
+    Field.addRequired(builder, this.required);
+    Field.addKey(builder, this.key);
+    Field.addAttributes(builder, attributes);
+    Field.addDocumentation(builder, documentation);
+    Field.addOptional(builder, this.optional);
+    Field.addPadding(builder, this.padding);
+    Field.addOffset64(builder, this.offset64);
 
-  Field.startField(builder);
-  Field.addName(builder, name);
-  Field.addType(builder, type);
-  Field.addId(builder, this.id);
-  Field.addOffset(builder, this.offset);
-  Field.addDefaultInteger(builder, this.defaultInteger);
-  Field.addDefaultReal(builder, this.defaultReal);
-  Field.addDeprecated(builder, this.deprecated);
-  Field.addRequired(builder, this.required);
-  Field.addKey(builder, this.key);
-  Field.addAttributes(builder, attributes);
-  Field.addDocumentation(builder, documentation);
-  Field.addOptional(builder, this.optional);
-  Field.addPadding(builder, this.padding);
-  Field.addOffset64(builder, this.offset64);
-
-  return Field.endField(builder);
-}
+    return Field.endField(builder);
+  }
 }
diff --git a/tests/ts/reflection/key-value.d.ts b/tests/ts/reflection/key-value.d.ts
index 23f5f1d..7998630 100644
--- a/tests/ts/reflection/key-value.d.ts
+++ b/tests/ts/reflection/key-value.d.ts
@@ -1,26 +1,47 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class KeyValue implements flatbuffers.IUnpackableObject<KeyValueT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): KeyValue;
-    static getRootAsKeyValue(bb: flatbuffers.ByteBuffer, obj?: KeyValue): KeyValue;
-    static getSizePrefixedRootAsKeyValue(bb: flatbuffers.ByteBuffer, obj?: KeyValue): KeyValue;
-    key(): string | null;
-    key(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    value(): string | null;
-    value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    static getFullyQualifiedName(): string;
-    static startKeyValue(builder: flatbuffers.Builder): void;
-    static addKey(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset): void;
-    static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
-    static endKeyValue(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createKeyValue(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): KeyValueT;
-    unpackTo(_o: KeyValueT): void;
+export declare class KeyValue
+  implements flatbuffers.IUnpackableObject<KeyValueT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): KeyValue;
+  static getRootAsKeyValue(
+    bb: flatbuffers.ByteBuffer,
+    obj?: KeyValue,
+  ): KeyValue;
+  static getSizePrefixedRootAsKeyValue(
+    bb: flatbuffers.ByteBuffer,
+    obj?: KeyValue,
+  ): KeyValue;
+  key(): string | null;
+  key(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  value(): string | null;
+  value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  static getFullyQualifiedName(): string;
+  static startKeyValue(builder: flatbuffers.Builder): void;
+  static addKey(
+    builder: flatbuffers.Builder,
+    keyOffset: flatbuffers.Offset,
+  ): void;
+  static addValue(
+    builder: flatbuffers.Builder,
+    valueOffset: flatbuffers.Offset,
+  ): void;
+  static endKeyValue(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createKeyValue(
+    builder: flatbuffers.Builder,
+    keyOffset: flatbuffers.Offset,
+    valueOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): KeyValueT;
+  unpackTo(_o: KeyValueT): void;
 }
 export declare class KeyValueT implements flatbuffers.IGeneratedObject {
-    key: string | Uint8Array | null;
-    value: string | Uint8Array | null;
-    constructor(key?: string | Uint8Array | null, value?: string | Uint8Array | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  key: string | Uint8Array | null;
+  value: string | Uint8Array | null;
+  constructor(
+    key?: string | Uint8Array | null,
+    value?: string | Uint8Array | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/key-value.js b/tests/ts/reflection/key-value.js
index 289e9ea..32d2b3e 100644
--- a/tests/ts/reflection/key-value.js
+++ b/tests/ts/reflection/key-value.js
@@ -1,70 +1,75 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class KeyValue {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsKeyValue(bb, obj) {
-        return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsKeyValue(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    key(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    value(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.KeyValue';
-    }
-    static startKeyValue(builder) {
-        builder.startObject(2);
-    }
-    static addKey(builder, keyOffset) {
-        builder.addFieldOffset(0, keyOffset, 0);
-    }
-    static addValue(builder, valueOffset) {
-        builder.addFieldOffset(1, valueOffset, 0);
-    }
-    static endKeyValue(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // key
-        return offset;
-    }
-    static createKeyValue(builder, keyOffset, valueOffset) {
-        KeyValue.startKeyValue(builder);
-        KeyValue.addKey(builder, keyOffset);
-        KeyValue.addValue(builder, valueOffset);
-        return KeyValue.endKeyValue(builder);
-    }
-    unpack() {
-        return new KeyValueT(this.key(), this.value());
-    }
-    unpackTo(_o) {
-        _o.key = this.key();
-        _o.value = this.value();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsKeyValue(bb, obj) {
+    return (obj || new KeyValue())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsKeyValue(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new KeyValue())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  key(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  value(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.KeyValue';
+  }
+  static startKeyValue(builder) {
+    builder.startObject(2);
+  }
+  static addKey(builder, keyOffset) {
+    builder.addFieldOffset(0, keyOffset, 0);
+  }
+  static addValue(builder, valueOffset) {
+    builder.addFieldOffset(1, valueOffset, 0);
+  }
+  static endKeyValue(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // key
+    return offset;
+  }
+  static createKeyValue(builder, keyOffset, valueOffset) {
+    KeyValue.startKeyValue(builder);
+    KeyValue.addKey(builder, keyOffset);
+    KeyValue.addValue(builder, valueOffset);
+    return KeyValue.endKeyValue(builder);
+  }
+  unpack() {
+    return new KeyValueT(this.key(), this.value());
+  }
+  unpackTo(_o) {
+    _o.key = this.key();
+    _o.value = this.value();
+  }
 }
 export class KeyValueT {
-    constructor(key = null, value = null) {
-        this.key = key;
-        this.value = value;
-    }
-    pack(builder) {
-        const key = (this.key !== null ? builder.createString(this.key) : 0);
-        const value = (this.value !== null ? builder.createString(this.value) : 0);
-        return KeyValue.createKeyValue(builder, key, value);
-    }
+  constructor(key = null, value = null) {
+    this.key = key;
+    this.value = value;
+  }
+  pack(builder) {
+    const key = (this.key !== null ? builder.createString(this.key) : 0);
+    const value = (this.value !== null ? builder.createString(this.value) : 0);
+    return KeyValue.createKeyValue(builder, key, value);
+  }
 }
diff --git a/tests/ts/reflection/key-value.ts b/tests/ts/reflection/key-value.ts
index 8d7fe04..ab9742c 100644
--- a/tests/ts/reflection/key-value.ts
+++ b/tests/ts/reflection/key-value.ts
@@ -4,97 +4,110 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class KeyValue implements flatbuffers.IUnpackableObject<KeyValueT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):KeyValue {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): KeyValue {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsKeyValue(bb:flatbuffers.ByteBuffer, obj?:KeyValue):KeyValue {
-  return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsKeyValue(
+    bb: flatbuffers.ByteBuffer,
+    obj?: KeyValue,
+  ): KeyValue {
+    return (obj || new KeyValue()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsKeyValue(bb:flatbuffers.ByteBuffer, obj?:KeyValue):KeyValue {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsKeyValue(
+    bb: flatbuffers.ByteBuffer,
+    obj?: KeyValue,
+  ): KeyValue {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new KeyValue()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-key():string|null
-key(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-key(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  key(): string | null;
+  key(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  key(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-value():string|null
-value(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-value(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  value(): string | null;
+  value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  value(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-static getFullyQualifiedName():string {
-  return 'reflection.KeyValue';
-}
+  static getFullyQualifiedName(): string {
+    return 'reflection.KeyValue';
+  }
 
-static startKeyValue(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
+  static startKeyValue(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
 
-static addKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, keyOffset, 0);
-}
+  static addKey(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, keyOffset, 0);
+  }
 
-static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, valueOffset, 0);
-}
+  static addValue(
+    builder: flatbuffers.Builder,
+    valueOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, valueOffset, 0);
+  }
 
-static endKeyValue(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // key
-  return offset;
-}
+  static endKeyValue(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // key
+    return offset;
+  }
 
-static createKeyValue(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset, valueOffset:flatbuffers.Offset):flatbuffers.Offset {
-  KeyValue.startKeyValue(builder);
-  KeyValue.addKey(builder, keyOffset);
-  KeyValue.addValue(builder, valueOffset);
-  return KeyValue.endKeyValue(builder);
-}
+  static createKeyValue(
+    builder: flatbuffers.Builder,
+    keyOffset: flatbuffers.Offset,
+    valueOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    KeyValue.startKeyValue(builder);
+    KeyValue.addKey(builder, keyOffset);
+    KeyValue.addValue(builder, valueOffset);
+    return KeyValue.endKeyValue(builder);
+  }
 
-unpack(): KeyValueT {
-  return new KeyValueT(
-    this.key(),
-    this.value()
-  );
-}
+  unpack(): KeyValueT {
+    return new KeyValueT(this.key(), this.value());
+  }
 
-
-unpackTo(_o: KeyValueT): void {
-  _o.key = this.key();
-  _o.value = this.value();
-}
+  unpackTo(_o: KeyValueT): void {
+    _o.key = this.key();
+    _o.value = this.value();
+  }
 }
 
 export class KeyValueT implements flatbuffers.IGeneratedObject {
-constructor(
-  public key: string|Uint8Array|null = null,
-  public value: string|Uint8Array|null = null
-){}
+  constructor(
+    public key: string | Uint8Array | null = null,
+    public value: string | Uint8Array | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const key = this.key !== null ? builder.createString(this.key!) : 0;
+    const value = this.value !== null ? builder.createString(this.value!) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const key = (this.key !== null ? builder.createString(this.key!) : 0);
-  const value = (this.value !== null ? builder.createString(this.value!) : 0);
-
-  return KeyValue.createKeyValue(builder,
-    key,
-    value
-  );
-}
+    return KeyValue.createKeyValue(builder, key, value);
+  }
 }
diff --git a/tests/ts/reflection/object.d.ts b/tests/ts/reflection/object.d.ts
index 8f8c540..cd79bd8 100644
--- a/tests/ts/reflection/object.d.ts
+++ b/tests/ts/reflection/object.d.ts
@@ -1,62 +1,124 @@
 import * as flatbuffers from 'flatbuffers';
-import { Field, FieldT } from '../reflection/field.js';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-export declare class Object_ implements flatbuffers.IUnpackableObject<Object_T> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Object_;
-    static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
-    static getSizePrefixedRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    fields(index: number, obj?: Field): Field | null;
-    fieldsLength(): number;
-    isStruct(): boolean;
-    mutate_is_struct(value: boolean): boolean;
-    minalign(): number;
-    mutate_minalign(value: number): boolean;
-    bytesize(): number;
-    mutate_bytesize(value: number): boolean;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    /**
-     * File that this Object is declared in.
-     */
-    declarationFile(): string | null;
-    declarationFile(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    static getFullyQualifiedName(): string;
-    static startObject(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addFields(builder: flatbuffers.Builder, fieldsOffset: flatbuffers.Offset): void;
-    static createFieldsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startFieldsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addIsStruct(builder: flatbuffers.Builder, isStruct: boolean): void;
-    static addMinalign(builder: flatbuffers.Builder, minalign: number): void;
-    static addBytesize(builder: flatbuffers.Builder, bytesize: number): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDeclarationFile(builder: flatbuffers.Builder, declarationFileOffset: flatbuffers.Offset): void;
-    static endObject(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createObject(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset, fieldsOffset: flatbuffers.Offset, isStruct: boolean, minalign: number, bytesize: number, attributesOffset: flatbuffers.Offset, documentationOffset: flatbuffers.Offset, declarationFileOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): Object_T;
-    unpackTo(_o: Object_T): void;
+import {Field, FieldT} from '../reflection/field.js';
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+export declare class Object_
+  implements flatbuffers.IUnpackableObject<Object_T>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Object_;
+  static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
+  static getSizePrefixedRootAsObject(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Object_,
+  ): Object_;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  fields(index: number, obj?: Field): Field | null;
+  fieldsLength(): number;
+  isStruct(): boolean;
+  mutate_is_struct(value: boolean): boolean;
+  minalign(): number;
+  mutate_minalign(value: number): boolean;
+  bytesize(): number;
+  mutate_bytesize(value: number): boolean;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  /**
+   * File that this Object is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  static getFullyQualifiedName(): string;
+  static startObject(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addFields(
+    builder: flatbuffers.Builder,
+    fieldsOffset: flatbuffers.Offset,
+  ): void;
+  static createFieldsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startFieldsVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addIsStruct(builder: flatbuffers.Builder, isStruct: boolean): void;
+  static addMinalign(builder: flatbuffers.Builder, minalign: number): void;
+  static addBytesize(builder: flatbuffers.Builder, bytesize: number): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ): void;
+  static endObject(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createObject(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    fieldsOffset: flatbuffers.Offset,
+    isStruct: boolean,
+    minalign: number,
+    bytesize: number,
+    attributesOffset: flatbuffers.Offset,
+    documentationOffset: flatbuffers.Offset,
+    declarationFileOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): Object_T;
+  unpackTo(_o: Object_T): void;
 }
 export declare class Object_T implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    fields: (FieldT)[];
-    isStruct: boolean;
-    minalign: number;
-    bytesize: number;
-    attributes: (KeyValueT)[];
-    documentation: (string)[];
-    declarationFile: string | Uint8Array | null;
-    constructor(name?: string | Uint8Array | null, fields?: (FieldT)[], isStruct?: boolean, minalign?: number, bytesize?: number, attributes?: (KeyValueT)[], documentation?: (string)[], declarationFile?: string | Uint8Array | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  fields: FieldT[];
+  isStruct: boolean;
+  minalign: number;
+  bytesize: number;
+  attributes: KeyValueT[];
+  documentation: string[];
+  declarationFile: string | Uint8Array | null;
+  constructor(
+    name?: string | Uint8Array | null,
+    fields?: FieldT[],
+    isStruct?: boolean,
+    minalign?: number,
+    bytesize?: number,
+    attributes?: KeyValueT[],
+    documentation?: string[],
+    declarationFile?: string | Uint8Array | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/object.js b/tests/ts/reflection/object.js
index bf1edf8..a308253 100644
--- a/tests/ts/reflection/object.js
+++ b/tests/ts/reflection/object.js
@@ -1,202 +1,247 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Field } from '../reflection/field.js';
-import { KeyValue } from '../reflection/key-value.js';
+
+import {Field} from '../reflection/field.js';
+import {KeyValue} from '../reflection/key-value.js';
+
 export class Object_ {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsObject(bb, obj) {
+    return (obj || new Object_())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsObject(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Object_())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  fields(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new Field())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  fieldsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  isStruct() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_is_struct(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  minalign() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_minalign(value) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsObject(bb, obj) {
-        return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  bytesize() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_bytesize(value) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsObject(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  declarationFile(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Object';
+  }
+  static startObject(builder) {
+    builder.startObject(8);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addFields(builder, fieldsOffset) {
+    builder.addFieldOffset(1, fieldsOffset, 0);
+  }
+  static createFieldsVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
+    return builder.endVector();
+  }
+  static startFieldsVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addIsStruct(builder, isStruct) {
+    builder.addFieldInt8(2, +isStruct, +false);
+  }
+  static addMinalign(builder, minalign) {
+    builder.addFieldInt32(3, minalign, 0);
+  }
+  static addBytesize(builder, bytesize) {
+    builder.addFieldInt32(4, bytesize, 0);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(5, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    fields(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new Field()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(6, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    fieldsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    isStruct() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_is_struct(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    minalign() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_minalign(value) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    bytesize() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_bytesize(value) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    declarationFile(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Object';
-    }
-    static startObject(builder) {
-        builder.startObject(8);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addFields(builder, fieldsOffset) {
-        builder.addFieldOffset(1, fieldsOffset, 0);
-    }
-    static createFieldsVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startFieldsVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addIsStruct(builder, isStruct) {
-        builder.addFieldInt8(2, +isStruct, +false);
-    }
-    static addMinalign(builder, minalign) {
-        builder.addFieldInt32(3, minalign, 0);
-    }
-    static addBytesize(builder, bytesize) {
-        builder.addFieldInt32(4, bytesize, 0);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(5, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(6, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDeclarationFile(builder, declarationFileOffset) {
-        builder.addFieldOffset(7, declarationFileOffset, 0);
-    }
-    static endObject(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        builder.requiredField(offset, 6); // fields
-        return offset;
-    }
-    static createObject(builder, nameOffset, fieldsOffset, isStruct, minalign, bytesize, attributesOffset, documentationOffset, declarationFileOffset) {
-        Object_.startObject(builder);
-        Object_.addName(builder, nameOffset);
-        Object_.addFields(builder, fieldsOffset);
-        Object_.addIsStruct(builder, isStruct);
-        Object_.addMinalign(builder, minalign);
-        Object_.addBytesize(builder, bytesize);
-        Object_.addAttributes(builder, attributesOffset);
-        Object_.addDocumentation(builder, documentationOffset);
-        Object_.addDeclarationFile(builder, declarationFileOffset);
-        return Object_.endObject(builder);
-    }
-    unpack() {
-        return new Object_T(this.name(), this.bb.createObjList(this.fields.bind(this), this.fieldsLength()), this.isStruct(), this.minalign(), this.bytesize(), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile());
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.fields = this.bb.createObjList(this.fields.bind(this), this.fieldsLength());
-        _o.isStruct = this.isStruct();
-        _o.minalign = this.minalign();
-        _o.bytesize = this.bytesize();
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-        _o.declarationFile = this.declarationFile();
-    }
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDeclarationFile(builder, declarationFileOffset) {
+    builder.addFieldOffset(7, declarationFileOffset, 0);
+  }
+  static endObject(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // name
+    builder.requiredField(offset, 6);  // fields
+    return offset;
+  }
+  static createObject(
+      builder, nameOffset, fieldsOffset, isStruct, minalign, bytesize,
+      attributesOffset, documentationOffset, declarationFileOffset) {
+    Object_.startObject(builder);
+    Object_.addName(builder, nameOffset);
+    Object_.addFields(builder, fieldsOffset);
+    Object_.addIsStruct(builder, isStruct);
+    Object_.addMinalign(builder, minalign);
+    Object_.addBytesize(builder, bytesize);
+    Object_.addAttributes(builder, attributesOffset);
+    Object_.addDocumentation(builder, documentationOffset);
+    Object_.addDeclarationFile(builder, declarationFileOffset);
+    return Object_.endObject(builder);
+  }
+  unpack() {
+    return new Object_T(
+        this.name(),
+        this.bb.createObjList(this.fields.bind(this), this.fieldsLength()),
+        this.isStruct(), this.minalign(), this.bytesize(),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()),
+        this.declarationFile());
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.fields =
+        this.bb.createObjList(this.fields.bind(this), this.fieldsLength());
+    _o.isStruct = this.isStruct();
+    _o.minalign = this.minalign();
+    _o.bytesize = this.bytesize();
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+    _o.declarationFile = this.declarationFile();
+  }
 }
 export class Object_T {
-    constructor(name = null, fields = [], isStruct = false, minalign = 0, bytesize = 0, attributes = [], documentation = [], declarationFile = null) {
-        this.name = name;
-        this.fields = fields;
-        this.isStruct = isStruct;
-        this.minalign = minalign;
-        this.bytesize = bytesize;
-        this.attributes = attributes;
-        this.documentation = documentation;
-        this.declarationFile = declarationFile;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const fields = Object_.createFieldsVector(builder, builder.createObjectOffsetList(this.fields));
-        const attributes = Object_.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        const documentation = Object_.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile) : 0);
-        return Object_.createObject(builder, name, fields, this.isStruct, this.minalign, this.bytesize, attributes, documentation, declarationFile);
-    }
+  constructor(
+      name = null, fields = [], isStruct = false, minalign = 0, bytesize = 0,
+      attributes = [], documentation = [], declarationFile = null) {
+    this.name = name;
+    this.fields = fields;
+    this.isStruct = isStruct;
+    this.minalign = minalign;
+    this.bytesize = bytesize;
+    this.attributes = attributes;
+    this.documentation = documentation;
+    this.declarationFile = declarationFile;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const fields = Object_.createFieldsVector(
+        builder, builder.createObjectOffsetList(this.fields));
+    const attributes = Object_.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    const documentation = Object_.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    const declarationFile =
+        (this.declarationFile !== null ?
+             builder.createString(this.declarationFile) :
+             0);
+    return Object_.createObject(
+        builder, name, fields, this.isStruct, this.minalign, this.bytesize,
+        attributes, documentation, declarationFile);
+  }
 }
diff --git a/tests/ts/reflection/object.ts b/tests/ts/reflection/object.ts
index 088b330..27c909e 100644
--- a/tests/ts/reflection/object.ts
+++ b/tests/ts/reflection/object.ts
@@ -4,276 +4,378 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { Field, FieldT } from '../reflection/field.js';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-
+import {Field, FieldT} from '../reflection/field.js';
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
 
 export class Object_ implements flatbuffers.IUnpackableObject<Object_T> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Object_ {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
-  return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-fields(index: number, obj?:Field):Field|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new Field()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-fieldsLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-isStruct():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_is_struct(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Object_ {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
-
-minalign():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_minalign(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-
-  if (offset === 0) {
-    return false;
+  static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_ {
+    return (obj || new Object_()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-bytesize():number {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_bytesize(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-
-  if (offset === 0) {
-    return false;
+  static getSizePrefixedRootAsObject(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Object_,
+  ): Object_ {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Object_()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-/**
- * File that this Object is declared in.
- */
-declarationFile():string|null
-declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-declarationFile(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.Object';
-}
-
-static startObject(builder:flatbuffers.Builder) {
-  builder.startObject(8);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addFields(builder:flatbuffers.Builder, fieldsOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, fieldsOffset, 0);
-}
-
-static createFieldsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
   }
-  return builder.endVector();
-}
 
-static startFieldsVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addIsStruct(builder:flatbuffers.Builder, isStruct:boolean) {
-  builder.addFieldInt8(2, +isStruct, +false);
-}
-
-static addMinalign(builder:flatbuffers.Builder, minalign:number) {
-  builder.addFieldInt32(3, minalign, 0);
-}
-
-static addBytesize(builder:flatbuffers.Builder, bytesize:number) {
-  builder.addFieldInt32(4, bytesize, 0);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(5, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  fields(index: number, obj?: Field): Field | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new Field()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(6, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  fieldsLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  isStruct(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
-static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(7, declarationFileOffset, 0);
-}
+  mutate_is_struct(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
 
-static endObject(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  builder.requiredField(offset, 6) // fields
-  return offset;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static createObject(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, fieldsOffset:flatbuffers.Offset, isStruct:boolean, minalign:number, bytesize:number, attributesOffset:flatbuffers.Offset, documentationOffset:flatbuffers.Offset, declarationFileOffset:flatbuffers.Offset):flatbuffers.Offset {
-  Object_.startObject(builder);
-  Object_.addName(builder, nameOffset);
-  Object_.addFields(builder, fieldsOffset);
-  Object_.addIsStruct(builder, isStruct);
-  Object_.addMinalign(builder, minalign);
-  Object_.addBytesize(builder, bytesize);
-  Object_.addAttributes(builder, attributesOffset);
-  Object_.addDocumentation(builder, documentationOffset);
-  Object_.addDeclarationFile(builder, declarationFileOffset);
-  return Object_.endObject(builder);
-}
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
 
-unpack(): Object_T {
-  return new Object_T(
-    this.name(),
-    this.bb!.createObjList<Field, FieldT>(this.fields.bind(this), this.fieldsLength()),
-    this.isStruct(),
-    this.minalign(),
-    this.bytesize(),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
-    this.declarationFile()
-  );
-}
+  minalign(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
+  }
 
+  mutate_minalign(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
 
-unpackTo(_o: Object_T): void {
-  _o.name = this.name();
-  _o.fields = this.bb!.createObjList<Field, FieldT>(this.fields.bind(this), this.fieldsLength());
-  _o.isStruct = this.isStruct();
-  _o.minalign = this.minalign();
-  _o.bytesize = this.bytesize();
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-  _o.declarationFile = this.declarationFile();
-}
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+
+  bytesize(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
+  }
+
+  mutate_bytesize(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
+
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
+
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  /**
+   * File that this Object is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  declarationFile(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Object';
+  }
+
+  static startObject(builder: flatbuffers.Builder) {
+    builder.startObject(8);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addFields(
+    builder: flatbuffers.Builder,
+    fieldsOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, fieldsOffset, 0);
+  }
+
+  static createFieldsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startFieldsVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addIsStruct(builder: flatbuffers.Builder, isStruct: boolean) {
+    builder.addFieldInt8(2, +isStruct, +false);
+  }
+
+  static addMinalign(builder: flatbuffers.Builder, minalign: number) {
+    builder.addFieldInt32(3, minalign, 0);
+  }
+
+  static addBytesize(builder: flatbuffers.Builder, bytesize: number) {
+    builder.addFieldInt32(4, bytesize, 0);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(5, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(6, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(7, declarationFileOffset, 0);
+  }
+
+  static endObject(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    builder.requiredField(offset, 6); // fields
+    return offset;
+  }
+
+  static createObject(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    fieldsOffset: flatbuffers.Offset,
+    isStruct: boolean,
+    minalign: number,
+    bytesize: number,
+    attributesOffset: flatbuffers.Offset,
+    documentationOffset: flatbuffers.Offset,
+    declarationFileOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    Object_.startObject(builder);
+    Object_.addName(builder, nameOffset);
+    Object_.addFields(builder, fieldsOffset);
+    Object_.addIsStruct(builder, isStruct);
+    Object_.addMinalign(builder, minalign);
+    Object_.addBytesize(builder, bytesize);
+    Object_.addAttributes(builder, attributesOffset);
+    Object_.addDocumentation(builder, documentationOffset);
+    Object_.addDeclarationFile(builder, declarationFileOffset);
+    return Object_.endObject(builder);
+  }
+
+  unpack(): Object_T {
+    return new Object_T(
+      this.name(),
+      this.bb!.createObjList<Field, FieldT>(
+        this.fields.bind(this),
+        this.fieldsLength(),
+      ),
+      this.isStruct(),
+      this.minalign(),
+      this.bytesize(),
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+      this.declarationFile(),
+    );
+  }
+
+  unpackTo(_o: Object_T): void {
+    _o.name = this.name();
+    _o.fields = this.bb!.createObjList<Field, FieldT>(
+      this.fields.bind(this),
+      this.fieldsLength(),
+    );
+    _o.isStruct = this.isStruct();
+    _o.minalign = this.minalign();
+    _o.bytesize = this.bytesize();
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+    _o.declarationFile = this.declarationFile();
+  }
 }
 
 export class Object_T implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public fields: (FieldT)[] = [],
-  public isStruct: boolean = false,
-  public minalign: number = 0,
-  public bytesize: number = 0,
-  public attributes: (KeyValueT)[] = [],
-  public documentation: (string)[] = [],
-  public declarationFile: string|Uint8Array|null = null
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public fields: FieldT[] = [],
+    public isStruct: boolean = false,
+    public minalign: number = 0,
+    public bytesize: number = 0,
+    public attributes: KeyValueT[] = [],
+    public documentation: string[] = [],
+    public declarationFile: string | Uint8Array | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const fields = Object_.createFieldsVector(
+      builder,
+      builder.createObjectOffsetList(this.fields),
+    );
+    const attributes = Object_.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
+    const documentation = Object_.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
+    const declarationFile =
+      this.declarationFile !== null
+        ? builder.createString(this.declarationFile!)
+        : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const fields = Object_.createFieldsVector(builder, builder.createObjectOffsetList(this.fields));
-  const attributes = Object_.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-  const documentation = Object_.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-  const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
-
-  return Object_.createObject(builder,
-    name,
-    fields,
-    this.isStruct,
-    this.minalign,
-    this.bytesize,
-    attributes,
-    documentation,
-    declarationFile
-  );
-}
+    return Object_.createObject(
+      builder,
+      name,
+      fields,
+      this.isStruct,
+      this.minalign,
+      this.bytesize,
+      attributes,
+      documentation,
+      declarationFile,
+    );
+  }
 }
diff --git a/tests/ts/reflection/rpccall.d.ts b/tests/ts/reflection/rpccall.d.ts
index e70ba91..40014cd 100644
--- a/tests/ts/reflection/rpccall.d.ts
+++ b/tests/ts/reflection/rpccall.d.ts
@@ -1,42 +1,83 @@
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Object_, Object_T } from '../reflection/object.js';
-export declare class RPCCall implements flatbuffers.IUnpackableObject<RPCCallT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): RPCCall;
-    static getRootAsRPCCall(bb: flatbuffers.ByteBuffer, obj?: RPCCall): RPCCall;
-    static getSizePrefixedRootAsRPCCall(bb: flatbuffers.ByteBuffer, obj?: RPCCall): RPCCall;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    request(obj?: Object_): Object_ | null;
-    response(obj?: Object_): Object_ | null;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    static getFullyQualifiedName(): string;
-    static startRPCCall(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addRequest(builder: flatbuffers.Builder, requestOffset: flatbuffers.Offset): void;
-    static addResponse(builder: flatbuffers.Builder, responseOffset: flatbuffers.Offset): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endRPCCall(builder: flatbuffers.Builder): flatbuffers.Offset;
-    unpack(): RPCCallT;
-    unpackTo(_o: RPCCallT): void;
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Object_, Object_T} from '../reflection/object.js';
+export declare class RPCCall
+  implements flatbuffers.IUnpackableObject<RPCCallT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): RPCCall;
+  static getRootAsRPCCall(bb: flatbuffers.ByteBuffer, obj?: RPCCall): RPCCall;
+  static getSizePrefixedRootAsRPCCall(
+    bb: flatbuffers.ByteBuffer,
+    obj?: RPCCall,
+  ): RPCCall;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  request(obj?: Object_): Object_ | null;
+  response(obj?: Object_): Object_ | null;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  static getFullyQualifiedName(): string;
+  static startRPCCall(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addRequest(
+    builder: flatbuffers.Builder,
+    requestOffset: flatbuffers.Offset,
+  ): void;
+  static addResponse(
+    builder: flatbuffers.Builder,
+    responseOffset: flatbuffers.Offset,
+  ): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endRPCCall(builder: flatbuffers.Builder): flatbuffers.Offset;
+  unpack(): RPCCallT;
+  unpackTo(_o: RPCCallT): void;
 }
 export declare class RPCCallT implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    request: Object_T | null;
-    response: Object_T | null;
-    attributes: (KeyValueT)[];
-    documentation: (string)[];
-    constructor(name?: string | Uint8Array | null, request?: Object_T | null, response?: Object_T | null, attributes?: (KeyValueT)[], documentation?: (string)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  request: Object_T | null;
+  response: Object_T | null;
+  attributes: KeyValueT[];
+  documentation: string[];
+  constructor(
+    name?: string | Uint8Array | null,
+    request?: Object_T | null,
+    response?: Object_T | null,
+    attributes?: KeyValueT[],
+    documentation?: string[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/rpccall.js b/tests/ts/reflection/rpccall.js
index f7fa574..a512e06 100644
--- a/tests/ts/reflection/rpccall.js
+++ b/tests/ts/reflection/rpccall.js
@@ -1,132 +1,165 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue } from '../reflection/key-value.js';
-import { Object_ } from '../reflection/object.js';
+
+import {KeyValue} from '../reflection/key-value.js';
+import {Object_} from '../reflection/object.js';
+
 export class RPCCall {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsRPCCall(bb, obj) {
+    return (obj || new RPCCall())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsRPCCall(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new RPCCall())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  request(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new Object_())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  response(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        (obj || new Object_())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.RPCCall';
+  }
+  static startRPCCall(builder) {
+    builder.startObject(5);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addRequest(builder, requestOffset) {
+    builder.addFieldOffset(1, requestOffset, 0);
+  }
+  static addResponse(builder, responseOffset) {
+    builder.addFieldOffset(2, responseOffset, 0);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(3, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(4, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsRPCCall(bb, obj) {
-        return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsRPCCall(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    request(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new Object_()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    response(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? (obj || new Object_()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.RPCCall';
-    }
-    static startRPCCall(builder) {
-        builder.startObject(5);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addRequest(builder, requestOffset) {
-        builder.addFieldOffset(1, requestOffset, 0);
-    }
-    static addResponse(builder, responseOffset) {
-        builder.addFieldOffset(2, responseOffset, 0);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(3, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(4, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endRPCCall(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        builder.requiredField(offset, 6); // request
-        builder.requiredField(offset, 8); // response
-        return offset;
-    }
-    unpack() {
-        return new RPCCallT(this.name(), (this.request() !== null ? this.request().unpack() : null), (this.response() !== null ? this.response().unpack() : null), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()));
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.request = (this.request() !== null ? this.request().unpack() : null);
-        _o.response = (this.response() !== null ? this.response().unpack() : null);
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-    }
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endRPCCall(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // name
+    builder.requiredField(offset, 6);  // request
+    builder.requiredField(offset, 8);  // response
+    return offset;
+  }
+  unpack() {
+    return new RPCCallT(
+        this.name(), (this.request() !== null ? this.request().unpack() : null),
+        (this.response() !== null ? this.response().unpack() : null),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()));
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.request = (this.request() !== null ? this.request().unpack() : null);
+    _o.response = (this.response() !== null ? this.response().unpack() : null);
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+  }
 }
 export class RPCCallT {
-    constructor(name = null, request = null, response = null, attributes = [], documentation = []) {
-        this.name = name;
-        this.request = request;
-        this.response = response;
-        this.attributes = attributes;
-        this.documentation = documentation;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const request = (this.request !== null ? this.request.pack(builder) : 0);
-        const response = (this.response !== null ? this.response.pack(builder) : 0);
-        const attributes = RPCCall.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        const documentation = RPCCall.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        RPCCall.startRPCCall(builder);
-        RPCCall.addName(builder, name);
-        RPCCall.addRequest(builder, request);
-        RPCCall.addResponse(builder, response);
-        RPCCall.addAttributes(builder, attributes);
-        RPCCall.addDocumentation(builder, documentation);
-        return RPCCall.endRPCCall(builder);
-    }
+  constructor(
+      name = null, request = null, response = null, attributes = [],
+      documentation = []) {
+    this.name = name;
+    this.request = request;
+    this.response = response;
+    this.attributes = attributes;
+    this.documentation = documentation;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const request = (this.request !== null ? this.request.pack(builder) : 0);
+    const response = (this.response !== null ? this.response.pack(builder) : 0);
+    const attributes = RPCCall.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    const documentation = RPCCall.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    RPCCall.startRPCCall(builder);
+    RPCCall.addName(builder, name);
+    RPCCall.addRequest(builder, request);
+    RPCCall.addResponse(builder, response);
+    RPCCall.addAttributes(builder, attributes);
+    RPCCall.addDocumentation(builder, documentation);
+    return RPCCall.endRPCCall(builder);
+  }
 }
diff --git a/tests/ts/reflection/rpccall.ts b/tests/ts/reflection/rpccall.ts
index 9202300..33771c2 100644
--- a/tests/ts/reflection/rpccall.ts
+++ b/tests/ts/reflection/rpccall.ts
@@ -4,172 +4,246 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { Object_, Object_T } from '../reflection/object.js';
-
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {Object_, Object_T} from '../reflection/object.js';
 
 export class RPCCall implements flatbuffers.IUnpackableObject<RPCCallT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):RPCCall {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsRPCCall(bb:flatbuffers.ByteBuffer, obj?:RPCCall):RPCCall {
-  return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsRPCCall(bb:flatbuffers.ByteBuffer, obj?:RPCCall):RPCCall {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new RPCCall()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-request(obj?:Object_):Object_|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-response(obj?:Object_):Object_|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.RPCCall';
-}
-
-static startRPCCall(builder:flatbuffers.Builder) {
-  builder.startObject(5);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addRequest(builder:flatbuffers.Builder, requestOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, requestOffset, 0);
-}
-
-static addResponse(builder:flatbuffers.Builder, responseOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(2, responseOffset, 0);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  __init(i: number, bb: flatbuffers.ByteBuffer): RPCCall {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(4, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsRPCCall(bb: flatbuffers.ByteBuffer, obj?: RPCCall): RPCCall {
+    return (obj || new RPCCall()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  static getSizePrefixedRootAsRPCCall(
+    bb: flatbuffers.ByteBuffer,
+    obj?: RPCCall,
+  ): RPCCall {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new RPCCall()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static endRPCCall(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  builder.requiredField(offset, 6) // request
-  builder.requiredField(offset, 8) // response
-  return offset;
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
+  request(obj?: Object_): Object_ | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new Object_()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
 
-unpack(): RPCCallT {
-  return new RPCCallT(
-    this.name(),
-    (this.request() !== null ? this.request()!.unpack() : null),
-    (this.response() !== null ? this.response()!.unpack() : null),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength())
-  );
-}
+  response(obj?: Object_): Object_ | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? (obj || new Object_()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
 
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-unpackTo(_o: RPCCallT): void {
-  _o.name = this.name();
-  _o.request = (this.request() !== null ? this.request()!.unpack() : null);
-  _o.response = (this.response() !== null ? this.response()!.unpack() : null);
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-}
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
+
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.RPCCall';
+  }
+
+  static startRPCCall(builder: flatbuffers.Builder) {
+    builder.startObject(5);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addRequest(
+    builder: flatbuffers.Builder,
+    requestOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, requestOffset, 0);
+  }
+
+  static addResponse(
+    builder: flatbuffers.Builder,
+    responseOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(2, responseOffset, 0);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(4, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static endRPCCall(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    builder.requiredField(offset, 6); // request
+    builder.requiredField(offset, 8); // response
+    return offset;
+  }
+
+  unpack(): RPCCallT {
+    return new RPCCallT(
+      this.name(),
+      this.request() !== null ? this.request()!.unpack() : null,
+      this.response() !== null ? this.response()!.unpack() : null,
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+    );
+  }
+
+  unpackTo(_o: RPCCallT): void {
+    _o.name = this.name();
+    _o.request = this.request() !== null ? this.request()!.unpack() : null;
+    _o.response = this.response() !== null ? this.response()!.unpack() : null;
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+  }
 }
 
 export class RPCCallT implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public request: Object_T|null = null,
-  public response: Object_T|null = null,
-  public attributes: (KeyValueT)[] = [],
-  public documentation: (string)[] = []
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public request: Object_T | null = null,
+    public response: Object_T | null = null,
+    public attributes: KeyValueT[] = [],
+    public documentation: string[] = [],
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const request = this.request !== null ? this.request!.pack(builder) : 0;
+    const response = this.response !== null ? this.response!.pack(builder) : 0;
+    const attributes = RPCCall.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
+    const documentation = RPCCall.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const request = (this.request !== null ? this.request!.pack(builder) : 0);
-  const response = (this.response !== null ? this.response!.pack(builder) : 0);
-  const attributes = RPCCall.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-  const documentation = RPCCall.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
+    RPCCall.startRPCCall(builder);
+    RPCCall.addName(builder, name);
+    RPCCall.addRequest(builder, request);
+    RPCCall.addResponse(builder, response);
+    RPCCall.addAttributes(builder, attributes);
+    RPCCall.addDocumentation(builder, documentation);
 
-  RPCCall.startRPCCall(builder);
-  RPCCall.addName(builder, name);
-  RPCCall.addRequest(builder, request);
-  RPCCall.addResponse(builder, response);
-  RPCCall.addAttributes(builder, attributes);
-  RPCCall.addDocumentation(builder, documentation);
-
-  return RPCCall.endRPCCall(builder);
-}
+    return RPCCall.endRPCCall(builder);
+  }
 }
diff --git a/tests/ts/reflection/schema-file.d.ts b/tests/ts/reflection/schema-file.d.ts
index 18f943c..c252ded 100644
--- a/tests/ts/reflection/schema-file.d.ts
+++ b/tests/ts/reflection/schema-file.d.ts
@@ -4,37 +4,67 @@
  * Symbols declared within a file may be recovered by iterating over all
  * symbols and examining the `declaration_file` field.
  */
-export declare class SchemaFile implements flatbuffers.IUnpackableObject<SchemaFileT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): SchemaFile;
-    static getRootAsSchemaFile(bb: flatbuffers.ByteBuffer, obj?: SchemaFile): SchemaFile;
-    static getSizePrefixedRootAsSchemaFile(bb: flatbuffers.ByteBuffer, obj?: SchemaFile): SchemaFile;
-    /**
-     * Filename, relative to project root.
-     */
-    filename(): string | null;
-    filename(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    /**
-     * Names of included files, relative to project root.
-     */
-    includedFilenames(index: number): string;
-    includedFilenames(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    includedFilenamesLength(): number;
-    static getFullyQualifiedName(): string;
-    static startSchemaFile(builder: flatbuffers.Builder): void;
-    static addFilename(builder: flatbuffers.Builder, filenameOffset: flatbuffers.Offset): void;
-    static addIncludedFilenames(builder: flatbuffers.Builder, includedFilenamesOffset: flatbuffers.Offset): void;
-    static createIncludedFilenamesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startIncludedFilenamesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endSchemaFile(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createSchemaFile(builder: flatbuffers.Builder, filenameOffset: flatbuffers.Offset, includedFilenamesOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): SchemaFileT;
-    unpackTo(_o: SchemaFileT): void;
+export declare class SchemaFile
+  implements flatbuffers.IUnpackableObject<SchemaFileT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): SchemaFile;
+  static getRootAsSchemaFile(
+    bb: flatbuffers.ByteBuffer,
+    obj?: SchemaFile,
+  ): SchemaFile;
+  static getSizePrefixedRootAsSchemaFile(
+    bb: flatbuffers.ByteBuffer,
+    obj?: SchemaFile,
+  ): SchemaFile;
+  /**
+   * Filename, relative to project root.
+   */
+  filename(): string | null;
+  filename(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  /**
+   * Names of included files, relative to project root.
+   */
+  includedFilenames(index: number): string;
+  includedFilenames(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  includedFilenamesLength(): number;
+  static getFullyQualifiedName(): string;
+  static startSchemaFile(builder: flatbuffers.Builder): void;
+  static addFilename(
+    builder: flatbuffers.Builder,
+    filenameOffset: flatbuffers.Offset,
+  ): void;
+  static addIncludedFilenames(
+    builder: flatbuffers.Builder,
+    includedFilenamesOffset: flatbuffers.Offset,
+  ): void;
+  static createIncludedFilenamesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startIncludedFilenamesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endSchemaFile(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createSchemaFile(
+    builder: flatbuffers.Builder,
+    filenameOffset: flatbuffers.Offset,
+    includedFilenamesOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): SchemaFileT;
+  unpackTo(_o: SchemaFileT): void;
 }
 export declare class SchemaFileT implements flatbuffers.IGeneratedObject {
-    filename: string | Uint8Array | null;
-    includedFilenames: (string)[];
-    constructor(filename?: string | Uint8Array | null, includedFilenames?: (string)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  filename: string | Uint8Array | null;
+  includedFilenames: string[];
+  constructor(
+    filename?: string | Uint8Array | null,
+    includedFilenames?: string[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/schema-file.js b/tests/ts/reflection/schema-file.js
index cb4cf49..51c976e 100644
--- a/tests/ts/reflection/schema-file.js
+++ b/tests/ts/reflection/schema-file.js
@@ -1,5 +1,6 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 /**
  * File specific information.
@@ -7,83 +8,95 @@
  * symbols and examining the `declaration_file` field.
  */
 export class SchemaFile {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsSchemaFile(bb, obj) {
+    return (obj || new SchemaFile())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsSchemaFile(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new SchemaFile())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  filename(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  includedFilenames(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  includedFilenamesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.SchemaFile';
+  }
+  static startSchemaFile(builder) {
+    builder.startObject(2);
+  }
+  static addFilename(builder, filenameOffset) {
+    builder.addFieldOffset(0, filenameOffset, 0);
+  }
+  static addIncludedFilenames(builder, includedFilenamesOffset) {
+    builder.addFieldOffset(1, includedFilenamesOffset, 0);
+  }
+  static createIncludedFilenamesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsSchemaFile(bb, obj) {
-        return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsSchemaFile(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    filename(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    includedFilenames(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    includedFilenamesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.SchemaFile';
-    }
-    static startSchemaFile(builder) {
-        builder.startObject(2);
-    }
-    static addFilename(builder, filenameOffset) {
-        builder.addFieldOffset(0, filenameOffset, 0);
-    }
-    static addIncludedFilenames(builder, includedFilenamesOffset) {
-        builder.addFieldOffset(1, includedFilenamesOffset, 0);
-    }
-    static createIncludedFilenamesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startIncludedFilenamesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endSchemaFile(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // filename
-        return offset;
-    }
-    static createSchemaFile(builder, filenameOffset, includedFilenamesOffset) {
-        SchemaFile.startSchemaFile(builder);
-        SchemaFile.addFilename(builder, filenameOffset);
-        SchemaFile.addIncludedFilenames(builder, includedFilenamesOffset);
-        return SchemaFile.endSchemaFile(builder);
-    }
-    unpack() {
-        return new SchemaFileT(this.filename(), this.bb.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()));
-    }
-    unpackTo(_o) {
-        _o.filename = this.filename();
-        _o.includedFilenames = this.bb.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength());
-    }
+    return builder.endVector();
+  }
+  static startIncludedFilenamesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endSchemaFile(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // filename
+    return offset;
+  }
+  static createSchemaFile(builder, filenameOffset, includedFilenamesOffset) {
+    SchemaFile.startSchemaFile(builder);
+    SchemaFile.addFilename(builder, filenameOffset);
+    SchemaFile.addIncludedFilenames(builder, includedFilenamesOffset);
+    return SchemaFile.endSchemaFile(builder);
+  }
+  unpack() {
+    return new SchemaFileT(
+        this.filename(),
+        this.bb.createScalarList(
+            this.includedFilenames.bind(this), this.includedFilenamesLength()));
+  }
+  unpackTo(_o) {
+    _o.filename = this.filename();
+    _o.includedFilenames = this.bb.createScalarList(
+        this.includedFilenames.bind(this), this.includedFilenamesLength());
+  }
 }
 export class SchemaFileT {
-    constructor(filename = null, includedFilenames = []) {
-        this.filename = filename;
-        this.includedFilenames = includedFilenames;
-    }
-    pack(builder) {
-        const filename = (this.filename !== null ? builder.createString(this.filename) : 0);
-        const includedFilenames = SchemaFile.createIncludedFilenamesVector(builder, builder.createObjectOffsetList(this.includedFilenames));
-        return SchemaFile.createSchemaFile(builder, filename, includedFilenames);
-    }
+  constructor(filename = null, includedFilenames = []) {
+    this.filename = filename;
+    this.includedFilenames = includedFilenames;
+  }
+  pack(builder) {
+    const filename =
+        (this.filename !== null ? builder.createString(this.filename) : 0);
+    const includedFilenames = SchemaFile.createIncludedFilenamesVector(
+        builder, builder.createObjectOffsetList(this.includedFilenames));
+    return SchemaFile.createSchemaFile(builder, filename, includedFilenames);
+  }
 }
diff --git a/tests/ts/reflection/schema-file.ts b/tests/ts/reflection/schema-file.ts
index 44544eb..9248c4b 100644
--- a/tests/ts/reflection/schema-file.ts
+++ b/tests/ts/reflection/schema-file.ts
@@ -4,125 +4,169 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 /**
  * File specific information.
  * Symbols declared within a file may be recovered by iterating over all
  * symbols and examining the `declaration_file` field.
  */
 export class SchemaFile implements flatbuffers.IUnpackableObject<SchemaFileT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):SchemaFile {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsSchemaFile(bb:flatbuffers.ByteBuffer, obj?:SchemaFile):SchemaFile {
-  return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsSchemaFile(bb:flatbuffers.ByteBuffer, obj?:SchemaFile):SchemaFile {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new SchemaFile()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-/**
- * Filename, relative to project root.
- */
-filename():string|null
-filename(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-filename(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-/**
- * Names of included files, relative to project root.
- */
-includedFilenames(index: number):string
-includedFilenames(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-includedFilenames(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-includedFilenamesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.SchemaFile';
-}
-
-static startSchemaFile(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
-
-static addFilename(builder:flatbuffers.Builder, filenameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, filenameOffset, 0);
-}
-
-static addIncludedFilenames(builder:flatbuffers.Builder, includedFilenamesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, includedFilenamesOffset, 0);
-}
-
-static createIncludedFilenamesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  __init(i: number, bb: flatbuffers.ByteBuffer): SchemaFile {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
-  return builder.endVector();
-}
 
-static startIncludedFilenamesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  static getRootAsSchemaFile(
+    bb: flatbuffers.ByteBuffer,
+    obj?: SchemaFile,
+  ): SchemaFile {
+    return (obj || new SchemaFile()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static endSchemaFile(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // filename
-  return offset;
-}
+  static getSizePrefixedRootAsSchemaFile(
+    bb: flatbuffers.ByteBuffer,
+    obj?: SchemaFile,
+  ): SchemaFile {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new SchemaFile()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static createSchemaFile(builder:flatbuffers.Builder, filenameOffset:flatbuffers.Offset, includedFilenamesOffset:flatbuffers.Offset):flatbuffers.Offset {
-  SchemaFile.startSchemaFile(builder);
-  SchemaFile.addFilename(builder, filenameOffset);
-  SchemaFile.addIncludedFilenames(builder, includedFilenamesOffset);
-  return SchemaFile.endSchemaFile(builder);
-}
+  /**
+   * Filename, relative to project root.
+   */
+  filename(): string | null;
+  filename(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  filename(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-unpack(): SchemaFileT {
-  return new SchemaFileT(
-    this.filename(),
-    this.bb!.createScalarList<string>(this.includedFilenames.bind(this), this.includedFilenamesLength())
-  );
-}
+  /**
+   * Names of included files, relative to project root.
+   */
+  includedFilenames(index: number): string;
+  includedFilenames(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  includedFilenames(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
 
+  includedFilenamesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
-unpackTo(_o: SchemaFileT): void {
-  _o.filename = this.filename();
-  _o.includedFilenames = this.bb!.createScalarList<string>(this.includedFilenames.bind(this), this.includedFilenamesLength());
-}
+  static getFullyQualifiedName(): string {
+    return 'reflection.SchemaFile';
+  }
+
+  static startSchemaFile(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
+
+  static addFilename(
+    builder: flatbuffers.Builder,
+    filenameOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(0, filenameOffset, 0);
+  }
+
+  static addIncludedFilenames(
+    builder: flatbuffers.Builder,
+    includedFilenamesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, includedFilenamesOffset, 0);
+  }
+
+  static createIncludedFilenamesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startIncludedFilenamesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static endSchemaFile(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // filename
+    return offset;
+  }
+
+  static createSchemaFile(
+    builder: flatbuffers.Builder,
+    filenameOffset: flatbuffers.Offset,
+    includedFilenamesOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    SchemaFile.startSchemaFile(builder);
+    SchemaFile.addFilename(builder, filenameOffset);
+    SchemaFile.addIncludedFilenames(builder, includedFilenamesOffset);
+    return SchemaFile.endSchemaFile(builder);
+  }
+
+  unpack(): SchemaFileT {
+    return new SchemaFileT(
+      this.filename(),
+      this.bb!.createScalarList<string>(
+        this.includedFilenames.bind(this),
+        this.includedFilenamesLength(),
+      ),
+    );
+  }
+
+  unpackTo(_o: SchemaFileT): void {
+    _o.filename = this.filename();
+    _o.includedFilenames = this.bb!.createScalarList<string>(
+      this.includedFilenames.bind(this),
+      this.includedFilenamesLength(),
+    );
+  }
 }
 
 export class SchemaFileT implements flatbuffers.IGeneratedObject {
-constructor(
-  public filename: string|Uint8Array|null = null,
-  public includedFilenames: (string)[] = []
-){}
+  constructor(
+    public filename: string | Uint8Array | null = null,
+    public includedFilenames: string[] = [],
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const filename =
+      this.filename !== null ? builder.createString(this.filename!) : 0;
+    const includedFilenames = SchemaFile.createIncludedFilenamesVector(
+      builder,
+      builder.createObjectOffsetList(this.includedFilenames),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const filename = (this.filename !== null ? builder.createString(this.filename!) : 0);
-  const includedFilenames = SchemaFile.createIncludedFilenamesVector(builder, builder.createObjectOffsetList(this.includedFilenames));
-
-  return SchemaFile.createSchemaFile(builder,
-    filename,
-    includedFilenames
-  );
-}
+    return SchemaFile.createSchemaFile(builder, filename, includedFilenames);
+  }
 }
diff --git a/tests/ts/reflection/schema.d.ts b/tests/ts/reflection/schema.d.ts
index 40a38af..caf9973 100644
--- a/tests/ts/reflection/schema.d.ts
+++ b/tests/ts/reflection/schema.d.ts
@@ -1,67 +1,130 @@
 import * as flatbuffers from 'flatbuffers';
-import { Enum, EnumT } from '../reflection/enum.js';
-import { Object_, Object_T } from '../reflection/object.js';
-import { SchemaFile, SchemaFileT } from '../reflection/schema-file.js';
-import { Service, ServiceT } from '../reflection/service.js';
+import {Enum, EnumT} from '../reflection/enum.js';
+import {Object_, Object_T} from '../reflection/object.js';
+import {SchemaFile, SchemaFileT} from '../reflection/schema-file.js';
+import {Service, ServiceT} from '../reflection/service.js';
 export declare class Schema implements flatbuffers.IUnpackableObject<SchemaT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Schema;
-    static getRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
-    static getSizePrefixedRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
-    static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
-    objects(index: number, obj?: Object_): Object_ | null;
-    objectsLength(): number;
-    enums(index: number, obj?: Enum): Enum | null;
-    enumsLength(): number;
-    fileIdent(): string | null;
-    fileIdent(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    fileExt(): string | null;
-    fileExt(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    rootTable(obj?: Object_): Object_ | null;
-    services(index: number, obj?: Service): Service | null;
-    servicesLength(): number;
-    advancedFeatures(): bigint;
-    mutate_advanced_features(value: bigint): boolean;
-    /**
-     * All the files used in this compilation. Files are relative to where
-     * flatc was invoked.
-     */
-    fbsFiles(index: number, obj?: SchemaFile): SchemaFile | null;
-    fbsFilesLength(): number;
-    static getFullyQualifiedName(): string;
-    static startSchema(builder: flatbuffers.Builder): void;
-    static addObjects(builder: flatbuffers.Builder, objectsOffset: flatbuffers.Offset): void;
-    static createObjectsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startObjectsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addEnums(builder: flatbuffers.Builder, enumsOffset: flatbuffers.Offset): void;
-    static createEnumsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startEnumsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addFileIdent(builder: flatbuffers.Builder, fileIdentOffset: flatbuffers.Offset): void;
-    static addFileExt(builder: flatbuffers.Builder, fileExtOffset: flatbuffers.Offset): void;
-    static addRootTable(builder: flatbuffers.Builder, rootTableOffset: flatbuffers.Offset): void;
-    static addServices(builder: flatbuffers.Builder, servicesOffset: flatbuffers.Offset): void;
-    static createServicesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startServicesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addAdvancedFeatures(builder: flatbuffers.Builder, advancedFeatures: bigint): void;
-    static addFbsFiles(builder: flatbuffers.Builder, fbsFilesOffset: flatbuffers.Offset): void;
-    static createFbsFilesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startFbsFilesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endSchema(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishSchemaBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedSchemaBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    unpack(): SchemaT;
-    unpackTo(_o: SchemaT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Schema;
+  static getRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
+  static getSizePrefixedRootAsSchema(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Schema,
+  ): Schema;
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
+  objects(index: number, obj?: Object_): Object_ | null;
+  objectsLength(): number;
+  enums(index: number, obj?: Enum): Enum | null;
+  enumsLength(): number;
+  fileIdent(): string | null;
+  fileIdent(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  fileExt(): string | null;
+  fileExt(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  rootTable(obj?: Object_): Object_ | null;
+  services(index: number, obj?: Service): Service | null;
+  servicesLength(): number;
+  advancedFeatures(): bigint;
+  mutate_advanced_features(value: bigint): boolean;
+  /**
+   * All the files used in this compilation. Files are relative to where
+   * flatc was invoked.
+   */
+  fbsFiles(index: number, obj?: SchemaFile): SchemaFile | null;
+  fbsFilesLength(): number;
+  static getFullyQualifiedName(): string;
+  static startSchema(builder: flatbuffers.Builder): void;
+  static addObjects(
+    builder: flatbuffers.Builder,
+    objectsOffset: flatbuffers.Offset,
+  ): void;
+  static createObjectsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startObjectsVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addEnums(
+    builder: flatbuffers.Builder,
+    enumsOffset: flatbuffers.Offset,
+  ): void;
+  static createEnumsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startEnumsVector(builder: flatbuffers.Builder, numElems: number): void;
+  static addFileIdent(
+    builder: flatbuffers.Builder,
+    fileIdentOffset: flatbuffers.Offset,
+  ): void;
+  static addFileExt(
+    builder: flatbuffers.Builder,
+    fileExtOffset: flatbuffers.Offset,
+  ): void;
+  static addRootTable(
+    builder: flatbuffers.Builder,
+    rootTableOffset: flatbuffers.Offset,
+  ): void;
+  static addServices(
+    builder: flatbuffers.Builder,
+    servicesOffset: flatbuffers.Offset,
+  ): void;
+  static createServicesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startServicesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addAdvancedFeatures(
+    builder: flatbuffers.Builder,
+    advancedFeatures: bigint,
+  ): void;
+  static addFbsFiles(
+    builder: flatbuffers.Builder,
+    fbsFilesOffset: flatbuffers.Offset,
+  ): void;
+  static createFbsFilesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startFbsFilesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endSchema(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishSchemaBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedSchemaBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  unpack(): SchemaT;
+  unpackTo(_o: SchemaT): void;
 }
 export declare class SchemaT implements flatbuffers.IGeneratedObject {
-    objects: (Object_T)[];
-    enums: (EnumT)[];
-    fileIdent: string | Uint8Array | null;
-    fileExt: string | Uint8Array | null;
-    rootTable: Object_T | null;
-    services: (ServiceT)[];
-    advancedFeatures: bigint;
-    fbsFiles: (SchemaFileT)[];
-    constructor(objects?: (Object_T)[], enums?: (EnumT)[], fileIdent?: string | Uint8Array | null, fileExt?: string | Uint8Array | null, rootTable?: Object_T | null, services?: (ServiceT)[], advancedFeatures?: bigint, fbsFiles?: (SchemaFileT)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  objects: Object_T[];
+  enums: EnumT[];
+  fileIdent: string | Uint8Array | null;
+  fileExt: string | Uint8Array | null;
+  rootTable: Object_T | null;
+  services: ServiceT[];
+  advancedFeatures: bigint;
+  fbsFiles: SchemaFileT[];
+  constructor(
+    objects?: Object_T[],
+    enums?: EnumT[],
+    fileIdent?: string | Uint8Array | null,
+    fileExt?: string | Uint8Array | null,
+    rootTable?: Object_T | null,
+    services?: ServiceT[],
+    advancedFeatures?: bigint,
+    fbsFiles?: SchemaFileT[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/schema.js b/tests/ts/reflection/schema.js
index ef474c5..e738cef 100644
--- a/tests/ts/reflection/schema.js
+++ b/tests/ts/reflection/schema.js
@@ -1,214 +1,269 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Enum } from '../reflection/enum.js';
-import { Object_ } from '../reflection/object.js';
-import { SchemaFile } from '../reflection/schema-file.js';
-import { Service } from '../reflection/service.js';
+
+import {Enum} from '../reflection/enum.js';
+import {Object_} from '../reflection/object.js';
+import {SchemaFile} from '../reflection/schema-file.js';
+import {Service} from '../reflection/service.js';
+
 export class Schema {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsSchema(bb, obj) {
+    return (obj || new Schema())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsSchema(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Schema())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static bufferHasIdentifier(bb) {
+    return bb.__has_identifier('BFBS');
+  }
+  objects(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ?
+        (obj || new Object_())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  objectsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  enums(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new Enum())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  enumsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  fileIdent(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  fileExt(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  rootTable(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ?
+        (obj || new Object_())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  services(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ?
+        (obj || new Service())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  servicesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  advancedFeatures() {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+  mutate_advanced_features(value) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+  /**
+   * All the files used in this compilation. Files are relative to where
+   * flatc was invoked.
+   */
+  fbsFiles(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ?
+        (obj || new SchemaFile())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  fbsFilesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 18);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Schema';
+  }
+  static startSchema(builder) {
+    builder.startObject(8);
+  }
+  static addObjects(builder, objectsOffset) {
+    builder.addFieldOffset(0, objectsOffset, 0);
+  }
+  static createObjectsVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsSchema(bb, obj) {
-        return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startObjectsVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addEnums(builder, enumsOffset) {
+    builder.addFieldOffset(1, enumsOffset, 0);
+  }
+  static createEnumsVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getSizePrefixedRootAsSchema(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startEnumsVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addFileIdent(builder, fileIdentOffset) {
+    builder.addFieldOffset(2, fileIdentOffset, 0);
+  }
+  static addFileExt(builder, fileExtOffset) {
+    builder.addFieldOffset(3, fileExtOffset, 0);
+  }
+  static addRootTable(builder, rootTableOffset) {
+    builder.addFieldOffset(4, rootTableOffset, 0);
+  }
+  static addServices(builder, servicesOffset) {
+    builder.addFieldOffset(5, servicesOffset, 0);
+  }
+  static createServicesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static bufferHasIdentifier(bb) {
-        return bb.__has_identifier('BFBS');
+    return builder.endVector();
+  }
+  static startServicesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addAdvancedFeatures(builder, advancedFeatures) {
+    builder.addFieldInt64(6, advancedFeatures, BigInt('0'));
+  }
+  static addFbsFiles(builder, fbsFilesOffset) {
+    builder.addFieldOffset(7, fbsFilesOffset, 0);
+  }
+  static createFbsFilesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    objects(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? (obj || new Object_()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    objectsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    enums(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new Enum()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    enumsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    fileIdent(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    fileExt(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    rootTable(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? (obj || new Object_()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    services(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? (obj || new Service()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    servicesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    advancedFeatures() {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
-    }
-    mutate_advanced_features(value) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint64(this.bb_pos + offset, value);
-        return true;
-    }
-    /**
-     * All the files used in this compilation. Files are relative to where
-     * flatc was invoked.
-     */
-    fbsFiles(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? (obj || new SchemaFile()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    fbsFilesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 18);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Schema';
-    }
-    static startSchema(builder) {
-        builder.startObject(8);
-    }
-    static addObjects(builder, objectsOffset) {
-        builder.addFieldOffset(0, objectsOffset, 0);
-    }
-    static createObjectsVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startObjectsVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addEnums(builder, enumsOffset) {
-        builder.addFieldOffset(1, enumsOffset, 0);
-    }
-    static createEnumsVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startEnumsVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addFileIdent(builder, fileIdentOffset) {
-        builder.addFieldOffset(2, fileIdentOffset, 0);
-    }
-    static addFileExt(builder, fileExtOffset) {
-        builder.addFieldOffset(3, fileExtOffset, 0);
-    }
-    static addRootTable(builder, rootTableOffset) {
-        builder.addFieldOffset(4, rootTableOffset, 0);
-    }
-    static addServices(builder, servicesOffset) {
-        builder.addFieldOffset(5, servicesOffset, 0);
-    }
-    static createServicesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startServicesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addAdvancedFeatures(builder, advancedFeatures) {
-        builder.addFieldInt64(6, advancedFeatures, BigInt('0'));
-    }
-    static addFbsFiles(builder, fbsFilesOffset) {
-        builder.addFieldOffset(7, fbsFilesOffset, 0);
-    }
-    static createFbsFilesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startFbsFilesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endSchema(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // objects
-        builder.requiredField(offset, 6); // enums
-        return offset;
-    }
-    static finishSchemaBuffer(builder, offset) {
-        builder.finish(offset, 'BFBS');
-    }
-    static finishSizePrefixedSchemaBuffer(builder, offset) {
-        builder.finish(offset, 'BFBS', true);
-    }
-    unpack() {
-        return new SchemaT(this.bb.createObjList(this.objects.bind(this), this.objectsLength()), this.bb.createObjList(this.enums.bind(this), this.enumsLength()), this.fileIdent(), this.fileExt(), (this.rootTable() !== null ? this.rootTable().unpack() : null), this.bb.createObjList(this.services.bind(this), this.servicesLength()), this.advancedFeatures(), this.bb.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()));
-    }
-    unpackTo(_o) {
-        _o.objects = this.bb.createObjList(this.objects.bind(this), this.objectsLength());
-        _o.enums = this.bb.createObjList(this.enums.bind(this), this.enumsLength());
-        _o.fileIdent = this.fileIdent();
-        _o.fileExt = this.fileExt();
-        _o.rootTable = (this.rootTable() !== null ? this.rootTable().unpack() : null);
-        _o.services = this.bb.createObjList(this.services.bind(this), this.servicesLength());
-        _o.advancedFeatures = this.advancedFeatures();
-        _o.fbsFiles = this.bb.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength());
-    }
+    return builder.endVector();
+  }
+  static startFbsFilesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endSchema(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // objects
+    builder.requiredField(offset, 6);  // enums
+    return offset;
+  }
+  static finishSchemaBuffer(builder, offset) {
+    builder.finish(offset, 'BFBS');
+  }
+  static finishSizePrefixedSchemaBuffer(builder, offset) {
+    builder.finish(offset, 'BFBS', true);
+  }
+  unpack() {
+    return new SchemaT(
+        this.bb.createObjList(this.objects.bind(this), this.objectsLength()),
+        this.bb.createObjList(this.enums.bind(this), this.enumsLength()),
+        this.fileIdent(), this.fileExt(),
+        (this.rootTable() !== null ? this.rootTable().unpack() : null),
+        this.bb.createObjList(this.services.bind(this), this.servicesLength()),
+        this.advancedFeatures(),
+        this.bb.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()));
+  }
+  unpackTo(_o) {
+    _o.objects =
+        this.bb.createObjList(this.objects.bind(this), this.objectsLength());
+    _o.enums = this.bb.createObjList(this.enums.bind(this), this.enumsLength());
+    _o.fileIdent = this.fileIdent();
+    _o.fileExt = this.fileExt();
+    _o.rootTable =
+        (this.rootTable() !== null ? this.rootTable().unpack() : null);
+    _o.services =
+        this.bb.createObjList(this.services.bind(this), this.servicesLength());
+    _o.advancedFeatures = this.advancedFeatures();
+    _o.fbsFiles =
+        this.bb.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength());
+  }
 }
 export class SchemaT {
-    constructor(objects = [], enums = [], fileIdent = null, fileExt = null, rootTable = null, services = [], advancedFeatures = BigInt('0'), fbsFiles = []) {
-        this.objects = objects;
-        this.enums = enums;
-        this.fileIdent = fileIdent;
-        this.fileExt = fileExt;
-        this.rootTable = rootTable;
-        this.services = services;
-        this.advancedFeatures = advancedFeatures;
-        this.fbsFiles = fbsFiles;
-    }
-    pack(builder) {
-        const objects = Schema.createObjectsVector(builder, builder.createObjectOffsetList(this.objects));
-        const enums = Schema.createEnumsVector(builder, builder.createObjectOffsetList(this.enums));
-        const fileIdent = (this.fileIdent !== null ? builder.createString(this.fileIdent) : 0);
-        const fileExt = (this.fileExt !== null ? builder.createString(this.fileExt) : 0);
-        const rootTable = (this.rootTable !== null ? this.rootTable.pack(builder) : 0);
-        const services = Schema.createServicesVector(builder, builder.createObjectOffsetList(this.services));
-        const fbsFiles = Schema.createFbsFilesVector(builder, builder.createObjectOffsetList(this.fbsFiles));
-        Schema.startSchema(builder);
-        Schema.addObjects(builder, objects);
-        Schema.addEnums(builder, enums);
-        Schema.addFileIdent(builder, fileIdent);
-        Schema.addFileExt(builder, fileExt);
-        Schema.addRootTable(builder, rootTable);
-        Schema.addServices(builder, services);
-        Schema.addAdvancedFeatures(builder, this.advancedFeatures);
-        Schema.addFbsFiles(builder, fbsFiles);
-        return Schema.endSchema(builder);
-    }
+  constructor(
+      objects = [], enums = [], fileIdent = null, fileExt = null,
+      rootTable = null, services = [], advancedFeatures = BigInt('0'),
+      fbsFiles = []) {
+    this.objects = objects;
+    this.enums = enums;
+    this.fileIdent = fileIdent;
+    this.fileExt = fileExt;
+    this.rootTable = rootTable;
+    this.services = services;
+    this.advancedFeatures = advancedFeatures;
+    this.fbsFiles = fbsFiles;
+  }
+  pack(builder) {
+    const objects = Schema.createObjectsVector(
+        builder, builder.createObjectOffsetList(this.objects));
+    const enums = Schema.createEnumsVector(
+        builder, builder.createObjectOffsetList(this.enums));
+    const fileIdent =
+        (this.fileIdent !== null ? builder.createString(this.fileIdent) : 0);
+    const fileExt =
+        (this.fileExt !== null ? builder.createString(this.fileExt) : 0);
+    const rootTable =
+        (this.rootTable !== null ? this.rootTable.pack(builder) : 0);
+    const services = Schema.createServicesVector(
+        builder, builder.createObjectOffsetList(this.services));
+    const fbsFiles = Schema.createFbsFilesVector(
+        builder, builder.createObjectOffsetList(this.fbsFiles));
+    Schema.startSchema(builder);
+    Schema.addObjects(builder, objects);
+    Schema.addEnums(builder, enums);
+    Schema.addFileIdent(builder, fileIdent);
+    Schema.addFileExt(builder, fileExt);
+    Schema.addRootTable(builder, rootTable);
+    Schema.addServices(builder, services);
+    Schema.addAdvancedFeatures(builder, this.advancedFeatures);
+    Schema.addFbsFiles(builder, fbsFiles);
+    return Schema.endSchema(builder);
+  }
 }
diff --git a/tests/ts/reflection/schema.ts b/tests/ts/reflection/schema.ts
index 53922de..019daea 100644
--- a/tests/ts/reflection/schema.ts
+++ b/tests/ts/reflection/schema.ts
@@ -4,275 +4,399 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { Enum, EnumT } from '../reflection/enum.js';
-import { Object_, Object_T } from '../reflection/object.js';
-import { SchemaFile, SchemaFileT } from '../reflection/schema-file.js';
-import { Service, ServiceT } from '../reflection/service.js';
-
+import {Enum, EnumT} from '../reflection/enum.js';
+import {Object_, Object_T} from '../reflection/object.js';
+import {SchemaFile, SchemaFileT} from '../reflection/schema-file.js';
+import {Service, ServiceT} from '../reflection/service.js';
 
 export class Schema implements flatbuffers.IUnpackableObject<SchemaT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Schema {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsSchema(bb:flatbuffers.ByteBuffer, obj?:Schema):Schema {
-  return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsSchema(bb:flatbuffers.ByteBuffer, obj?:Schema):Schema {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
-  return bb.__has_identifier('BFBS');
-}
-
-objects(index: number, obj?:Object_):Object_|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-objectsLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-enums(index: number, obj?:Enum):Enum|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new Enum()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-enumsLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-fileIdent():string|null
-fileIdent(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-fileIdent(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-fileExt():string|null
-fileExt(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-fileExt(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-rootTable(obj?:Object_):Object_|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? (obj || new Object_()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
-
-services(index: number, obj?:Service):Service|null {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? (obj || new Service()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-servicesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-advancedFeatures():bigint {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
-}
-
-mutate_advanced_features(value:bigint):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Schema {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeUint64(this.bb_pos + offset, value);
-  return true;
-}
-
-/**
- * All the files used in this compilation. Files are relative to where
- * flatc was invoked.
- */
-fbsFiles(index: number, obj?:SchemaFile):SchemaFile|null {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-  return offset ? (obj || new SchemaFile()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-fbsFilesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 18);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.Schema';
-}
-
-static startSchema(builder:flatbuffers.Builder) {
-  builder.startObject(8);
-}
-
-static addObjects(builder:flatbuffers.Builder, objectsOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, objectsOffset, 0);
-}
-
-static createObjectsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema {
+    return (obj || new Schema()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startObjectsVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addEnums(builder:flatbuffers.Builder, enumsOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, enumsOffset, 0);
-}
-
-static createEnumsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getSizePrefixedRootAsSchema(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Schema,
+  ): Schema {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Schema()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startEnumsVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addFileIdent(builder:flatbuffers.Builder, fileIdentOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(2, fileIdentOffset, 0);
-}
-
-static addFileExt(builder:flatbuffers.Builder, fileExtOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, fileExtOffset, 0);
-}
-
-static addRootTable(builder:flatbuffers.Builder, rootTableOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(4, rootTableOffset, 0);
-}
-
-static addServices(builder:flatbuffers.Builder, servicesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(5, servicesOffset, 0);
-}
-
-static createServicesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean {
+    return bb.__has_identifier('BFBS');
   }
-  return builder.endVector();
-}
 
-static startServicesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addAdvancedFeatures(builder:flatbuffers.Builder, advancedFeatures:bigint) {
-  builder.addFieldInt64(6, advancedFeatures, BigInt('0'));
-}
-
-static addFbsFiles(builder:flatbuffers.Builder, fbsFilesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(7, fbsFilesOffset, 0);
-}
-
-static createFbsFilesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  objects(index: number, obj?: Object_): Object_ | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? (obj || new Object_()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
   }
-  return builder.endVector();
-}
 
-static startFbsFilesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  objectsLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
-static endSchema(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // objects
-  builder.requiredField(offset, 6) // enums
-  return offset;
-}
+  enums(index: number, obj?: Enum): Enum | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new Enum()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-static finishSchemaBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'BFBS');
-}
+  enumsLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
-static finishSizePrefixedSchemaBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
-  builder.finish(offset, 'BFBS', true);
-}
+  fileIdent(): string | null;
+  fileIdent(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  fileIdent(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
+  fileExt(): string | null;
+  fileExt(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  fileExt(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-unpack(): SchemaT {
-  return new SchemaT(
-    this.bb!.createObjList<Object_, Object_T>(this.objects.bind(this), this.objectsLength()),
-    this.bb!.createObjList<Enum, EnumT>(this.enums.bind(this), this.enumsLength()),
-    this.fileIdent(),
-    this.fileExt(),
-    (this.rootTable() !== null ? this.rootTable()!.unpack() : null),
-    this.bb!.createObjList<Service, ServiceT>(this.services.bind(this), this.servicesLength()),
-    this.advancedFeatures(),
-    this.bb!.createObjList<SchemaFile, SchemaFileT>(this.fbsFiles.bind(this), this.fbsFilesLength())
-  );
-}
+  rootTable(obj?: Object_): Object_ | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? (obj || new Object_()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
 
+  services(index: number, obj?: Service): Service | null {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset
+      ? (obj || new Service()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-unpackTo(_o: SchemaT): void {
-  _o.objects = this.bb!.createObjList<Object_, Object_T>(this.objects.bind(this), this.objectsLength());
-  _o.enums = this.bb!.createObjList<Enum, EnumT>(this.enums.bind(this), this.enumsLength());
-  _o.fileIdent = this.fileIdent();
-  _o.fileExt = this.fileExt();
-  _o.rootTable = (this.rootTable() !== null ? this.rootTable()!.unpack() : null);
-  _o.services = this.bb!.createObjList<Service, ServiceT>(this.services.bind(this), this.servicesLength());
-  _o.advancedFeatures = this.advancedFeatures();
-  _o.fbsFiles = this.bb!.createObjList<SchemaFile, SchemaFileT>(this.fbsFiles.bind(this), this.fbsFilesLength());
-}
+  servicesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  advancedFeatures(): bigint {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
+  }
+
+  mutate_advanced_features(value: bigint): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeUint64(this.bb_pos + offset, value);
+    return true;
+  }
+
+  /**
+   * All the files used in this compilation. Files are relative to where
+   * flatc was invoked.
+   */
+  fbsFiles(index: number, obj?: SchemaFile): SchemaFile | null {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+    return offset
+      ? (obj || new SchemaFile()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
+
+  fbsFilesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 18);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Schema';
+  }
+
+  static startSchema(builder: flatbuffers.Builder) {
+    builder.startObject(8);
+  }
+
+  static addObjects(
+    builder: flatbuffers.Builder,
+    objectsOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(0, objectsOffset, 0);
+  }
+
+  static createObjectsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startObjectsVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addEnums(
+    builder: flatbuffers.Builder,
+    enumsOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, enumsOffset, 0);
+  }
+
+  static createEnumsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startEnumsVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addFileIdent(
+    builder: flatbuffers.Builder,
+    fileIdentOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(2, fileIdentOffset, 0);
+  }
+
+  static addFileExt(
+    builder: flatbuffers.Builder,
+    fileExtOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, fileExtOffset, 0);
+  }
+
+  static addRootTable(
+    builder: flatbuffers.Builder,
+    rootTableOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(4, rootTableOffset, 0);
+  }
+
+  static addServices(
+    builder: flatbuffers.Builder,
+    servicesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(5, servicesOffset, 0);
+  }
+
+  static createServicesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startServicesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addAdvancedFeatures(
+    builder: flatbuffers.Builder,
+    advancedFeatures: bigint,
+  ) {
+    builder.addFieldInt64(6, advancedFeatures, BigInt('0'));
+  }
+
+  static addFbsFiles(
+    builder: flatbuffers.Builder,
+    fbsFilesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(7, fbsFilesOffset, 0);
+  }
+
+  static createFbsFilesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startFbsFilesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static endSchema(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // objects
+    builder.requiredField(offset, 6); // enums
+    return offset;
+  }
+
+  static finishSchemaBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'BFBS');
+  }
+
+  static finishSizePrefixedSchemaBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ) {
+    builder.finish(offset, 'BFBS', true);
+  }
+
+  unpack(): SchemaT {
+    return new SchemaT(
+      this.bb!.createObjList<Object_, Object_T>(
+        this.objects.bind(this),
+        this.objectsLength(),
+      ),
+      this.bb!.createObjList<Enum, EnumT>(
+        this.enums.bind(this),
+        this.enumsLength(),
+      ),
+      this.fileIdent(),
+      this.fileExt(),
+      this.rootTable() !== null ? this.rootTable()!.unpack() : null,
+      this.bb!.createObjList<Service, ServiceT>(
+        this.services.bind(this),
+        this.servicesLength(),
+      ),
+      this.advancedFeatures(),
+      this.bb!.createObjList<SchemaFile, SchemaFileT>(
+        this.fbsFiles.bind(this),
+        this.fbsFilesLength(),
+      ),
+    );
+  }
+
+  unpackTo(_o: SchemaT): void {
+    _o.objects = this.bb!.createObjList<Object_, Object_T>(
+      this.objects.bind(this),
+      this.objectsLength(),
+    );
+    _o.enums = this.bb!.createObjList<Enum, EnumT>(
+      this.enums.bind(this),
+      this.enumsLength(),
+    );
+    _o.fileIdent = this.fileIdent();
+    _o.fileExt = this.fileExt();
+    _o.rootTable =
+      this.rootTable() !== null ? this.rootTable()!.unpack() : null;
+    _o.services = this.bb!.createObjList<Service, ServiceT>(
+      this.services.bind(this),
+      this.servicesLength(),
+    );
+    _o.advancedFeatures = this.advancedFeatures();
+    _o.fbsFiles = this.bb!.createObjList<SchemaFile, SchemaFileT>(
+      this.fbsFiles.bind(this),
+      this.fbsFilesLength(),
+    );
+  }
 }
 
 export class SchemaT implements flatbuffers.IGeneratedObject {
-constructor(
-  public objects: (Object_T)[] = [],
-  public enums: (EnumT)[] = [],
-  public fileIdent: string|Uint8Array|null = null,
-  public fileExt: string|Uint8Array|null = null,
-  public rootTable: Object_T|null = null,
-  public services: (ServiceT)[] = [],
-  public advancedFeatures: bigint = BigInt('0'),
-  public fbsFiles: (SchemaFileT)[] = []
-){}
+  constructor(
+    public objects: Object_T[] = [],
+    public enums: EnumT[] = [],
+    public fileIdent: string | Uint8Array | null = null,
+    public fileExt: string | Uint8Array | null = null,
+    public rootTable: Object_T | null = null,
+    public services: ServiceT[] = [],
+    public advancedFeatures: bigint = BigInt('0'),
+    public fbsFiles: SchemaFileT[] = [],
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const objects = Schema.createObjectsVector(
+      builder,
+      builder.createObjectOffsetList(this.objects),
+    );
+    const enums = Schema.createEnumsVector(
+      builder,
+      builder.createObjectOffsetList(this.enums),
+    );
+    const fileIdent =
+      this.fileIdent !== null ? builder.createString(this.fileIdent!) : 0;
+    const fileExt =
+      this.fileExt !== null ? builder.createString(this.fileExt!) : 0;
+    const rootTable =
+      this.rootTable !== null ? this.rootTable!.pack(builder) : 0;
+    const services = Schema.createServicesVector(
+      builder,
+      builder.createObjectOffsetList(this.services),
+    );
+    const fbsFiles = Schema.createFbsFilesVector(
+      builder,
+      builder.createObjectOffsetList(this.fbsFiles),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const objects = Schema.createObjectsVector(builder, builder.createObjectOffsetList(this.objects));
-  const enums = Schema.createEnumsVector(builder, builder.createObjectOffsetList(this.enums));
-  const fileIdent = (this.fileIdent !== null ? builder.createString(this.fileIdent!) : 0);
-  const fileExt = (this.fileExt !== null ? builder.createString(this.fileExt!) : 0);
-  const rootTable = (this.rootTable !== null ? this.rootTable!.pack(builder) : 0);
-  const services = Schema.createServicesVector(builder, builder.createObjectOffsetList(this.services));
-  const fbsFiles = Schema.createFbsFilesVector(builder, builder.createObjectOffsetList(this.fbsFiles));
+    Schema.startSchema(builder);
+    Schema.addObjects(builder, objects);
+    Schema.addEnums(builder, enums);
+    Schema.addFileIdent(builder, fileIdent);
+    Schema.addFileExt(builder, fileExt);
+    Schema.addRootTable(builder, rootTable);
+    Schema.addServices(builder, services);
+    Schema.addAdvancedFeatures(builder, this.advancedFeatures);
+    Schema.addFbsFiles(builder, fbsFiles);
 
-  Schema.startSchema(builder);
-  Schema.addObjects(builder, objects);
-  Schema.addEnums(builder, enums);
-  Schema.addFileIdent(builder, fileIdent);
-  Schema.addFileExt(builder, fileExt);
-  Schema.addRootTable(builder, rootTable);
-  Schema.addServices(builder, services);
-  Schema.addAdvancedFeatures(builder, this.advancedFeatures);
-  Schema.addFbsFiles(builder, fbsFiles);
-
-  return Schema.endSchema(builder);
-}
+    return Schema.endSchema(builder);
+  }
 }
diff --git a/tests/ts/reflection/service.d.ts b/tests/ts/reflection/service.d.ts
index 6bea22b..bfe4181 100644
--- a/tests/ts/reflection/service.d.ts
+++ b/tests/ts/reflection/service.d.ts
@@ -1,50 +1,103 @@
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { RPCCall, RPCCallT } from '../reflection/rpccall.js';
-export declare class Service implements flatbuffers.IUnpackableObject<ServiceT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Service;
-    static getRootAsService(bb: flatbuffers.ByteBuffer, obj?: Service): Service;
-    static getSizePrefixedRootAsService(bb: flatbuffers.ByteBuffer, obj?: Service): Service;
-    name(): string | null;
-    name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    calls(index: number, obj?: RPCCall): RPCCall | null;
-    callsLength(): number;
-    attributes(index: number, obj?: KeyValue): KeyValue | null;
-    attributesLength(): number;
-    documentation(index: number): string;
-    documentation(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
-    documentationLength(): number;
-    /**
-     * File that this Service is declared in.
-     */
-    declarationFile(): string | null;
-    declarationFile(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    static getFullyQualifiedName(): string;
-    static startService(builder: flatbuffers.Builder): void;
-    static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
-    static addCalls(builder: flatbuffers.Builder, callsOffset: flatbuffers.Offset): void;
-    static createCallsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startCallsVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addAttributes(builder: flatbuffers.Builder, attributesOffset: flatbuffers.Offset): void;
-    static createAttributesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startAttributesVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDocumentation(builder: flatbuffers.Builder, documentationOffset: flatbuffers.Offset): void;
-    static createDocumentationVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startDocumentationVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addDeclarationFile(builder: flatbuffers.Builder, declarationFileOffset: flatbuffers.Offset): void;
-    static endService(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createService(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset, callsOffset: flatbuffers.Offset, attributesOffset: flatbuffers.Offset, documentationOffset: flatbuffers.Offset, declarationFileOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): ServiceT;
-    unpackTo(_o: ServiceT): void;
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {RPCCall, RPCCallT} from '../reflection/rpccall.js';
+export declare class Service
+  implements flatbuffers.IUnpackableObject<ServiceT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Service;
+  static getRootAsService(bb: flatbuffers.ByteBuffer, obj?: Service): Service;
+  static getSizePrefixedRootAsService(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Service,
+  ): Service;
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  calls(index: number, obj?: RPCCall): RPCCall | null;
+  callsLength(): number;
+  attributes(index: number, obj?: KeyValue): KeyValue | null;
+  attributesLength(): number;
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentationLength(): number;
+  /**
+   * File that this Service is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  static getFullyQualifiedName(): string;
+  static startService(builder: flatbuffers.Builder): void;
+  static addName(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+  ): void;
+  static addCalls(
+    builder: flatbuffers.Builder,
+    callsOffset: flatbuffers.Offset,
+  ): void;
+  static createCallsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startCallsVector(builder: flatbuffers.Builder, numElems: number): void;
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ): void;
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startAttributesVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ): void;
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ): void;
+  static endService(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createService(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    callsOffset: flatbuffers.Offset,
+    attributesOffset: flatbuffers.Offset,
+    documentationOffset: flatbuffers.Offset,
+    declarationFileOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): ServiceT;
+  unpackTo(_o: ServiceT): void;
 }
 export declare class ServiceT implements flatbuffers.IGeneratedObject {
-    name: string | Uint8Array | null;
-    calls: (RPCCallT)[];
-    attributes: (KeyValueT)[];
-    documentation: (string)[];
-    declarationFile: string | Uint8Array | null;
-    constructor(name?: string | Uint8Array | null, calls?: (RPCCallT)[], attributes?: (KeyValueT)[], documentation?: (string)[], declarationFile?: string | Uint8Array | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  name: string | Uint8Array | null;
+  calls: RPCCallT[];
+  attributes: KeyValueT[];
+  documentation: string[];
+  declarationFile: string | Uint8Array | null;
+  constructor(
+    name?: string | Uint8Array | null,
+    calls?: RPCCallT[],
+    attributes?: KeyValueT[],
+    documentation?: string[],
+    declarationFile?: string | Uint8Array | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/service.js b/tests/ts/reflection/service.js
index 0373c7d..5ce8815 100644
--- a/tests/ts/reflection/service.js
+++ b/tests/ts/reflection/service.js
@@ -1,147 +1,189 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { KeyValue } from '../reflection/key-value.js';
-import { RPCCall } from '../reflection/rpccall.js';
+
+import {KeyValue} from '../reflection/key-value.js';
+import {RPCCall} from '../reflection/rpccall.js';
+
 export class Service {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsService(bb, obj) {
+    return (obj || new Service())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsService(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Service())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  name(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  calls(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ?
+        (obj || new RPCCall())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  callsLength() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  attributes(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        (obj || new KeyValue())
+            .__init(
+                this.bb.__indirect(
+                    this.bb.__vector(this.bb_pos + offset) + index * 4),
+                this.bb) :
+        null;
+  }
+  attributesLength() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  documentation(index, optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__string(
+                        this.bb.__vector(this.bb_pos + offset) + index * 4,
+                        optionalEncoding) :
+                    null;
+  }
+  documentationLength() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  declarationFile(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Service';
+  }
+  static startService(builder) {
+    builder.startObject(5);
+  }
+  static addName(builder, nameOffset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+  static addCalls(builder, callsOffset) {
+    builder.addFieldOffset(1, callsOffset, 0);
+  }
+  static createCallsVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    return builder.endVector();
+  }
+  static startCallsVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addAttributes(builder, attributesOffset) {
+    builder.addFieldOffset(2, attributesOffset, 0);
+  }
+  static createAttributesVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsService(bb, obj) {
-        return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    return builder.endVector();
+  }
+  static startAttributesVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDocumentation(builder, documentationOffset) {
+    builder.addFieldOffset(3, documentationOffset, 0);
+  }
+  static createDocumentationVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getSizePrefixedRootAsService(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    name(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    calls(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? (obj || new RPCCall()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    callsLength() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    attributes(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
-    }
-    attributesLength() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    documentation(index, optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-    }
-    documentationLength() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    declarationFile(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Service';
-    }
-    static startService(builder) {
-        builder.startObject(5);
-    }
-    static addName(builder, nameOffset) {
-        builder.addFieldOffset(0, nameOffset, 0);
-    }
-    static addCalls(builder, callsOffset) {
-        builder.addFieldOffset(1, callsOffset, 0);
-    }
-    static createCallsVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startCallsVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addAttributes(builder, attributesOffset) {
-        builder.addFieldOffset(2, attributesOffset, 0);
-    }
-    static createAttributesVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startAttributesVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDocumentation(builder, documentationOffset) {
-        builder.addFieldOffset(3, documentationOffset, 0);
-    }
-    static createDocumentationVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startDocumentationVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addDeclarationFile(builder, declarationFileOffset) {
-        builder.addFieldOffset(4, declarationFileOffset, 0);
-    }
-    static endService(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // name
-        return offset;
-    }
-    static createService(builder, nameOffset, callsOffset, attributesOffset, documentationOffset, declarationFileOffset) {
-        Service.startService(builder);
-        Service.addName(builder, nameOffset);
-        Service.addCalls(builder, callsOffset);
-        Service.addAttributes(builder, attributesOffset);
-        Service.addDocumentation(builder, documentationOffset);
-        Service.addDeclarationFile(builder, declarationFileOffset);
-        return Service.endService(builder);
-    }
-    unpack() {
-        return new ServiceT(this.name(), this.bb.createObjList(this.calls.bind(this), this.callsLength()), this.bb.createObjList(this.attributes.bind(this), this.attributesLength()), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile());
-    }
-    unpackTo(_o) {
-        _o.name = this.name();
-        _o.calls = this.bb.createObjList(this.calls.bind(this), this.callsLength());
-        _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength());
-        _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength());
-        _o.declarationFile = this.declarationFile();
-    }
+    return builder.endVector();
+  }
+  static startDocumentationVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addDeclarationFile(builder, declarationFileOffset) {
+    builder.addFieldOffset(4, declarationFileOffset, 0);
+  }
+  static endService(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // name
+    return offset;
+  }
+  static createService(
+      builder, nameOffset, callsOffset, attributesOffset, documentationOffset,
+      declarationFileOffset) {
+    Service.startService(builder);
+    Service.addName(builder, nameOffset);
+    Service.addCalls(builder, callsOffset);
+    Service.addAttributes(builder, attributesOffset);
+    Service.addDocumentation(builder, documentationOffset);
+    Service.addDeclarationFile(builder, declarationFileOffset);
+    return Service.endService(builder);
+  }
+  unpack() {
+    return new ServiceT(
+        this.name(),
+        this.bb.createObjList(this.calls.bind(this), this.callsLength()),
+        this.bb.createObjList(
+            this.attributes.bind(this), this.attributesLength()),
+        this.bb.createScalarList(
+            this.documentation.bind(this), this.documentationLength()),
+        this.declarationFile());
+  }
+  unpackTo(_o) {
+    _o.name = this.name();
+    _o.calls = this.bb.createObjList(this.calls.bind(this), this.callsLength());
+    _o.attributes = this.bb.createObjList(
+        this.attributes.bind(this), this.attributesLength());
+    _o.documentation = this.bb.createScalarList(
+        this.documentation.bind(this), this.documentationLength());
+    _o.declarationFile = this.declarationFile();
+  }
 }
 export class ServiceT {
-    constructor(name = null, calls = [], attributes = [], documentation = [], declarationFile = null) {
-        this.name = name;
-        this.calls = calls;
-        this.attributes = attributes;
-        this.documentation = documentation;
-        this.declarationFile = declarationFile;
-    }
-    pack(builder) {
-        const name = (this.name !== null ? builder.createString(this.name) : 0);
-        const calls = Service.createCallsVector(builder, builder.createObjectOffsetList(this.calls));
-        const attributes = Service.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-        const documentation = Service.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-        const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile) : 0);
-        return Service.createService(builder, name, calls, attributes, documentation, declarationFile);
-    }
+  constructor(
+      name = null, calls = [], attributes = [], documentation = [],
+      declarationFile = null) {
+    this.name = name;
+    this.calls = calls;
+    this.attributes = attributes;
+    this.documentation = documentation;
+    this.declarationFile = declarationFile;
+  }
+  pack(builder) {
+    const name = (this.name !== null ? builder.createString(this.name) : 0);
+    const calls = Service.createCallsVector(
+        builder, builder.createObjectOffsetList(this.calls));
+    const attributes = Service.createAttributesVector(
+        builder, builder.createObjectOffsetList(this.attributes));
+    const documentation = Service.createDocumentationVector(
+        builder, builder.createObjectOffsetList(this.documentation));
+    const declarationFile =
+        (this.declarationFile !== null ?
+             builder.createString(this.declarationFile) :
+             0);
+    return Service.createService(
+        builder, name, calls, attributes, documentation, declarationFile);
+  }
 }
diff --git a/tests/ts/reflection/service.ts b/tests/ts/reflection/service.ts
index 2c2c62d..49afdff 100644
--- a/tests/ts/reflection/service.ts
+++ b/tests/ts/reflection/service.ts
@@ -4,200 +4,299 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { KeyValue, KeyValueT } from '../reflection/key-value.js';
-import { RPCCall, RPCCallT } from '../reflection/rpccall.js';
-
+import {KeyValue, KeyValueT} from '../reflection/key-value.js';
+import {RPCCall, RPCCallT} from '../reflection/rpccall.js';
 
 export class Service implements flatbuffers.IUnpackableObject<ServiceT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Service {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsService(bb:flatbuffers.ByteBuffer, obj?:Service):Service {
-  return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsService(bb:flatbuffers.ByteBuffer, obj?:Service):Service {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Service()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-name():string|null
-name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-name(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-calls(index: number, obj?:RPCCall):RPCCall|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? (obj || new RPCCall()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-callsLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-attributes(index: number, obj?:KeyValue):KeyValue|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
-}
-
-attributesLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-documentation(index: number):string
-documentation(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
-documentation(index: number,optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
-}
-
-documentationLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-/**
- * File that this Service is declared in.
- */
-declarationFile():string|null
-declarationFile(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-declarationFile(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
-
-static getFullyQualifiedName():string {
-  return 'reflection.Service';
-}
-
-static startService(builder:flatbuffers.Builder) {
-  builder.startObject(5);
-}
-
-static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, nameOffset, 0);
-}
-
-static addCalls(builder:flatbuffers.Builder, callsOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, callsOffset, 0);
-}
-
-static createCallsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  __init(i: number, bb: flatbuffers.ByteBuffer): Service {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
-  return builder.endVector();
-}
 
-static startCallsVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(2, attributesOffset, 0);
-}
-
-static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsService(bb: flatbuffers.ByteBuffer, obj?: Service): Service {
+    return (obj || new Service()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startAttributesVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addDocumentation(builder:flatbuffers.Builder, documentationOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, documentationOffset, 0);
-}
-
-static createDocumentationVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getSizePrefixedRootAsService(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Service,
+  ): Service {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Service()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  name(): string | null;
+  name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  name(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-static addDeclarationFile(builder:flatbuffers.Builder, declarationFileOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(4, declarationFileOffset, 0);
-}
+  calls(index: number, obj?: RPCCall): RPCCall | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? (obj || new RPCCall()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-static endService(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // name
-  return offset;
-}
+  callsLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
-static createService(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, callsOffset:flatbuffers.Offset, attributesOffset:flatbuffers.Offset, documentationOffset:flatbuffers.Offset, declarationFileOffset:flatbuffers.Offset):flatbuffers.Offset {
-  Service.startService(builder);
-  Service.addName(builder, nameOffset);
-  Service.addCalls(builder, callsOffset);
-  Service.addAttributes(builder, attributesOffset);
-  Service.addDocumentation(builder, documentationOffset);
-  Service.addDeclarationFile(builder, declarationFileOffset);
-  return Service.endService(builder);
-}
+  attributes(index: number, obj?: KeyValue): KeyValue | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? (obj || new KeyValue()).__init(
+          this.bb!.__indirect(
+            this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          ),
+          this.bb!,
+        )
+      : null;
+  }
 
-unpack(): ServiceT {
-  return new ServiceT(
-    this.name(),
-    this.bb!.createObjList<RPCCall, RPCCallT>(this.calls.bind(this), this.callsLength()),
-    this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength()),
-    this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength()),
-    this.declarationFile()
-  );
-}
+  attributesLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
 
+  documentation(index: number): string;
+  documentation(
+    index: number,
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array;
+  documentation(
+    index: number,
+    optionalEncoding?: any,
+  ): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? this.bb!.__string(
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+          optionalEncoding,
+        )
+      : null;
+  }
 
-unpackTo(_o: ServiceT): void {
-  _o.name = this.name();
-  _o.calls = this.bb!.createObjList<RPCCall, RPCCallT>(this.calls.bind(this), this.callsLength());
-  _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(this.attributes.bind(this), this.attributesLength());
-  _o.documentation = this.bb!.createScalarList<string>(this.documentation.bind(this), this.documentationLength());
-  _o.declarationFile = this.declarationFile();
-}
+  documentationLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  /**
+   * File that this Service is declared in.
+   */
+  declarationFile(): string | null;
+  declarationFile(
+    optionalEncoding: flatbuffers.Encoding,
+  ): string | Uint8Array | null;
+  declarationFile(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Service';
+  }
+
+  static startService(builder: flatbuffers.Builder) {
+    builder.startObject(5);
+  }
+
+  static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, nameOffset, 0);
+  }
+
+  static addCalls(
+    builder: flatbuffers.Builder,
+    callsOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, callsOffset, 0);
+  }
+
+  static createCallsVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startCallsVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addAttributes(
+    builder: flatbuffers.Builder,
+    attributesOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(2, attributesOffset, 0);
+  }
+
+  static createAttributesVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startAttributesVector(builder: flatbuffers.Builder, numElems: number) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDocumentation(
+    builder: flatbuffers.Builder,
+    documentationOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, documentationOffset, 0);
+  }
+
+  static createDocumentationVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
+    }
+    return builder.endVector();
+  }
+
+  static startDocumentationVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static addDeclarationFile(
+    builder: flatbuffers.Builder,
+    declarationFileOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(4, declarationFileOffset, 0);
+  }
+
+  static endService(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // name
+    return offset;
+  }
+
+  static createService(
+    builder: flatbuffers.Builder,
+    nameOffset: flatbuffers.Offset,
+    callsOffset: flatbuffers.Offset,
+    attributesOffset: flatbuffers.Offset,
+    documentationOffset: flatbuffers.Offset,
+    declarationFileOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    Service.startService(builder);
+    Service.addName(builder, nameOffset);
+    Service.addCalls(builder, callsOffset);
+    Service.addAttributes(builder, attributesOffset);
+    Service.addDocumentation(builder, documentationOffset);
+    Service.addDeclarationFile(builder, declarationFileOffset);
+    return Service.endService(builder);
+  }
+
+  unpack(): ServiceT {
+    return new ServiceT(
+      this.name(),
+      this.bb!.createObjList<RPCCall, RPCCallT>(
+        this.calls.bind(this),
+        this.callsLength(),
+      ),
+      this.bb!.createObjList<KeyValue, KeyValueT>(
+        this.attributes.bind(this),
+        this.attributesLength(),
+      ),
+      this.bb!.createScalarList<string>(
+        this.documentation.bind(this),
+        this.documentationLength(),
+      ),
+      this.declarationFile(),
+    );
+  }
+
+  unpackTo(_o: ServiceT): void {
+    _o.name = this.name();
+    _o.calls = this.bb!.createObjList<RPCCall, RPCCallT>(
+      this.calls.bind(this),
+      this.callsLength(),
+    );
+    _o.attributes = this.bb!.createObjList<KeyValue, KeyValueT>(
+      this.attributes.bind(this),
+      this.attributesLength(),
+    );
+    _o.documentation = this.bb!.createScalarList<string>(
+      this.documentation.bind(this),
+      this.documentationLength(),
+    );
+    _o.declarationFile = this.declarationFile();
+  }
 }
 
 export class ServiceT implements flatbuffers.IGeneratedObject {
-constructor(
-  public name: string|Uint8Array|null = null,
-  public calls: (RPCCallT)[] = [],
-  public attributes: (KeyValueT)[] = [],
-  public documentation: (string)[] = [],
-  public declarationFile: string|Uint8Array|null = null
-){}
+  constructor(
+    public name: string | Uint8Array | null = null,
+    public calls: RPCCallT[] = [],
+    public attributes: KeyValueT[] = [],
+    public documentation: string[] = [],
+    public declarationFile: string | Uint8Array | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const name = this.name !== null ? builder.createString(this.name!) : 0;
+    const calls = Service.createCallsVector(
+      builder,
+      builder.createObjectOffsetList(this.calls),
+    );
+    const attributes = Service.createAttributesVector(
+      builder,
+      builder.createObjectOffsetList(this.attributes),
+    );
+    const documentation = Service.createDocumentationVector(
+      builder,
+      builder.createObjectOffsetList(this.documentation),
+    );
+    const declarationFile =
+      this.declarationFile !== null
+        ? builder.createString(this.declarationFile!)
+        : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const name = (this.name !== null ? builder.createString(this.name!) : 0);
-  const calls = Service.createCallsVector(builder, builder.createObjectOffsetList(this.calls));
-  const attributes = Service.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes));
-  const documentation = Service.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation));
-  const declarationFile = (this.declarationFile !== null ? builder.createString(this.declarationFile!) : 0);
-
-  return Service.createService(builder,
-    name,
-    calls,
-    attributes,
-    documentation,
-    declarationFile
-  );
-}
+    return Service.createService(
+      builder,
+      name,
+      calls,
+      attributes,
+      documentation,
+      declarationFile,
+    );
+  }
 }
diff --git a/tests/ts/reflection/type.d.ts b/tests/ts/reflection/type.d.ts
index 811732c..ce080e9 100644
--- a/tests/ts/reflection/type.d.ts
+++ b/tests/ts/reflection/type.d.ts
@@ -1,49 +1,73 @@
 import * as flatbuffers from 'flatbuffers';
-import { BaseType } from '../reflection/base-type.js';
+import {BaseType} from '../reflection/base-type.js';
 export declare class Type implements flatbuffers.IUnpackableObject<TypeT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Type;
-    static getRootAsType(bb: flatbuffers.ByteBuffer, obj?: Type): Type;
-    static getSizePrefixedRootAsType(bb: flatbuffers.ByteBuffer, obj?: Type): Type;
-    baseType(): BaseType;
-    mutate_base_type(value: BaseType): boolean;
-    element(): BaseType;
-    mutate_element(value: BaseType): boolean;
-    index(): number;
-    mutate_index(value: number): boolean;
-    fixedLength(): number;
-    mutate_fixed_length(value: number): boolean;
-    /**
-     * The size (octets) of the `base_type` field.
-     */
-    baseSize(): number;
-    mutate_base_size(value: number): boolean;
-    /**
-     * The size (octets) of the `element` field, if present.
-     */
-    elementSize(): number;
-    mutate_element_size(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startType(builder: flatbuffers.Builder): void;
-    static addBaseType(builder: flatbuffers.Builder, baseType: BaseType): void;
-    static addElement(builder: flatbuffers.Builder, element: BaseType): void;
-    static addIndex(builder: flatbuffers.Builder, index: number): void;
-    static addFixedLength(builder: flatbuffers.Builder, fixedLength: number): void;
-    static addBaseSize(builder: flatbuffers.Builder, baseSize: number): void;
-    static addElementSize(builder: flatbuffers.Builder, elementSize: number): void;
-    static endType(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createType(builder: flatbuffers.Builder, baseType: BaseType, element: BaseType, index: number, fixedLength: number, baseSize: number, elementSize: number): flatbuffers.Offset;
-    unpack(): TypeT;
-    unpackTo(_o: TypeT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Type;
+  static getRootAsType(bb: flatbuffers.ByteBuffer, obj?: Type): Type;
+  static getSizePrefixedRootAsType(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Type,
+  ): Type;
+  baseType(): BaseType;
+  mutate_base_type(value: BaseType): boolean;
+  element(): BaseType;
+  mutate_element(value: BaseType): boolean;
+  index(): number;
+  mutate_index(value: number): boolean;
+  fixedLength(): number;
+  mutate_fixed_length(value: number): boolean;
+  /**
+   * The size (octets) of the `base_type` field.
+   */
+  baseSize(): number;
+  mutate_base_size(value: number): boolean;
+  /**
+   * The size (octets) of the `element` field, if present.
+   */
+  elementSize(): number;
+  mutate_element_size(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startType(builder: flatbuffers.Builder): void;
+  static addBaseType(builder: flatbuffers.Builder, baseType: BaseType): void;
+  static addElement(builder: flatbuffers.Builder, element: BaseType): void;
+  static addIndex(builder: flatbuffers.Builder, index: number): void;
+  static addFixedLength(
+    builder: flatbuffers.Builder,
+    fixedLength: number,
+  ): void;
+  static addBaseSize(builder: flatbuffers.Builder, baseSize: number): void;
+  static addElementSize(
+    builder: flatbuffers.Builder,
+    elementSize: number,
+  ): void;
+  static endType(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createType(
+    builder: flatbuffers.Builder,
+    baseType: BaseType,
+    element: BaseType,
+    index: number,
+    fixedLength: number,
+    baseSize: number,
+    elementSize: number,
+  ): flatbuffers.Offset;
+  unpack(): TypeT;
+  unpackTo(_o: TypeT): void;
 }
 export declare class TypeT implements flatbuffers.IGeneratedObject {
-    baseType: BaseType;
-    element: BaseType;
-    index: number;
-    fixedLength: number;
-    baseSize: number;
-    elementSize: number;
-    constructor(baseType?: BaseType, element?: BaseType, index?: number, fixedLength?: number, baseSize?: number, elementSize?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  baseType: BaseType;
+  element: BaseType;
+  index: number;
+  fixedLength: number;
+  baseSize: number;
+  elementSize: number;
+  constructor(
+    baseType?: BaseType,
+    element?: BaseType,
+    index?: number,
+    fixedLength?: number,
+    baseSize?: number,
+    elementSize?: number,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/reflection/type.js b/tests/ts/reflection/type.js
index fc5f0e0..c5ab963 100644
--- a/tests/ts/reflection/type.js
+++ b/tests/ts/reflection/type.js
@@ -1,162 +1,174 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { BaseType } from '../reflection/base-type.js';
+
+import {BaseType} from '../reflection/base-type.js';
+
 export class Type {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsType(bb, obj) {
+    return (obj || new Type())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsType(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Type())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  baseType() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : BaseType.None;
+  }
+  mutate_base_type(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt8(this.bb_pos + offset, value);
+    return true;
+  }
+  element() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt8(this.bb_pos + offset) : BaseType.None;
+  }
+  mutate_element(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsType(bb, obj) {
-        return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt8(this.bb_pos + offset, value);
+    return true;
+  }
+  index() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : -1;
+  }
+  mutate_index(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsType(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  fixedLength() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
+  }
+  mutate_fixed_length(value) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    if (offset === 0) {
+      return false;
     }
-    baseType() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : BaseType.None;
+    this.bb.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
+  /**
+   * The size (octets) of the `base_type` field.
+   */
+  baseSize() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 4;
+  }
+  mutate_base_size(value) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    if (offset === 0) {
+      return false;
     }
-    mutate_base_type(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+  /**
+   * The size (octets) of the `element` field, if present.
+   */
+  elementSize() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
+  }
+  mutate_element_size(value) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    if (offset === 0) {
+      return false;
     }
-    element() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt8(this.bb_pos + offset) : BaseType.None;
-    }
-    mutate_element(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, value);
-        return true;
-    }
-    index() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : -1;
-    }
-    mutate_index(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    fixedLength() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
-    }
-    mutate_fixed_length(value) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint16(this.bb_pos + offset, value);
-        return true;
-    }
-    /**
-     * The size (octets) of the `base_type` field.
-     */
-    baseSize() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 4;
-    }
-    mutate_base_size(value) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint32(this.bb_pos + offset, value);
-        return true;
-    }
-    /**
-     * The size (octets) of the `element` field, if present.
-     */
-    elementSize() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
-    }
-    mutate_element_size(value) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeUint32(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'reflection.Type';
-    }
-    static startType(builder) {
-        builder.startObject(6);
-    }
-    static addBaseType(builder, baseType) {
-        builder.addFieldInt8(0, baseType, BaseType.None);
-    }
-    static addElement(builder, element) {
-        builder.addFieldInt8(1, element, BaseType.None);
-    }
-    static addIndex(builder, index) {
-        builder.addFieldInt32(2, index, -1);
-    }
-    static addFixedLength(builder, fixedLength) {
-        builder.addFieldInt16(3, fixedLength, 0);
-    }
-    static addBaseSize(builder, baseSize) {
-        builder.addFieldInt32(4, baseSize, 4);
-    }
-    static addElementSize(builder, elementSize) {
-        builder.addFieldInt32(5, elementSize, 0);
-    }
-    static endType(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createType(builder, baseType, element, index, fixedLength, baseSize, elementSize) {
-        Type.startType(builder);
-        Type.addBaseType(builder, baseType);
-        Type.addElement(builder, element);
-        Type.addIndex(builder, index);
-        Type.addFixedLength(builder, fixedLength);
-        Type.addBaseSize(builder, baseSize);
-        Type.addElementSize(builder, elementSize);
-        return Type.endType(builder);
-    }
-    unpack() {
-        return new TypeT(this.baseType(), this.element(), this.index(), this.fixedLength(), this.baseSize(), this.elementSize());
-    }
-    unpackTo(_o) {
-        _o.baseType = this.baseType();
-        _o.element = this.element();
-        _o.index = this.index();
-        _o.fixedLength = this.fixedLength();
-        _o.baseSize = this.baseSize();
-        _o.elementSize = this.elementSize();
-    }
+    this.bb.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'reflection.Type';
+  }
+  static startType(builder) {
+    builder.startObject(6);
+  }
+  static addBaseType(builder, baseType) {
+    builder.addFieldInt8(0, baseType, BaseType.None);
+  }
+  static addElement(builder, element) {
+    builder.addFieldInt8(1, element, BaseType.None);
+  }
+  static addIndex(builder, index) {
+    builder.addFieldInt32(2, index, -1);
+  }
+  static addFixedLength(builder, fixedLength) {
+    builder.addFieldInt16(3, fixedLength, 0);
+  }
+  static addBaseSize(builder, baseSize) {
+    builder.addFieldInt32(4, baseSize, 4);
+  }
+  static addElementSize(builder, elementSize) {
+    builder.addFieldInt32(5, elementSize, 0);
+  }
+  static endType(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createType(
+      builder, baseType, element, index, fixedLength, baseSize, elementSize) {
+    Type.startType(builder);
+    Type.addBaseType(builder, baseType);
+    Type.addElement(builder, element);
+    Type.addIndex(builder, index);
+    Type.addFixedLength(builder, fixedLength);
+    Type.addBaseSize(builder, baseSize);
+    Type.addElementSize(builder, elementSize);
+    return Type.endType(builder);
+  }
+  unpack() {
+    return new TypeT(
+        this.baseType(), this.element(), this.index(), this.fixedLength(),
+        this.baseSize(), this.elementSize());
+  }
+  unpackTo(_o) {
+    _o.baseType = this.baseType();
+    _o.element = this.element();
+    _o.index = this.index();
+    _o.fixedLength = this.fixedLength();
+    _o.baseSize = this.baseSize();
+    _o.elementSize = this.elementSize();
+  }
 }
 export class TypeT {
-    constructor(baseType = BaseType.None, element = BaseType.None, index = -1, fixedLength = 0, baseSize = 4, elementSize = 0) {
-        this.baseType = baseType;
-        this.element = element;
-        this.index = index;
-        this.fixedLength = fixedLength;
-        this.baseSize = baseSize;
-        this.elementSize = elementSize;
-    }
-    pack(builder) {
-        return Type.createType(builder, this.baseType, this.element, this.index, this.fixedLength, this.baseSize, this.elementSize);
-    }
+  constructor(
+      baseType = BaseType.None, element = BaseType.None, index = -1,
+      fixedLength = 0, baseSize = 4, elementSize = 0) {
+    this.baseType = baseType;
+    this.element = element;
+    this.index = index;
+    this.fixedLength = fixedLength;
+    this.baseSize = baseSize;
+    this.elementSize = elementSize;
+  }
+  pack(builder) {
+    return Type.createType(
+        builder, this.baseType, this.element, this.index, this.fixedLength,
+        this.baseSize, this.elementSize);
+  }
 }
diff --git a/tests/ts/reflection/type.ts b/tests/ts/reflection/type.ts
index c6dfb92..214fceb 100644
--- a/tests/ts/reflection/type.ts
+++ b/tests/ts/reflection/type.ts
@@ -4,218 +4,233 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { BaseType } from '../reflection/base-type.js';
-
+import {BaseType} from '../reflection/base-type.js';
 
 export class Type implements flatbuffers.IUnpackableObject<TypeT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Type {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsType(bb:flatbuffers.ByteBuffer, obj?:Type):Type {
-  return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsType(bb:flatbuffers.ByteBuffer, obj?:Type):Type {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Type()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-baseType():BaseType {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
-}
-
-mutate_base_type(value:BaseType):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Type {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, value);
-  return true;
-}
-
-element():BaseType {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
-}
-
-mutate_element(value:BaseType):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-
-  if (offset === 0) {
-    return false;
+  static getRootAsType(bb: flatbuffers.ByteBuffer, obj?: Type): Type {
+    return (obj || new Type()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, value);
-  return true;
-}
-
-index():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : -1;
-}
-
-mutate_index(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-
-  if (offset === 0) {
-    return false;
+  static getSizePrefixedRootAsType(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Type,
+  ): Type {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Type()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-fixedLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
-}
-
-mutate_fixed_length(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-
-  if (offset === 0) {
-    return false;
+  baseType(): BaseType {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
   }
 
-  this.bb!.writeUint16(this.bb_pos + offset, value);
-  return true;
-}
+  mutate_base_type(value: BaseType): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
 
-/**
- * The size (octets) of the `base_type` field.
- */
-baseSize():number {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.readUint32(this.bb_pos + offset) : 4;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-mutate_base_size(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-
-  if (offset === 0) {
-    return false;
+    this.bb!.writeInt8(this.bb_pos + offset, value);
+    return true;
   }
 
-  this.bb!.writeUint32(this.bb_pos + offset, value);
-  return true;
-}
-
-/**
- * The size (octets) of the `element` field, if present.
- */
-elementSize():number {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
-}
-
-mutate_element_size(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-
-  if (offset === 0) {
-    return false;
+  element(): BaseType {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt8(this.bb_pos + offset) : BaseType.None;
   }
 
-  this.bb!.writeUint32(this.bb_pos + offset, value);
-  return true;
-}
+  mutate_element(value: BaseType): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
 
-static getFullyQualifiedName():string {
-  return 'reflection.Type';
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static startType(builder:flatbuffers.Builder) {
-  builder.startObject(6);
-}
+    this.bb!.writeInt8(this.bb_pos + offset, value);
+    return true;
+  }
 
-static addBaseType(builder:flatbuffers.Builder, baseType:BaseType) {
-  builder.addFieldInt8(0, baseType, BaseType.None);
-}
+  index(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : -1;
+  }
 
-static addElement(builder:flatbuffers.Builder, element:BaseType) {
-  builder.addFieldInt8(1, element, BaseType.None);
-}
+  mutate_index(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
 
-static addIndex(builder:flatbuffers.Builder, index:number) {
-  builder.addFieldInt32(2, index, -1);
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static addFixedLength(builder:flatbuffers.Builder, fixedLength:number) {
-  builder.addFieldInt16(3, fixedLength, 0);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-static addBaseSize(builder:flatbuffers.Builder, baseSize:number) {
-  builder.addFieldInt32(4, baseSize, 4);
-}
+  fixedLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
+  }
 
-static addElementSize(builder:flatbuffers.Builder, elementSize:number) {
-  builder.addFieldInt32(5, elementSize, 0);
-}
+  mutate_fixed_length(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
 
-static endType(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static createType(builder:flatbuffers.Builder, baseType:BaseType, element:BaseType, index:number, fixedLength:number, baseSize:number, elementSize:number):flatbuffers.Offset {
-  Type.startType(builder);
-  Type.addBaseType(builder, baseType);
-  Type.addElement(builder, element);
-  Type.addIndex(builder, index);
-  Type.addFixedLength(builder, fixedLength);
-  Type.addBaseSize(builder, baseSize);
-  Type.addElementSize(builder, elementSize);
-  return Type.endType(builder);
-}
+    this.bb!.writeUint16(this.bb_pos + offset, value);
+    return true;
+  }
 
-unpack(): TypeT {
-  return new TypeT(
-    this.baseType(),
-    this.element(),
-    this.index(),
-    this.fixedLength(),
-    this.baseSize(),
-    this.elementSize()
-  );
-}
+  /**
+   * The size (octets) of the `base_type` field.
+   */
+  baseSize(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset ? this.bb!.readUint32(this.bb_pos + offset) : 4;
+  }
 
+  mutate_base_size(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
 
-unpackTo(_o: TypeT): void {
-  _o.baseType = this.baseType();
-  _o.element = this.element();
-  _o.index = this.index();
-  _o.fixedLength = this.fixedLength();
-  _o.baseSize = this.baseSize();
-  _o.elementSize = this.elementSize();
-}
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+
+  /**
+   * The size (octets) of the `element` field, if present.
+   */
+  elementSize(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
+  }
+
+  mutate_element_size(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeUint32(this.bb_pos + offset, value);
+    return true;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'reflection.Type';
+  }
+
+  static startType(builder: flatbuffers.Builder) {
+    builder.startObject(6);
+  }
+
+  static addBaseType(builder: flatbuffers.Builder, baseType: BaseType) {
+    builder.addFieldInt8(0, baseType, BaseType.None);
+  }
+
+  static addElement(builder: flatbuffers.Builder, element: BaseType) {
+    builder.addFieldInt8(1, element, BaseType.None);
+  }
+
+  static addIndex(builder: flatbuffers.Builder, index: number) {
+    builder.addFieldInt32(2, index, -1);
+  }
+
+  static addFixedLength(builder: flatbuffers.Builder, fixedLength: number) {
+    builder.addFieldInt16(3, fixedLength, 0);
+  }
+
+  static addBaseSize(builder: flatbuffers.Builder, baseSize: number) {
+    builder.addFieldInt32(4, baseSize, 4);
+  }
+
+  static addElementSize(builder: flatbuffers.Builder, elementSize: number) {
+    builder.addFieldInt32(5, elementSize, 0);
+  }
+
+  static endType(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  static createType(
+    builder: flatbuffers.Builder,
+    baseType: BaseType,
+    element: BaseType,
+    index: number,
+    fixedLength: number,
+    baseSize: number,
+    elementSize: number,
+  ): flatbuffers.Offset {
+    Type.startType(builder);
+    Type.addBaseType(builder, baseType);
+    Type.addElement(builder, element);
+    Type.addIndex(builder, index);
+    Type.addFixedLength(builder, fixedLength);
+    Type.addBaseSize(builder, baseSize);
+    Type.addElementSize(builder, elementSize);
+    return Type.endType(builder);
+  }
+
+  unpack(): TypeT {
+    return new TypeT(
+      this.baseType(),
+      this.element(),
+      this.index(),
+      this.fixedLength(),
+      this.baseSize(),
+      this.elementSize(),
+    );
+  }
+
+  unpackTo(_o: TypeT): void {
+    _o.baseType = this.baseType();
+    _o.element = this.element();
+    _o.index = this.index();
+    _o.fixedLength = this.fixedLength();
+    _o.baseSize = this.baseSize();
+    _o.elementSize = this.elementSize();
+  }
 }
 
 export class TypeT implements flatbuffers.IGeneratedObject {
-constructor(
-  public baseType: BaseType = BaseType.None,
-  public element: BaseType = BaseType.None,
-  public index: number = -1,
-  public fixedLength: number = 0,
-  public baseSize: number = 4,
-  public elementSize: number = 0
-){}
+  constructor(
+    public baseType: BaseType = BaseType.None,
+    public element: BaseType = BaseType.None,
+    public index: number = -1,
+    public fixedLength: number = 0,
+    public baseSize: number = 4,
+    public elementSize: number = 0,
+  ) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return Type.createType(builder,
-    this.baseType,
-    this.element,
-    this.index,
-    this.fixedLength,
-    this.baseSize,
-    this.elementSize
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return Type.createType(
+      builder,
+      this.baseType,
+      this.element,
+      this.index,
+      this.fixedLength,
+      this.baseSize,
+      this.elementSize,
+    );
+  }
 }
diff --git a/tests/ts/required-strings/foo.js b/tests/ts/required-strings/foo.js
index 774fcca..4b7076e 100644
--- a/tests/ts/required-strings/foo.js
+++ b/tests/ts/required-strings/foo.js
@@ -1,49 +1,53 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 import * as flatbuffers from 'flatbuffers';
 export class Foo {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsFoo(bb, obj) {
-        return (obj || new Foo()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsFoo(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Foo()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    strA(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    strB(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static startFoo(builder) {
-        builder.startObject(2);
-    }
-    static addStrA(builder, strAOffset) {
-        builder.addFieldOffset(0, strAOffset, 0);
-    }
-    static addStrB(builder, strBOffset) {
-        builder.addFieldOffset(1, strBOffset, 0);
-    }
-    static endFoo(builder) {
-        const offset = builder.endObject();
-        builder.requiredField(offset, 4); // str_a
-        builder.requiredField(offset, 6); // str_b
-        return offset;
-    }
-    static createFoo(builder, strAOffset, strBOffset) {
-        Foo.startFoo(builder);
-        Foo.addStrA(builder, strAOffset);
-        Foo.addStrB(builder, strBOffset);
-        return Foo.endFoo(builder);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsFoo(bb, obj) {
+    return (obj || new Foo())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsFoo(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Foo())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  strA(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  strB(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static startFoo(builder) {
+    builder.startObject(2);
+  }
+  static addStrA(builder, strAOffset) {
+    builder.addFieldOffset(0, strAOffset, 0);
+  }
+  static addStrB(builder, strBOffset) {
+    builder.addFieldOffset(1, strBOffset, 0);
+  }
+  static endFoo(builder) {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4);  // str_a
+    builder.requiredField(offset, 6);  // str_b
+    return offset;
+  }
+  static createFoo(builder, strAOffset, strBOffset) {
+    Foo.startFoo(builder);
+    Foo.addStrA(builder, strAOffset);
+    Foo.addStrB(builder, strBOffset);
+    return Foo.endFoo(builder);
+  }
 }
diff --git a/tests/ts/required-strings/foo.ts b/tests/ts/required-strings/foo.ts
index 8ae6666..95a54c9 100644
--- a/tests/ts/required-strings/foo.ts
+++ b/tests/ts/required-strings/foo.ts
@@ -3,60 +3,74 @@
 import * as flatbuffers from 'flatbuffers';
 
 export class Foo {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Foo {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): Foo {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsFoo(bb:flatbuffers.ByteBuffer, obj?:Foo):Foo {
-  return (obj || new Foo()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsFoo(bb: flatbuffers.ByteBuffer, obj?: Foo): Foo {
+    return (obj || new Foo()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsFoo(bb:flatbuffers.ByteBuffer, obj?:Foo):Foo {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Foo()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsFoo(bb: flatbuffers.ByteBuffer, obj?: Foo): Foo {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Foo()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-strA():string|null
-strA(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-strA(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  strA(): string | null;
+  strA(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  strA(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-strB():string|null
-strB(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-strB(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  strB(): string | null;
+  strB(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  strB(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-static startFoo(builder:flatbuffers.Builder) {
-  builder.startObject(2);
-}
+  static startFoo(builder: flatbuffers.Builder) {
+    builder.startObject(2);
+  }
 
-static addStrA(builder:flatbuffers.Builder, strAOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, strAOffset, 0);
-}
+  static addStrA(builder: flatbuffers.Builder, strAOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, strAOffset, 0);
+  }
 
-static addStrB(builder:flatbuffers.Builder, strBOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, strBOffset, 0);
-}
+  static addStrB(builder: flatbuffers.Builder, strBOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(1, strBOffset, 0);
+  }
 
-static endFoo(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  builder.requiredField(offset, 4) // str_a
-  builder.requiredField(offset, 6) // str_b
-  return offset;
-}
+  static endFoo(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    builder.requiredField(offset, 4); // str_a
+    builder.requiredField(offset, 6); // str_b
+    return offset;
+  }
 
-static createFoo(builder:flatbuffers.Builder, strAOffset:flatbuffers.Offset, strBOffset:flatbuffers.Offset):flatbuffers.Offset {
-  Foo.startFoo(builder);
-  Foo.addStrA(builder, strAOffset);
-  Foo.addStrB(builder, strBOffset);
-  return Foo.endFoo(builder);
-}
+  static createFoo(
+    builder: flatbuffers.Builder,
+    strAOffset: flatbuffers.Offset,
+    strBOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    Foo.startFoo(builder);
+    Foo.addStrA(builder, strAOffset);
+    Foo.addStrB(builder, strBOffset);
+    return Foo.endFoo(builder);
+  }
 }
diff --git a/tests/ts/required_strings_generated.js b/tests/ts/required_strings_generated.js
index 9f9cf01..a423145 100644
--- a/tests/ts/required_strings_generated.js
+++ b/tests/ts/required_strings_generated.js
@@ -1,2 +1,2 @@
-"use strict";
+'use strict';
 // automatically generated by the FlatBuffers compiler, do not modify
diff --git a/tests/ts/required_strings_generated.ts b/tests/ts/required_strings_generated.ts
index b7d545f..c51a21d 100644
--- a/tests/ts/required_strings_generated.ts
+++ b/tests/ts/required_strings_generated.ts
@@ -1,2 +1 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-
diff --git a/tests/ts/table-a.d.ts b/tests/ts/table-a.d.ts
index f670835..009a186 100644
--- a/tests/ts/table-a.d.ts
+++ b/tests/ts/table-a.d.ts
@@ -1,24 +1,30 @@
 import * as flatbuffers from 'flatbuffers';
-import { TableB, TableBT } from './my-game/other-name-space/table-b.js';
+import {TableB, TableBT} from './my-game/other-name-space/table-b.js';
 export declare class TableA implements flatbuffers.IUnpackableObject<TableAT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): TableA;
-    static getRootAsTableA(bb: flatbuffers.ByteBuffer, obj?: TableA): TableA;
-    static getSizePrefixedRootAsTableA(bb: flatbuffers.ByteBuffer, obj?: TableA): TableA;
-    b(obj?: TableB): TableB | null;
-    static getFullyQualifiedName(): string;
-    static startTableA(builder: flatbuffers.Builder): void;
-    static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): void;
-    static endTableA(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createTableA(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): flatbuffers.Offset;
-    serialize(): Uint8Array;
-    static deserialize(buffer: Uint8Array): TableA;
-    unpack(): TableAT;
-    unpackTo(_o: TableAT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): TableA;
+  static getRootAsTableA(bb: flatbuffers.ByteBuffer, obj?: TableA): TableA;
+  static getSizePrefixedRootAsTableA(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TableA,
+  ): TableA;
+  b(obj?: TableB): TableB | null;
+  static getFullyQualifiedName(): string;
+  static startTableA(builder: flatbuffers.Builder): void;
+  static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): void;
+  static endTableA(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createTableA(
+    builder: flatbuffers.Builder,
+    bOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  serialize(): Uint8Array;
+  static deserialize(buffer: Uint8Array): TableA;
+  unpack(): TableAT;
+  unpackTo(_o: TableAT): void;
 }
 export declare class TableAT implements flatbuffers.IGeneratedObject {
-    b: TableBT | null;
-    constructor(b?: TableBT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  b: TableBT | null;
+  constructor(b?: TableBT | null);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/table-a.js b/tests/ts/table-a.js
index b3bff4a..5cffe8b 100644
--- a/tests/ts/table-a.js
+++ b/tests/ts/table-a.js
@@ -1,65 +1,73 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { TableB } from './my-game/other-name-space/table-b.js';
+
+import {TableB} from './my-game/other-name-space/table-b.js';
+
 export class TableA {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsTableA(bb, obj) {
-        return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsTableA(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    b(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? (obj || new TableB()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'TableA';
-    }
-    static startTableA(builder) {
-        builder.startObject(1);
-    }
-    static addB(builder, bOffset) {
-        builder.addFieldOffset(0, bOffset, 0);
-    }
-    static endTableA(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createTableA(builder, bOffset) {
-        TableA.startTableA(builder);
-        TableA.addB(builder, bOffset);
-        return TableA.endTableA(builder);
-    }
-    serialize() {
-        return this.bb.bytes();
-    }
-    static deserialize(buffer) {
-        return TableA.getRootAsTableA(new flatbuffers.ByteBuffer(buffer));
-    }
-    unpack() {
-        return new TableAT((this.b() !== null ? this.b().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.b = (this.b() !== null ? this.b().unpack() : null);
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsTableA(bb, obj) {
+    return (obj || new TableA())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsTableA(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TableA())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  b(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ?
+        (obj || new TableB())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  static getFullyQualifiedName() {
+    return 'TableA';
+  }
+  static startTableA(builder) {
+    builder.startObject(1);
+  }
+  static addB(builder, bOffset) {
+    builder.addFieldOffset(0, bOffset, 0);
+  }
+  static endTableA(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createTableA(builder, bOffset) {
+    TableA.startTableA(builder);
+    TableA.addB(builder, bOffset);
+    return TableA.endTableA(builder);
+  }
+  serialize() {
+    return this.bb.bytes();
+  }
+  static deserialize(buffer) {
+    return TableA.getRootAsTableA(new flatbuffers.ByteBuffer(buffer));
+  }
+  unpack() {
+    return new TableAT((this.b() !== null ? this.b().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.b = (this.b() !== null ? this.b().unpack() : null);
+  }
 }
 export class TableAT {
-    constructor(b = null) {
-        this.b = b;
-    }
-    pack(builder) {
-        const b = (this.b !== null ? this.b.pack(builder) : 0);
-        return TableA.createTableA(builder, b);
-    }
+  constructor(b = null) {
+    this.b = b;
+  }
+  pack(builder) {
+    const b = (this.b !== null ? this.b.pack(builder) : 0);
+    return TableA.createTableA(builder, b);
+  }
 }
diff --git a/tests/ts/table-a.ts b/tests/ts/table-a.ts
index 9d47ed5..b3e8648 100644
--- a/tests/ts/table-a.ts
+++ b/tests/ts/table-a.ts
@@ -4,86 +4,94 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { TableB, TableBT } from './my-game/other-name-space/table-b.js';
-
+import {TableB, TableBT} from './my-game/other-name-space/table-b.js';
 
 export class TableA implements flatbuffers.IUnpackableObject<TableAT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):TableA {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): TableA {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsTableA(bb:flatbuffers.ByteBuffer, obj?:TableA):TableA {
-  return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsTableA(bb: flatbuffers.ByteBuffer, obj?: TableA): TableA {
+    return (obj || new TableA()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsTableA(bb:flatbuffers.ByteBuffer, obj?:TableA):TableA {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsTableA(
+    bb: flatbuffers.ByteBuffer,
+    obj?: TableA,
+  ): TableA {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new TableA()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-b(obj?:TableB):TableB|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? (obj || new TableB()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
+  b(obj?: TableB): TableB | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? (obj || new TableB()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
 
-static getFullyQualifiedName():string {
-  return 'TableA';
-}
+  static getFullyQualifiedName(): string {
+    return 'TableA';
+  }
 
-static startTableA(builder:flatbuffers.Builder) {
-  builder.startObject(1);
-}
+  static startTableA(builder: flatbuffers.Builder) {
+    builder.startObject(1);
+  }
 
-static addB(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, bOffset, 0);
-}
+  static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, bOffset, 0);
+  }
 
-static endTableA(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endTableA(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static createTableA(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset):flatbuffers.Offset {
-  TableA.startTableA(builder);
-  TableA.addB(builder, bOffset);
-  return TableA.endTableA(builder);
-}
+  static createTableA(
+    builder: flatbuffers.Builder,
+    bOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    TableA.startTableA(builder);
+    TableA.addB(builder, bOffset);
+    return TableA.endTableA(builder);
+  }
 
-serialize():Uint8Array {
-  return this.bb!.bytes();
-}
+  serialize(): Uint8Array {
+    return this.bb!.bytes();
+  }
 
-static deserialize(buffer: Uint8Array):TableA {
-  return TableA.getRootAsTableA(new flatbuffers.ByteBuffer(buffer))
-}
+  static deserialize(buffer: Uint8Array): TableA {
+    return TableA.getRootAsTableA(new flatbuffers.ByteBuffer(buffer));
+  }
 
-unpack(): TableAT {
-  return new TableAT(
-    (this.b() !== null ? this.b()!.unpack() : null)
-  );
-}
+  unpack(): TableAT {
+    return new TableAT(this.b() !== null ? this.b()!.unpack() : null);
+  }
 
-
-unpackTo(_o: TableAT): void {
-  _o.b = (this.b() !== null ? this.b()!.unpack() : null);
-}
+  unpackTo(_o: TableAT): void {
+    _o.b = this.b() !== null ? this.b()!.unpack() : null;
+  }
 }
 
 export class TableAT implements flatbuffers.IGeneratedObject {
-constructor(
-  public b: TableBT|null = null
-){}
+  constructor(public b: TableBT | null = null) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const b = this.b !== null ? this.b!.pack(builder) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const b = (this.b !== null ? this.b!.pack(builder) : 0);
-
-  return TableA.createTableA(builder,
-    b
-  );
-}
+    return TableA.createTableA(builder, b);
+  }
 }
diff --git a/tests/ts/test_dir/import_test.js b/tests/ts/test_dir/import_test.js
index 594b11e..486a222 100644
--- a/tests/ts/test_dir/import_test.js
+++ b/tests/ts/test_dir/import_test.js
@@ -12,7 +12,7 @@
 
   // Validate building a table.
   var fbb = new flatbuffers.Builder(1);
-  var name = fbb.createString("Foo Bar");
+  var name = fbb.createString('Foo Bar');
 
   foobar.Tab.startTab(fbb);
   foobar.Tab.addAbc(fbb, foobar.Abc.a);
diff --git a/tests/ts/typescript.d.ts b/tests/ts/typescript.d.ts
index 3c9fcbf..eefa66f 100644
--- a/tests/ts/typescript.d.ts
+++ b/tests/ts/typescript.d.ts
@@ -1,2 +1,2 @@
-export { Object_ } from './typescript/object.js';
-export { class_ } from './typescript/class.js';
+export {class_} from './typescript/class.js';
+export {Object_} from './typescript/object.js';
diff --git a/tests/ts/typescript.js b/tests/ts/typescript.js
index aaa77b6..59d15e3 100644
--- a/tests/ts/typescript.js
+++ b/tests/ts/typescript.js
@@ -1,4 +1,5 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Object_ } from './typescript/object.js';
-export { class_ } from './typescript/class.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {class_} from './typescript/class.js';
+export {Object_} from './typescript/object.js';
diff --git a/tests/ts/typescript.ts b/tests/ts/typescript.ts
index da50d15..783517e 100644
--- a/tests/ts/typescript.ts
+++ b/tests/ts/typescript.ts
@@ -2,5 +2,5 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { Object_ } from './typescript/object.js';
-export { class_ } from './typescript/class.js';
+export {class_} from './typescript/class.js';
+export {Object_} from './typescript/object.js';
diff --git a/tests/ts/typescript/class.d.ts b/tests/ts/typescript/class.d.ts
index ff6c542..defd960 100644
--- a/tests/ts/typescript/class.d.ts
+++ b/tests/ts/typescript/class.d.ts
@@ -1,4 +1,4 @@
 export declare enum class_ {
-    new_ = 0,
-    instanceof_ = 1
+  new_ = 0,
+  instanceof_ = 1,
 }
diff --git a/tests/ts/typescript/class.js b/tests/ts/typescript/class.js
index 2dba036..efb593b 100644
--- a/tests/ts/typescript/class.js
+++ b/tests/ts/typescript/class.js
@@ -1,7 +1,8 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export var class_;
-(function (class_) {
-    class_[class_["new_"] = 0] = "new_";
-    class_[class_["instanceof_"] = 1] = "instanceof_";
+(function(class_) {
+class_[class_['new_'] = 0] = 'new_';
+class_[class_['instanceof_'] = 1] = 'instanceof_';
 })(class_ || (class_ = {}));
diff --git a/tests/ts/typescript/class.ts b/tests/ts/typescript/class.ts
index 69b4a0a..7043771 100644
--- a/tests/ts/typescript/class.ts
+++ b/tests/ts/typescript/class.ts
@@ -4,5 +4,5 @@
 
 export enum class_ {
   new_ = 0,
-  instanceof_ = 1
+  instanceof_ = 1,
 }
diff --git a/tests/ts/typescript/object.d.ts b/tests/ts/typescript/object.d.ts
index c8e8b75..ce6ce70 100644
--- a/tests/ts/typescript/object.d.ts
+++ b/tests/ts/typescript/object.d.ts
@@ -1,48 +1,64 @@
 import * as flatbuffers from 'flatbuffers';
-import { Abc } from '../foobar/abc.js';
-import { class_ as foobar_class_ } from '../foobar/class.js';
-import { Schema, SchemaT } from '../reflection/schema.js';
-import { class_ } from '../typescript/class.js';
-export declare class Object_ implements flatbuffers.IUnpackableObject<Object_T> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Object_;
-    static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
-    static getSizePrefixedRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
-    return_(): number;
-    mutate_return(value: number): boolean;
-    if_(): number;
-    mutate_if(value: number): boolean;
-    switch_(): number;
-    mutate_switch(value: number): boolean;
-    enum_(): class_;
-    mutate_enum(value: class_): boolean;
-    enum2(): foobar_class_;
-    mutate_enum2(value: foobar_class_): boolean;
-    enum3(): Abc;
-    mutate_enum3(value: Abc): boolean;
-    reflect(obj?: Schema): Schema | null;
-    static getFullyQualifiedName(): string;
-    static startObject(builder: flatbuffers.Builder): void;
-    static addReturn(builder: flatbuffers.Builder, return_: number): void;
-    static addIf(builder: flatbuffers.Builder, if_: number): void;
-    static addSwitch(builder: flatbuffers.Builder, switch_: number): void;
-    static addEnum(builder: flatbuffers.Builder, enum_: class_): void;
-    static addEnum2(builder: flatbuffers.Builder, enum2: foobar_class_): void;
-    static addEnum3(builder: flatbuffers.Builder, enum3: Abc): void;
-    static addReflect(builder: flatbuffers.Builder, reflectOffset: flatbuffers.Offset): void;
-    static endObject(builder: flatbuffers.Builder): flatbuffers.Offset;
-    unpack(): Object_T;
-    unpackTo(_o: Object_T): void;
+import {Abc} from '../foobar/abc.js';
+import {class_ as foobar_class_} from '../foobar/class.js';
+import {Schema, SchemaT} from '../reflection/schema.js';
+import {class_} from '../typescript/class.js';
+export declare class Object_
+  implements flatbuffers.IUnpackableObject<Object_T>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Object_;
+  static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_;
+  static getSizePrefixedRootAsObject(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Object_,
+  ): Object_;
+  return_(): number;
+  mutate_return(value: number): boolean;
+  if_(): number;
+  mutate_if(value: number): boolean;
+  switch_(): number;
+  mutate_switch(value: number): boolean;
+  enum_(): class_;
+  mutate_enum(value: class_): boolean;
+  enum2(): foobar_class_;
+  mutate_enum2(value: foobar_class_): boolean;
+  enum3(): Abc;
+  mutate_enum3(value: Abc): boolean;
+  reflect(obj?: Schema): Schema | null;
+  static getFullyQualifiedName(): string;
+  static startObject(builder: flatbuffers.Builder): void;
+  static addReturn(builder: flatbuffers.Builder, return_: number): void;
+  static addIf(builder: flatbuffers.Builder, if_: number): void;
+  static addSwitch(builder: flatbuffers.Builder, switch_: number): void;
+  static addEnum(builder: flatbuffers.Builder, enum_: class_): void;
+  static addEnum2(builder: flatbuffers.Builder, enum2: foobar_class_): void;
+  static addEnum3(builder: flatbuffers.Builder, enum3: Abc): void;
+  static addReflect(
+    builder: flatbuffers.Builder,
+    reflectOffset: flatbuffers.Offset,
+  ): void;
+  static endObject(builder: flatbuffers.Builder): flatbuffers.Offset;
+  unpack(): Object_T;
+  unpackTo(_o: Object_T): void;
 }
 export declare class Object_T implements flatbuffers.IGeneratedObject {
-    return_: number;
-    if_: number;
-    switch_: number;
-    enum_: class_;
-    enum2: foobar_class_;
-    enum3: Abc;
-    reflect: SchemaT | null;
-    constructor(return_?: number, if_?: number, switch_?: number, enum_?: class_, enum2?: foobar_class_, enum3?: Abc, reflect?: SchemaT | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  return_: number;
+  if_: number;
+  switch_: number;
+  enum_: class_;
+  enum2: foobar_class_;
+  enum3: Abc;
+  reflect: SchemaT | null;
+  constructor(
+    return_?: number,
+    if_?: number,
+    switch_?: number,
+    enum_?: class_,
+    enum2?: foobar_class_,
+    enum3?: Abc,
+    reflect?: SchemaT | null,
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/typescript/object.js b/tests/ts/typescript/object.js
index c8b9769..122b192 100644
--- a/tests/ts/typescript/object.js
+++ b/tests/ts/typescript/object.js
@@ -1,167 +1,181 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Abc } from '../foobar/abc.js';
-import { class_ as foobar_class_ } from '../foobar/class.js';
-import { Schema } from '../reflection/schema.js';
-import { class_ } from '../typescript/class.js';
+
+import {Abc} from '../foobar/abc.js';
+import {class_ as foobar_class_} from '../foobar/class.js';
+import {Schema} from '../reflection/schema.js';
+import {class_} from '../typescript/class.js';
+
 export class Object_ {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsObject(bb, obj) {
+    return (obj || new Object_())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsObject(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Object_())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  return_() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_return(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  if_() {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_if(value) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    if (offset === 0) {
+      return false;
     }
-    static getRootAsObject(bb, obj) {
-        return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  switch_() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_switch(value) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    if (offset === 0) {
+      return false;
     }
-    static getSizePrefixedRootAsObject(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  enum_() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : class_.new_;
+  }
+  mutate_enum(value) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    if (offset === 0) {
+      return false;
     }
-    return_() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  enum2() {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) :
+                    foobar_class_.arguments_;
+  }
+  mutate_enum2(value) {
+    const offset = this.bb.__offset(this.bb_pos, 12);
+    if (offset === 0) {
+      return false;
     }
-    mutate_return(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  enum3() {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : Abc.a;
+  }
+  mutate_enum3(value) {
+    const offset = this.bb.__offset(this.bb_pos, 14);
+    if (offset === 0) {
+      return false;
     }
-    if_() {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_if(value) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    switch_() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_switch(value) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    enum_() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : class_.new_;
-    }
-    mutate_enum(value) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    enum2() {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : foobar_class_.arguments_;
-    }
-    mutate_enum2(value) {
-        const offset = this.bb.__offset(this.bb_pos, 12);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    enum3() {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : Abc.a;
-    }
-    mutate_enum3(value) {
-        const offset = this.bb.__offset(this.bb_pos, 14);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    reflect(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 16);
-        return offset ? (obj || new Schema()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'typescript.Object';
-    }
-    static startObject(builder) {
-        builder.startObject(7);
-    }
-    static addReturn(builder, return_) {
-        builder.addFieldInt32(0, return_, 0);
-    }
-    static addIf(builder, if_) {
-        builder.addFieldInt32(1, if_, 0);
-    }
-    static addSwitch(builder, switch_) {
-        builder.addFieldInt32(2, switch_, 0);
-    }
-    static addEnum(builder, enum_) {
-        builder.addFieldInt32(3, enum_, class_.new_);
-    }
-    static addEnum2(builder, enum2) {
-        builder.addFieldInt32(4, enum2, foobar_class_.arguments_);
-    }
-    static addEnum3(builder, enum3) {
-        builder.addFieldInt32(5, enum3, Abc.a);
-    }
-    static addReflect(builder, reflectOffset) {
-        builder.addFieldOffset(6, reflectOffset, 0);
-    }
-    static endObject(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    unpack() {
-        return new Object_T(this.return_(), this.if_(), this.switch_(), this.enum_(), this.enum2(), this.enum3(), (this.reflect() !== null ? this.reflect().unpack() : null));
-    }
-    unpackTo(_o) {
-        _o.return_ = this.return_();
-        _o.if_ = this.if_();
-        _o.switch_ = this.switch_();
-        _o.enum_ = this.enum_();
-        _o.enum2 = this.enum2();
-        _o.enum3 = this.enum3();
-        _o.reflect = (this.reflect() !== null ? this.reflect().unpack() : null);
-    }
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  reflect(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 16);
+    return offset ?
+        (obj || new Schema())
+            .__init(this.bb.__indirect(this.bb_pos + offset), this.bb) :
+        null;
+  }
+  static getFullyQualifiedName() {
+    return 'typescript.Object';
+  }
+  static startObject(builder) {
+    builder.startObject(7);
+  }
+  static addReturn(builder, return_) {
+    builder.addFieldInt32(0, return_, 0);
+  }
+  static addIf(builder, if_) {
+    builder.addFieldInt32(1, if_, 0);
+  }
+  static addSwitch(builder, switch_) {
+    builder.addFieldInt32(2, switch_, 0);
+  }
+  static addEnum(builder, enum_) {
+    builder.addFieldInt32(3, enum_, class_.new_);
+  }
+  static addEnum2(builder, enum2) {
+    builder.addFieldInt32(4, enum2, foobar_class_.arguments_);
+  }
+  static addEnum3(builder, enum3) {
+    builder.addFieldInt32(5, enum3, Abc.a);
+  }
+  static addReflect(builder, reflectOffset) {
+    builder.addFieldOffset(6, reflectOffset, 0);
+  }
+  static endObject(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  unpack() {
+    return new Object_T(
+        this.return_(), this.if_(), this.switch_(), this.enum_(), this.enum2(),
+        this.enum3(),
+        (this.reflect() !== null ? this.reflect().unpack() : null));
+  }
+  unpackTo(_o) {
+    _o.return_ = this.return_();
+    _o.if_ = this.if_();
+    _o.switch_ = this.switch_();
+    _o.enum_ = this.enum_();
+    _o.enum2 = this.enum2();
+    _o.enum3 = this.enum3();
+    _o.reflect = (this.reflect() !== null ? this.reflect().unpack() : null);
+  }
 }
 export class Object_T {
-    constructor(return_ = 0, if_ = 0, switch_ = 0, enum_ = class_.new_, enum2 = foobar_class_.arguments_, enum3 = Abc.a, reflect = null) {
-        this.return_ = return_;
-        this.if_ = if_;
-        this.switch_ = switch_;
-        this.enum_ = enum_;
-        this.enum2 = enum2;
-        this.enum3 = enum3;
-        this.reflect = reflect;
-    }
-    pack(builder) {
-        const reflect = (this.reflect !== null ? this.reflect.pack(builder) : 0);
-        Object_.startObject(builder);
-        Object_.addReturn(builder, this.return_);
-        Object_.addIf(builder, this.if_);
-        Object_.addSwitch(builder, this.switch_);
-        Object_.addEnum(builder, this.enum_);
-        Object_.addEnum2(builder, this.enum2);
-        Object_.addEnum3(builder, this.enum3);
-        Object_.addReflect(builder, reflect);
-        return Object_.endObject(builder);
-    }
+  constructor(
+      return_ = 0, if_ = 0, switch_ = 0, enum_ = class_.new_,
+      enum2 = foobar_class_.arguments_, enum3 = Abc.a, reflect = null) {
+    this.return_ = return_;
+    this.if_ = if_;
+    this.switch_ = switch_;
+    this.enum_ = enum_;
+    this.enum2 = enum2;
+    this.enum3 = enum3;
+    this.reflect = reflect;
+  }
+  pack(builder) {
+    const reflect = (this.reflect !== null ? this.reflect.pack(builder) : 0);
+    Object_.startObject(builder);
+    Object_.addReturn(builder, this.return_);
+    Object_.addIf(builder, this.if_);
+    Object_.addSwitch(builder, this.switch_);
+    Object_.addEnum(builder, this.enum_);
+    Object_.addEnum2(builder, this.enum2);
+    Object_.addEnum3(builder, this.enum3);
+    Object_.addReflect(builder, reflect);
+    return Object_.endObject(builder);
+  }
 }
diff --git a/tests/ts/typescript/object.ts b/tests/ts/typescript/object.ts
index c7760d8..e894bb0 100644
--- a/tests/ts/typescript/object.ts
+++ b/tests/ts/typescript/object.ts
@@ -4,221 +4,236 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { Abc } from '../foobar/abc.js';
-import { class_ as foobar_class_ } from '../foobar/class.js';
-import { Schema, SchemaT } from '../reflection/schema.js';
-import { class_ } from '../typescript/class.js';
-
+import {Abc} from '../foobar/abc.js';
+import {class_ as foobar_class_} from '../foobar/class.js';
+import {Schema, SchemaT} from '../reflection/schema.js';
+import {class_} from '../typescript/class.js';
 
 export class Object_ implements flatbuffers.IUnpackableObject<Object_T> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):Object_ {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
-  return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsObject(bb:flatbuffers.ByteBuffer, obj?:Object_):Object_ {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new Object_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-return_():number {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_return(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Object_ {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-if_():number {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_if(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-
-  if (offset === 0) {
-    return false;
+  static getRootAsObject(bb: flatbuffers.ByteBuffer, obj?: Object_): Object_ {
+    return (obj || new Object_()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-switch_():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_switch(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-
-  if (offset === 0) {
-    return false;
+  static getSizePrefixedRootAsObject(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Object_,
+  ): Object_ {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Object_()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-enum_():class_ {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : class_.new_;
-}
-
-mutate_enum(value:class_):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-
-  if (offset === 0) {
-    return false;
+  return_(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
+  mutate_return(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
 
-enum2():foobar_class_ {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : foobar_class_.arguments_;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-mutate_enum2(value:foobar_class_):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 12);
-
-  if (offset === 0) {
-    return false;
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
-
-enum3():Abc {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : Abc.a;
-}
-
-mutate_enum3(value:Abc):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 14);
-
-  if (offset === 0) {
-    return false;
+  if_(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
+  mutate_if(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
 
-reflect(obj?:Schema):Schema|null {
-  const offset = this.bb!.__offset(this.bb_pos, 16);
-  return offset ? (obj || new Schema()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static getFullyQualifiedName():string {
-  return 'typescript.Object';
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-static startObject(builder:flatbuffers.Builder) {
-  builder.startObject(7);
-}
+  switch_(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
+  }
 
-static addReturn(builder:flatbuffers.Builder, return_:number) {
-  builder.addFieldInt32(0, return_, 0);
-}
+  mutate_switch(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
 
-static addIf(builder:flatbuffers.Builder, if_:number) {
-  builder.addFieldInt32(1, if_, 0);
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static addSwitch(builder:flatbuffers.Builder, switch_:number) {
-  builder.addFieldInt32(2, switch_, 0);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-static addEnum(builder:flatbuffers.Builder, enum_:class_) {
-  builder.addFieldInt32(3, enum_, class_.new_);
-}
+  enum_(): class_ {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : class_.new_;
+  }
 
-static addEnum2(builder:flatbuffers.Builder, enum2:foobar_class_) {
-  builder.addFieldInt32(4, enum2, foobar_class_.arguments_);
-}
+  mutate_enum(value: class_): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
 
-static addEnum3(builder:flatbuffers.Builder, enum3:Abc) {
-  builder.addFieldInt32(5, enum3, Abc.a);
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static addReflect(builder:flatbuffers.Builder, reflectOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(6, reflectOffset, 0);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-static endObject(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  enum2(): foobar_class_ {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
+    return offset
+      ? this.bb!.readInt32(this.bb_pos + offset)
+      : foobar_class_.arguments_;
+  }
 
+  mutate_enum2(value: foobar_class_): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 12);
 
-unpack(): Object_T {
-  return new Object_T(
-    this.return_(),
-    this.if_(),
-    this.switch_(),
-    this.enum_(),
-    this.enum2(),
-    this.enum3(),
-    (this.reflect() !== null ? this.reflect()!.unpack() : null)
-  );
-}
+    if (offset === 0) {
+      return false;
+    }
 
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-unpackTo(_o: Object_T): void {
-  _o.return_ = this.return_();
-  _o.if_ = this.if_();
-  _o.switch_ = this.switch_();
-  _o.enum_ = this.enum_();
-  _o.enum2 = this.enum2();
-  _o.enum3 = this.enum3();
-  _o.reflect = (this.reflect() !== null ? this.reflect()!.unpack() : null);
-}
+  enum3(): Abc {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : Abc.a;
+  }
+
+  mutate_enum3(value: Abc): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 14);
+
+    if (offset === 0) {
+      return false;
+    }
+
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+
+  reflect(obj?: Schema): Schema | null {
+    const offset = this.bb!.__offset(this.bb_pos, 16);
+    return offset
+      ? (obj || new Schema()).__init(
+          this.bb!.__indirect(this.bb_pos + offset),
+          this.bb!,
+        )
+      : null;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'typescript.Object';
+  }
+
+  static startObject(builder: flatbuffers.Builder) {
+    builder.startObject(7);
+  }
+
+  static addReturn(builder: flatbuffers.Builder, return_: number) {
+    builder.addFieldInt32(0, return_, 0);
+  }
+
+  static addIf(builder: flatbuffers.Builder, if_: number) {
+    builder.addFieldInt32(1, if_, 0);
+  }
+
+  static addSwitch(builder: flatbuffers.Builder, switch_: number) {
+    builder.addFieldInt32(2, switch_, 0);
+  }
+
+  static addEnum(builder: flatbuffers.Builder, enum_: class_) {
+    builder.addFieldInt32(3, enum_, class_.new_);
+  }
+
+  static addEnum2(builder: flatbuffers.Builder, enum2: foobar_class_) {
+    builder.addFieldInt32(4, enum2, foobar_class_.arguments_);
+  }
+
+  static addEnum3(builder: flatbuffers.Builder, enum3: Abc) {
+    builder.addFieldInt32(5, enum3, Abc.a);
+  }
+
+  static addReflect(
+    builder: flatbuffers.Builder,
+    reflectOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(6, reflectOffset, 0);
+  }
+
+  static endObject(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  unpack(): Object_T {
+    return new Object_T(
+      this.return_(),
+      this.if_(),
+      this.switch_(),
+      this.enum_(),
+      this.enum2(),
+      this.enum3(),
+      this.reflect() !== null ? this.reflect()!.unpack() : null,
+    );
+  }
+
+  unpackTo(_o: Object_T): void {
+    _o.return_ = this.return_();
+    _o.if_ = this.if_();
+    _o.switch_ = this.switch_();
+    _o.enum_ = this.enum_();
+    _o.enum2 = this.enum2();
+    _o.enum3 = this.enum3();
+    _o.reflect = this.reflect() !== null ? this.reflect()!.unpack() : null;
+  }
 }
 
 export class Object_T implements flatbuffers.IGeneratedObject {
-constructor(
-  public return_: number = 0,
-  public if_: number = 0,
-  public switch_: number = 0,
-  public enum_: class_ = class_.new_,
-  public enum2: foobar_class_ = foobar_class_.arguments_,
-  public enum3: Abc = Abc.a,
-  public reflect: SchemaT|null = null
-){}
+  constructor(
+    public return_: number = 0,
+    public if_: number = 0,
+    public switch_: number = 0,
+    public enum_: class_ = class_.new_,
+    public enum2: foobar_class_ = foobar_class_.arguments_,
+    public enum3: Abc = Abc.a,
+    public reflect: SchemaT | null = null,
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const reflect = this.reflect !== null ? this.reflect!.pack(builder) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const reflect = (this.reflect !== null ? this.reflect!.pack(builder) : 0);
+    Object_.startObject(builder);
+    Object_.addReturn(builder, this.return_);
+    Object_.addIf(builder, this.if_);
+    Object_.addSwitch(builder, this.switch_);
+    Object_.addEnum(builder, this.enum_);
+    Object_.addEnum2(builder, this.enum2);
+    Object_.addEnum3(builder, this.enum3);
+    Object_.addReflect(builder, reflect);
 
-  Object_.startObject(builder);
-  Object_.addReturn(builder, this.return_);
-  Object_.addIf(builder, this.if_);
-  Object_.addSwitch(builder, this.switch_);
-  Object_.addEnum(builder, this.enum_);
-  Object_.addEnum2(builder, this.enum2);
-  Object_.addEnum3(builder, this.enum3);
-  Object_.addReflect(builder, reflect);
-
-  return Object_.endObject(builder);
-}
+    return Object_.endObject(builder);
+  }
 }
diff --git a/tests/ts/typescript_keywords.js b/tests/ts/typescript_keywords.js
index 60b7e57..42518fe 100644
--- a/tests/ts/typescript_keywords.js
+++ b/tests/ts/typescript_keywords.js
@@ -1,5 +1,6 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export * as foobar from './foobar.js';
 export * as reflection from './reflection.js';
 export * as typescript from './typescript.js';
diff --git a/tests/ts/union-underlying-type.d.ts b/tests/ts/union-underlying-type.d.ts
index 41a06b5..c835923 100644
--- a/tests/ts/union-underlying-type.d.ts
+++ b/tests/ts/union-underlying-type.d.ts
@@ -1,5 +1,5 @@
-export { A, AT } from './union-underlying-type/a.js';
-export { ABC } from './union-underlying-type/abc.js';
-export { B, BT } from './union-underlying-type/b.js';
-export { C, CT } from './union-underlying-type/c.js';
-export { D, DT } from './union-underlying-type/d.js';
+export {A, AT} from './union-underlying-type/a.js';
+export {ABC} from './union-underlying-type/abc.js';
+export {B, BT} from './union-underlying-type/b.js';
+export {C, CT} from './union-underlying-type/c.js';
+export {D, DT} from './union-underlying-type/d.js';
diff --git a/tests/ts/union-underlying-type.js b/tests/ts/union-underlying-type.js
index 5548134..543e03e 100644
--- a/tests/ts/union-underlying-type.js
+++ b/tests/ts/union-underlying-type.js
@@ -1,7 +1,8 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { A, AT } from './union-underlying-type/a.js';
-export { ABC } from './union-underlying-type/abc.js';
-export { B, BT } from './union-underlying-type/b.js';
-export { C, CT } from './union-underlying-type/c.js';
-export { D, DT } from './union-underlying-type/d.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {A, AT} from './union-underlying-type/a.js';
+export {ABC} from './union-underlying-type/abc.js';
+export {B, BT} from './union-underlying-type/b.js';
+export {C, CT} from './union-underlying-type/c.js';
+export {D, DT} from './union-underlying-type/d.js';
diff --git a/tests/ts/union-underlying-type.ts b/tests/ts/union-underlying-type.ts
index df14f06..3125d06 100644
--- a/tests/ts/union-underlying-type.ts
+++ b/tests/ts/union-underlying-type.ts
@@ -2,8 +2,8 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-export { A, AT } from './union-underlying-type/a.js';
-export { ABC } from './union-underlying-type/abc.js';
-export { B, BT } from './union-underlying-type/b.js';
-export { C, CT } from './union-underlying-type/c.js';
-export { D, DT } from './union-underlying-type/d.js';
+export {A, AT} from './union-underlying-type/a.js';
+export {ABC} from './union-underlying-type/abc.js';
+export {B, BT} from './union-underlying-type/b.js';
+export {C, CT} from './union-underlying-type/c.js';
+export {D, DT} from './union-underlying-type/d.js';
diff --git a/tests/ts/union-underlying-type/a.d.ts b/tests/ts/union-underlying-type/a.d.ts
index 79b07cc..1870ecd 100644
--- a/tests/ts/union-underlying-type/a.d.ts
+++ b/tests/ts/union-underlying-type/a.d.ts
@@ -1,22 +1,22 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class A implements flatbuffers.IUnpackableObject<AT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): A;
-    static getRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A;
-    static getSizePrefixedRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A;
-    a(): number;
-    mutate_a(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startA(builder: flatbuffers.Builder): void;
-    static addA(builder: flatbuffers.Builder, a: number): void;
-    static endA(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createA(builder: flatbuffers.Builder, a: number): flatbuffers.Offset;
-    unpack(): AT;
-    unpackTo(_o: AT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): A;
+  static getRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A;
+  static getSizePrefixedRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A;
+  a(): number;
+  mutate_a(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startA(builder: flatbuffers.Builder): void;
+  static addA(builder: flatbuffers.Builder, a: number): void;
+  static endA(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createA(builder: flatbuffers.Builder, a: number): flatbuffers.Offset;
+  unpack(): AT;
+  unpackTo(_o: AT): void;
 }
 export declare class AT implements flatbuffers.IGeneratedObject {
-    a: number;
-    constructor(a?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  a: number;
+  constructor(a?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union-underlying-type/a.js b/tests/ts/union-underlying-type/a.js
index 7285457..570d0b4 100644
--- a/tests/ts/union-underlying-type/a.js
+++ b/tests/ts/union-underlying-type/a.js
@@ -1,65 +1,68 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class A {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsA(bb, obj) {
+    return (obj || new A())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsA(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new A())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  a() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_a(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsA(bb, obj) {
-        return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsA(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    a() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_a(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'UnionUnderlyingType.A';
-    }
-    static startA(builder) {
-        builder.startObject(1);
-    }
-    static addA(builder, a) {
-        builder.addFieldInt32(0, a, 0);
-    }
-    static endA(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createA(builder, a) {
-        A.startA(builder);
-        A.addA(builder, a);
-        return A.endA(builder);
-    }
-    unpack() {
-        return new AT(this.a());
-    }
-    unpackTo(_o) {
-        _o.a = this.a();
-    }
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'UnionUnderlyingType.A';
+  }
+  static startA(builder) {
+    builder.startObject(1);
+  }
+  static addA(builder, a) {
+    builder.addFieldInt32(0, a, 0);
+  }
+  static endA(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createA(builder, a) {
+    A.startA(builder);
+    A.addA(builder, a);
+    return A.endA(builder);
+  }
+  unpack() {
+    return new AT(this.a());
+  }
+  unpackTo(_o) {
+    _o.a = this.a();
+  }
 }
 export class AT {
-    constructor(a = 0) {
-        this.a = a;
-    }
-    pack(builder) {
-        return A.createA(builder, this.a);
-    }
+  constructor(a = 0) {
+    this.a = a;
+  }
+  pack(builder) {
+    return A.createA(builder, this.a);
+  }
 }
diff --git a/tests/ts/union-underlying-type/a.ts b/tests/ts/union-underlying-type/a.ts
index f0039a9..3732b62 100644
--- a/tests/ts/union-underlying-type/a.ts
+++ b/tests/ts/union-underlying-type/a.ts
@@ -4,86 +4,82 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class A implements flatbuffers.IUnpackableObject<AT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):A {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsA(bb:flatbuffers.ByteBuffer, obj?:A):A {
-  return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsA(bb:flatbuffers.ByteBuffer, obj?:A):A {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new A()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-a():number {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
-}
-
-mutate_a(value:number):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): A {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt32(this.bb_pos + offset, value);
-  return true;
-}
+  static getRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A {
+    return (obj || new A()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getFullyQualifiedName():string {
-  return 'UnionUnderlyingType.A';
-}
+  static getSizePrefixedRootAsA(bb: flatbuffers.ByteBuffer, obj?: A): A {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new A()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static startA(builder:flatbuffers.Builder) {
-  builder.startObject(1);
-}
+  a(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
+  }
 
-static addA(builder:flatbuffers.Builder, a:number) {
-  builder.addFieldInt32(0, a, 0);
-}
+  mutate_a(value: number): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
 
-static endA(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static createA(builder:flatbuffers.Builder, a:number):flatbuffers.Offset {
-  A.startA(builder);
-  A.addA(builder, a);
-  return A.endA(builder);
-}
+    this.bb!.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
 
-unpack(): AT {
-  return new AT(
-    this.a()
-  );
-}
+  static getFullyQualifiedName(): string {
+    return 'UnionUnderlyingType.A';
+  }
 
+  static startA(builder: flatbuffers.Builder) {
+    builder.startObject(1);
+  }
 
-unpackTo(_o: AT): void {
-  _o.a = this.a();
-}
+  static addA(builder: flatbuffers.Builder, a: number) {
+    builder.addFieldInt32(0, a, 0);
+  }
+
+  static endA(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  static createA(builder: flatbuffers.Builder, a: number): flatbuffers.Offset {
+    A.startA(builder);
+    A.addA(builder, a);
+    return A.endA(builder);
+  }
+
+  unpack(): AT {
+    return new AT(this.a());
+  }
+
+  unpackTo(_o: AT): void {
+    _o.a = this.a();
+  }
 }
 
 export class AT implements flatbuffers.IGeneratedObject {
-constructor(
-  public a: number = 0
-){}
+  constructor(public a: number = 0) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return A.createA(builder,
-    this.a
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return A.createA(builder, this.a);
+  }
 }
diff --git a/tests/ts/union-underlying-type/abc.d.ts b/tests/ts/union-underlying-type/abc.d.ts
index 1ebd5fd..91737e4 100644
--- a/tests/ts/union-underlying-type/abc.d.ts
+++ b/tests/ts/union-underlying-type/abc.d.ts
@@ -1,11 +1,18 @@
-import { A } from '../union-underlying-type/a.js';
-import { B } from '../union-underlying-type/b.js';
-import { C } from '../union-underlying-type/c.js';
+import {A} from '../union-underlying-type/a.js';
+import {B} from '../union-underlying-type/b.js';
+import {C} from '../union-underlying-type/c.js';
 export declare enum ABC {
-    NONE = 0,
-    A = 555,
-    B = 666,
-    C = 777
+  NONE = 0,
+  A = 555,
+  B = 666,
+  C = 777,
 }
-export declare function unionToAbc(type: ABC, accessor: (obj: A | B | C) => A | B | C | null): A | B | C | null;
-export declare function unionListToAbc(type: ABC, accessor: (index: number, obj: A | B | C) => A | B | C | null, index: number): A | B | C | null;
+export declare function unionToAbc(
+  type: ABC,
+  accessor: (obj: A | B | C) => A | B | C | null,
+): A | B | C | null;
+export declare function unionListToAbc(
+  type: ABC,
+  accessor: (index: number, obj: A | B | C) => A | B | C | null,
+  index: number,
+): A | B | C | null;
diff --git a/tests/ts/union-underlying-type/abc.js b/tests/ts/union-underlying-type/abc.js
index a0434f1..6e5e10c 100644
--- a/tests/ts/union-underlying-type/abc.js
+++ b/tests/ts/union-underlying-type/abc.js
@@ -1,30 +1,41 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { A } from '../union-underlying-type/a.js';
-import { B } from '../union-underlying-type/b.js';
-import { C } from '../union-underlying-type/c.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {A} from '../union-underlying-type/a.js';
+import {B} from '../union-underlying-type/b.js';
+import {C} from '../union-underlying-type/c.js';
 export var ABC;
-(function (ABC) {
-    ABC[ABC["NONE"] = 0] = "NONE";
-    ABC[ABC["A"] = 555] = "A";
-    ABC[ABC["B"] = 666] = "B";
-    ABC[ABC["C"] = 777] = "C";
+(function(ABC) {
+ABC[ABC['NONE'] = 0] = 'NONE';
+ABC[ABC['A'] = 555] = 'A';
+ABC[ABC['B'] = 666] = 'B';
+ABC[ABC['C'] = 777] = 'C';
 })(ABC || (ABC = {}));
 export function unionToAbc(type, accessor) {
-    switch (ABC[type]) {
-        case 'NONE': return null;
-        case 'A': return accessor(new A());
-        case 'B': return accessor(new B());
-        case 'C': return accessor(new C());
-        default: return null;
-    }
+  switch (ABC[type]) {
+    case 'NONE':
+      return null;
+    case 'A':
+      return accessor(new A());
+    case 'B':
+      return accessor(new B());
+    case 'C':
+      return accessor(new C());
+    default:
+      return null;
+  }
 }
 export function unionListToAbc(type, accessor, index) {
-    switch (ABC[type]) {
-        case 'NONE': return null;
-        case 'A': return accessor(index, new A());
-        case 'B': return accessor(index, new B());
-        case 'C': return accessor(index, new C());
-        default: return null;
-    }
+  switch (ABC[type]) {
+    case 'NONE':
+      return null;
+    case 'A':
+      return accessor(index, new A());
+    case 'B':
+      return accessor(index, new B());
+    case 'C':
+      return accessor(index, new C());
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/union-underlying-type/abc.ts b/tests/ts/union-underlying-type/abc.ts
index 0ef1a79..bf6f7a9 100644
--- a/tests/ts/union-underlying-type/abc.ts
+++ b/tests/ts/union-underlying-type/abc.ts
@@ -2,41 +2,50 @@
 
 /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
 
-import { A, AT } from '../union-underlying-type/a.js';
-import { B, BT } from '../union-underlying-type/b.js';
-import { C, CT } from '../union-underlying-type/c.js';
-
+import {A, AT} from '../union-underlying-type/a.js';
+import {B, BT} from '../union-underlying-type/b.js';
+import {C, CT} from '../union-underlying-type/c.js';
 
 export enum ABC {
   NONE = 0,
   A = 555,
   B = 666,
-  C = 777
+  C = 777,
 }
 
 export function unionToAbc(
   type: ABC,
-  accessor: (obj:A|B|C) => A|B|C|null
-): A|B|C|null {
-  switch(ABC[type]) {
-    case 'NONE': return null; 
-    case 'A': return accessor(new A())! as A;
-    case 'B': return accessor(new B())! as B;
-    case 'C': return accessor(new C())! as C;
-    default: return null;
+  accessor: (obj: A | B | C) => A | B | C | null,
+): A | B | C | null {
+  switch (ABC[type]) {
+    case 'NONE':
+      return null;
+    case 'A':
+      return accessor(new A())! as A;
+    case 'B':
+      return accessor(new B())! as B;
+    case 'C':
+      return accessor(new C())! as C;
+    default:
+      return null;
   }
 }
 
 export function unionListToAbc(
-  type: ABC, 
-  accessor: (index: number, obj:A|B|C) => A|B|C|null, 
-  index: number
-): A|B|C|null {
-  switch(ABC[type]) {
-    case 'NONE': return null; 
-    case 'A': return accessor(index, new A())! as A;
-    case 'B': return accessor(index, new B())! as B;
-    case 'C': return accessor(index, new C())! as C;
-    default: return null;
+  type: ABC,
+  accessor: (index: number, obj: A | B | C) => A | B | C | null,
+  index: number,
+): A | B | C | null {
+  switch (ABC[type]) {
+    case 'NONE':
+      return null;
+    case 'A':
+      return accessor(index, new A())! as A;
+    case 'B':
+      return accessor(index, new B())! as B;
+    case 'C':
+      return accessor(index, new C())! as C;
+    default:
+      return null;
   }
 }
diff --git a/tests/ts/union-underlying-type/b.d.ts b/tests/ts/union-underlying-type/b.d.ts
index ea8b84d..5114804 100644
--- a/tests/ts/union-underlying-type/b.d.ts
+++ b/tests/ts/union-underlying-type/b.d.ts
@@ -1,22 +1,25 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class B implements flatbuffers.IUnpackableObject<BT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): B;
-    static getRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B;
-    static getSizePrefixedRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B;
-    b(): string | null;
-    b(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
-    static getFullyQualifiedName(): string;
-    static startB(builder: flatbuffers.Builder): void;
-    static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): void;
-    static endB(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): BT;
-    unpackTo(_o: BT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): B;
+  static getRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B;
+  static getSizePrefixedRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B;
+  b(): string | null;
+  b(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  static getFullyQualifiedName(): string;
+  static startB(builder: flatbuffers.Builder): void;
+  static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset): void;
+  static endB(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createB(
+    builder: flatbuffers.Builder,
+    bOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): BT;
+  unpackTo(_o: BT): void;
 }
 export declare class BT implements flatbuffers.IGeneratedObject {
-    b: string | Uint8Array | null;
-    constructor(b?: string | Uint8Array | null);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  b: string | Uint8Array | null;
+  constructor(b?: string | Uint8Array | null);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union-underlying-type/b.js b/tests/ts/union-underlying-type/b.js
index 85e67b2..5dcf1c8 100644
--- a/tests/ts/union-underlying-type/b.js
+++ b/tests/ts/union-underlying-type/b.js
@@ -1,58 +1,62 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class B {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsB(bb, obj) {
-        return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsB(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    b(optionalEncoding) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
-    }
-    static getFullyQualifiedName() {
-        return 'UnionUnderlyingType.B';
-    }
-    static startB(builder) {
-        builder.startObject(1);
-    }
-    static addB(builder, bOffset) {
-        builder.addFieldOffset(0, bOffset, 0);
-    }
-    static endB(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createB(builder, bOffset) {
-        B.startB(builder);
-        B.addB(builder, bOffset);
-        return B.endB(builder);
-    }
-    unpack() {
-        return new BT(this.b());
-    }
-    unpackTo(_o) {
-        _o.b = this.b();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsB(bb, obj) {
+    return (obj || new B())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsB(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new B())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  b(optionalEncoding) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) :
+                    null;
+  }
+  static getFullyQualifiedName() {
+    return 'UnionUnderlyingType.B';
+  }
+  static startB(builder) {
+    builder.startObject(1);
+  }
+  static addB(builder, bOffset) {
+    builder.addFieldOffset(0, bOffset, 0);
+  }
+  static endB(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createB(builder, bOffset) {
+    B.startB(builder);
+    B.addB(builder, bOffset);
+    return B.endB(builder);
+  }
+  unpack() {
+    return new BT(this.b());
+  }
+  unpackTo(_o) {
+    _o.b = this.b();
+  }
 }
 export class BT {
-    constructor(b = null) {
-        this.b = b;
-    }
-    pack(builder) {
-        const b = (this.b !== null ? builder.createString(this.b) : 0);
-        return B.createB(builder, b);
-    }
+  constructor(b = null) {
+    this.b = b;
+  }
+  pack(builder) {
+    const b = (this.b !== null ? builder.createString(this.b) : 0);
+    return B.createB(builder, b);
+  }
 }
diff --git a/tests/ts/union-underlying-type/b.ts b/tests/ts/union-underlying-type/b.ts
index 3be0a54..dfa63ef 100644
--- a/tests/ts/union-underlying-type/b.ts
+++ b/tests/ts/union-underlying-type/b.ts
@@ -4,79 +4,80 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class B implements flatbuffers.IUnpackableObject<BT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):B {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
+  __init(i: number, bb: flatbuffers.ByteBuffer): B {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
 
-static getRootAsB(bb:flatbuffers.ByteBuffer, obj?:B):B {
-  return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B {
+    return (obj || new B()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getSizePrefixedRootAsB(bb:flatbuffers.ByteBuffer, obj?:B):B {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new B()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
+  static getSizePrefixedRootAsB(bb: flatbuffers.ByteBuffer, obj?: B): B {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new B()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-b():string|null
-b(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
-b(optionalEncoding?:any):string|Uint8Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
-}
+  b(): string | null;
+  b(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
+  b(optionalEncoding?: any): string | Uint8Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset
+      ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
+      : null;
+  }
 
-static getFullyQualifiedName():string {
-  return 'UnionUnderlyingType.B';
-}
+  static getFullyQualifiedName(): string {
+    return 'UnionUnderlyingType.B';
+  }
 
-static startB(builder:flatbuffers.Builder) {
-  builder.startObject(1);
-}
+  static startB(builder: flatbuffers.Builder) {
+    builder.startObject(1);
+  }
 
-static addB(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(0, bOffset, 0);
-}
+  static addB(builder: flatbuffers.Builder, bOffset: flatbuffers.Offset) {
+    builder.addFieldOffset(0, bOffset, 0);
+  }
 
-static endB(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  static endB(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
 
-static createB(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset):flatbuffers.Offset {
-  B.startB(builder);
-  B.addB(builder, bOffset);
-  return B.endB(builder);
-}
+  static createB(
+    builder: flatbuffers.Builder,
+    bOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    B.startB(builder);
+    B.addB(builder, bOffset);
+    return B.endB(builder);
+  }
 
-unpack(): BT {
-  return new BT(
-    this.b()
-  );
-}
+  unpack(): BT {
+    return new BT(this.b());
+  }
 
-
-unpackTo(_o: BT): void {
-  _o.b = this.b();
-}
+  unpackTo(_o: BT): void {
+    _o.b = this.b();
+  }
 }
 
 export class BT implements flatbuffers.IGeneratedObject {
-constructor(
-  public b: string|Uint8Array|null = null
-){}
+  constructor(public b: string | Uint8Array | null = null) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const b = this.b !== null ? builder.createString(this.b!) : 0;
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const b = (this.b !== null ? builder.createString(this.b!) : 0);
-
-  return B.createB(builder,
-    b
-  );
-}
+    return B.createB(builder, b);
+  }
 }
diff --git a/tests/ts/union-underlying-type/c.d.ts b/tests/ts/union-underlying-type/c.d.ts
index 08d990f..b7f92bb 100644
--- a/tests/ts/union-underlying-type/c.d.ts
+++ b/tests/ts/union-underlying-type/c.d.ts
@@ -1,22 +1,22 @@
 import * as flatbuffers from 'flatbuffers';
 export declare class C implements flatbuffers.IUnpackableObject<CT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): C;
-    static getRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C;
-    static getSizePrefixedRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C;
-    c(): boolean;
-    mutate_c(value: boolean): boolean;
-    static getFullyQualifiedName(): string;
-    static startC(builder: flatbuffers.Builder): void;
-    static addC(builder: flatbuffers.Builder, c: boolean): void;
-    static endC(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createC(builder: flatbuffers.Builder, c: boolean): flatbuffers.Offset;
-    unpack(): CT;
-    unpackTo(_o: CT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): C;
+  static getRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C;
+  static getSizePrefixedRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C;
+  c(): boolean;
+  mutate_c(value: boolean): boolean;
+  static getFullyQualifiedName(): string;
+  static startC(builder: flatbuffers.Builder): void;
+  static addC(builder: flatbuffers.Builder, c: boolean): void;
+  static endC(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createC(builder: flatbuffers.Builder, c: boolean): flatbuffers.Offset;
+  unpack(): CT;
+  unpackTo(_o: CT): void;
 }
 export declare class CT implements flatbuffers.IGeneratedObject {
-    c: boolean;
-    constructor(c?: boolean);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  c: boolean;
+  constructor(c?: boolean);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union-underlying-type/c.js b/tests/ts/union-underlying-type/c.js
index 48c38b7..aedd747 100644
--- a/tests/ts/union-underlying-type/c.js
+++ b/tests/ts/union-underlying-type/c.js
@@ -1,65 +1,68 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class C {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsC(bb, obj) {
+    return (obj || new C())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsC(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new C())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  c() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
+  }
+  mutate_c(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsC(bb, obj) {
-        return (obj || new C()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsC(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new C()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    c() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
-    }
-    mutate_c(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt8(this.bb_pos + offset, +value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'UnionUnderlyingType.C';
-    }
-    static startC(builder) {
-        builder.startObject(1);
-    }
-    static addC(builder, c) {
-        builder.addFieldInt8(0, +c, +false);
-    }
-    static endC(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createC(builder, c) {
-        C.startC(builder);
-        C.addC(builder, c);
-        return C.endC(builder);
-    }
-    unpack() {
-        return new CT(this.c());
-    }
-    unpackTo(_o) {
-        _o.c = this.c();
-    }
+    this.bb.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'UnionUnderlyingType.C';
+  }
+  static startC(builder) {
+    builder.startObject(1);
+  }
+  static addC(builder, c) {
+    builder.addFieldInt8(0, +c, +false);
+  }
+  static endC(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createC(builder, c) {
+    C.startC(builder);
+    C.addC(builder, c);
+    return C.endC(builder);
+  }
+  unpack() {
+    return new CT(this.c());
+  }
+  unpackTo(_o) {
+    _o.c = this.c();
+  }
 }
 export class CT {
-    constructor(c = false) {
-        this.c = c;
-    }
-    pack(builder) {
-        return C.createC(builder, this.c);
-    }
+  constructor(c = false) {
+    this.c = c;
+  }
+  pack(builder) {
+    return C.createC(builder, this.c);
+  }
 }
diff --git a/tests/ts/union-underlying-type/c.ts b/tests/ts/union-underlying-type/c.ts
index 782c0c5..20c2b1c 100644
--- a/tests/ts/union-underlying-type/c.ts
+++ b/tests/ts/union-underlying-type/c.ts
@@ -4,86 +4,82 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-
-
 export class C implements flatbuffers.IUnpackableObject<CT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):C {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsC(bb:flatbuffers.ByteBuffer, obj?:C):C {
-  return (obj || new C()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsC(bb:flatbuffers.ByteBuffer, obj?:C):C {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new C()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-c():boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
-}
-
-mutate_c(value:boolean):boolean {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-
-  if (offset === 0) {
-    return false;
+  __init(i: number, bb: flatbuffers.ByteBuffer): C {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
 
-  this.bb!.writeInt8(this.bb_pos + offset, +value);
-  return true;
-}
+  static getRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C {
+    return (obj || new C()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static getFullyQualifiedName():string {
-  return 'UnionUnderlyingType.C';
-}
+  static getSizePrefixedRootAsC(bb: flatbuffers.ByteBuffer, obj?: C): C {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new C()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static startC(builder:flatbuffers.Builder) {
-  builder.startObject(1);
-}
+  c(): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
+  }
 
-static addC(builder:flatbuffers.Builder, c:boolean) {
-  builder.addFieldInt8(0, +c, +false);
-}
+  mutate_c(value: boolean): boolean {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
 
-static endC(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+    if (offset === 0) {
+      return false;
+    }
 
-static createC(builder:flatbuffers.Builder, c:boolean):flatbuffers.Offset {
-  C.startC(builder);
-  C.addC(builder, c);
-  return C.endC(builder);
-}
+    this.bb!.writeInt8(this.bb_pos + offset, +value);
+    return true;
+  }
 
-unpack(): CT {
-  return new CT(
-    this.c()
-  );
-}
+  static getFullyQualifiedName(): string {
+    return 'UnionUnderlyingType.C';
+  }
 
+  static startC(builder: flatbuffers.Builder) {
+    builder.startObject(1);
+  }
 
-unpackTo(_o: CT): void {
-  _o.c = this.c();
-}
+  static addC(builder: flatbuffers.Builder, c: boolean) {
+    builder.addFieldInt8(0, +c, +false);
+  }
+
+  static endC(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  static createC(builder: flatbuffers.Builder, c: boolean): flatbuffers.Offset {
+    C.startC(builder);
+    C.addC(builder, c);
+    return C.endC(builder);
+  }
+
+  unpack(): CT {
+    return new CT(this.c());
+  }
+
+  unpackTo(_o: CT): void {
+    _o.c = this.c();
+  }
 }
 
 export class CT implements flatbuffers.IGeneratedObject {
-constructor(
-  public c: boolean = false
-){}
+  constructor(public c: boolean = false) {}
 
-
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  return C.createC(builder,
-    this.c
-  );
-}
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    return C.createC(builder, this.c);
+  }
 }
diff --git a/tests/ts/union-underlying-type/d.d.ts b/tests/ts/union-underlying-type/d.d.ts
index fcb5f65..ef13a4f 100644
--- a/tests/ts/union-underlying-type/d.d.ts
+++ b/tests/ts/union-underlying-type/d.d.ts
@@ -1,41 +1,76 @@
 import * as flatbuffers from 'flatbuffers';
-import { AT } from '../union-underlying-type/a.js';
-import { ABC } from '../union-underlying-type/abc.js';
-import { BT } from '../union-underlying-type/b.js';
-import { CT } from '../union-underlying-type/c.js';
+import {AT} from '../union-underlying-type/a.js';
+import {ABC} from '../union-underlying-type/abc.js';
+import {BT} from '../union-underlying-type/b.js';
+import {CT} from '../union-underlying-type/c.js';
 export declare class D implements flatbuffers.IUnpackableObject<DT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): D;
-    static getRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D;
-    static getSizePrefixedRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D;
-    testUnionType(): ABC;
-    testUnion<T extends flatbuffers.Table>(obj: any): any | null;
-    testVectorOfUnionType(index: number): ABC | null;
-    testVectorOfUnionTypeLength(): number;
-    testVectorOfUnionTypeArray(): Int32Array | null;
-    testVectorOfUnion(index: number, obj: any): any | null;
-    testVectorOfUnionLength(): number;
-    static getFullyQualifiedName(): string;
-    static startD(builder: flatbuffers.Builder): void;
-    static addTestUnionType(builder: flatbuffers.Builder, testUnionType: ABC): void;
-    static addTestUnion(builder: flatbuffers.Builder, testUnionOffset: flatbuffers.Offset): void;
-    static addTestVectorOfUnionType(builder: flatbuffers.Builder, testVectorOfUnionTypeOffset: flatbuffers.Offset): void;
-    static createTestVectorOfUnionTypeVector(builder: flatbuffers.Builder, data: ABC[]): flatbuffers.Offset;
-    static startTestVectorOfUnionTypeVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addTestVectorOfUnion(builder: flatbuffers.Builder, testVectorOfUnionOffset: flatbuffers.Offset): void;
-    static createTestVectorOfUnionVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startTestVectorOfUnionVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endD(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createD(builder: flatbuffers.Builder, testUnionType: ABC, testUnionOffset: flatbuffers.Offset, testVectorOfUnionTypeOffset: flatbuffers.Offset, testVectorOfUnionOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): DT;
-    unpackTo(_o: DT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): D;
+  static getRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D;
+  static getSizePrefixedRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D;
+  testUnionType(): ABC;
+  testUnion<T extends flatbuffers.Table>(obj: any): any | null;
+  testVectorOfUnionType(index: number): ABC | null;
+  testVectorOfUnionTypeLength(): number;
+  testVectorOfUnionTypeArray(): Int32Array | null;
+  testVectorOfUnion(index: number, obj: any): any | null;
+  testVectorOfUnionLength(): number;
+  static getFullyQualifiedName(): string;
+  static startD(builder: flatbuffers.Builder): void;
+  static addTestUnionType(
+    builder: flatbuffers.Builder,
+    testUnionType: ABC,
+  ): void;
+  static addTestUnion(
+    builder: flatbuffers.Builder,
+    testUnionOffset: flatbuffers.Offset,
+  ): void;
+  static addTestVectorOfUnionType(
+    builder: flatbuffers.Builder,
+    testVectorOfUnionTypeOffset: flatbuffers.Offset,
+  ): void;
+  static createTestVectorOfUnionTypeVector(
+    builder: flatbuffers.Builder,
+    data: ABC[],
+  ): flatbuffers.Offset;
+  static startTestVectorOfUnionTypeVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addTestVectorOfUnion(
+    builder: flatbuffers.Builder,
+    testVectorOfUnionOffset: flatbuffers.Offset,
+  ): void;
+  static createTestVectorOfUnionVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startTestVectorOfUnionVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endD(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createD(
+    builder: flatbuffers.Builder,
+    testUnionType: ABC,
+    testUnionOffset: flatbuffers.Offset,
+    testVectorOfUnionTypeOffset: flatbuffers.Offset,
+    testVectorOfUnionOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): DT;
+  unpackTo(_o: DT): void;
 }
 export declare class DT implements flatbuffers.IGeneratedObject {
-    testUnionType: ABC;
-    testUnion: AT | BT | CT | null;
-    testVectorOfUnionType: (ABC)[];
-    testVectorOfUnion: (AT | BT | CT)[];
-    constructor(testUnionType?: ABC, testUnion?: AT | BT | CT | null, testVectorOfUnionType?: (ABC)[], testVectorOfUnion?: (AT | BT | CT)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  testUnionType: ABC;
+  testUnion: AT | BT | CT | null;
+  testVectorOfUnionType: ABC[];
+  testVectorOfUnion: (AT | BT | CT)[];
+  constructor(
+    testUnionType?: ABC,
+    testUnion?: AT | BT | CT | null,
+    testVectorOfUnionType?: ABC[],
+    testVectorOfUnion?: (AT | BT | CT)[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union-underlying-type/d.js b/tests/ts/union-underlying-type/d.js
index d85262e..0f387b2 100644
--- a/tests/ts/union-underlying-type/d.js
+++ b/tests/ts/union-underlying-type/d.js
@@ -1,163 +1,200 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { ABC, unionToAbc, unionListToAbc } from '../union-underlying-type/abc.js';
+
+import {ABC, unionListToAbc, unionToAbc} from '../union-underlying-type/abc.js';
+
 export class D {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsD(bb, obj) {
+    return (obj || new D())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsD(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new D())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  testUnionType() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : ABC.NONE;
+  }
+  testUnion(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
+  }
+  testVectorOfUnionType(index) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) :
+        null;
+  }
+  testVectorOfUnionTypeLength() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  testVectorOfUnionTypeArray() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        new Int32Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  testVectorOfUnion(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ?
+        this.bb.__union(
+            obj, this.bb.__vector(this.bb_pos + offset) + index * 4) :
+        null;
+  }
+  testVectorOfUnionLength() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'UnionUnderlyingType.D';
+  }
+  static startD(builder) {
+    builder.startObject(4);
+  }
+  static addTestUnionType(builder, testUnionType) {
+    builder.addFieldInt32(0, testUnionType, ABC.NONE);
+  }
+  static addTestUnion(builder, testUnionOffset) {
+    builder.addFieldOffset(1, testUnionOffset, 0);
+  }
+  static addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset) {
+    builder.addFieldOffset(2, testVectorOfUnionTypeOffset, 0);
+  }
+  static createTestVectorOfUnionTypeVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt32(data[i]);
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    return builder.endVector();
+  }
+  static startTestVectorOfUnionTypeVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static addTestVectorOfUnion(builder, testVectorOfUnionOffset) {
+    builder.addFieldOffset(3, testVectorOfUnionOffset, 0);
+  }
+  static createTestVectorOfUnionVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsD(bb, obj) {
-        return (obj || new D()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsD(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new D()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    testUnionType() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : ABC.NONE;
-    }
-    testUnion(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
-    }
-    testVectorOfUnionType(index) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : null;
-    }
-    testVectorOfUnionTypeLength() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    testVectorOfUnionTypeArray() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    testVectorOfUnion(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__union(obj, this.bb.__vector(this.bb_pos + offset) + index * 4) : null;
-    }
-    testVectorOfUnionLength() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'UnionUnderlyingType.D';
-    }
-    static startD(builder) {
-        builder.startObject(4);
-    }
-    static addTestUnionType(builder, testUnionType) {
-        builder.addFieldInt32(0, testUnionType, ABC.NONE);
-    }
-    static addTestUnion(builder, testUnionOffset) {
-        builder.addFieldOffset(1, testUnionOffset, 0);
-    }
-    static addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset) {
-        builder.addFieldOffset(2, testVectorOfUnionTypeOffset, 0);
-    }
-    static createTestVectorOfUnionTypeVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt32(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestVectorOfUnionTypeVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static addTestVectorOfUnion(builder, testVectorOfUnionOffset) {
-        builder.addFieldOffset(3, testVectorOfUnionOffset, 0);
-    }
-    static createTestVectorOfUnionVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startTestVectorOfUnionVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endD(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createD(builder, testUnionType, testUnionOffset, testVectorOfUnionTypeOffset, testVectorOfUnionOffset) {
-        D.startD(builder);
-        D.addTestUnionType(builder, testUnionType);
-        D.addTestUnion(builder, testUnionOffset);
-        D.addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset);
-        D.addTestVectorOfUnion(builder, testVectorOfUnionOffset);
-        return D.endD(builder);
-    }
-    unpack() {
-        return new DT(this.testUnionType(), (() => {
-            const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
+    return builder.endVector();
+  }
+  static startTestVectorOfUnionVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endD(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createD(
+      builder, testUnionType, testUnionOffset, testVectorOfUnionTypeOffset,
+      testVectorOfUnionOffset) {
+    D.startD(builder);
+    D.addTestUnionType(builder, testUnionType);
+    D.addTestUnion(builder, testUnionOffset);
+    D.addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset);
+    D.addTestVectorOfUnion(builder, testVectorOfUnionOffset);
+    return D.endD(builder);
+  }
+  unpack() {
+    return new DT(
+        this.testUnionType(), (() => {
+          const temp =
+              unionToAbc(this.testUnionType(), this.testUnion.bind(this));
+          if (temp === null) {
+            return null;
+          }
+          return temp.unpack();
+        })(),
+        this.bb.createScalarList(
+            this.testVectorOfUnionType.bind(this),
+            this.testVectorOfUnionTypeLength()),
+        (() => {
+          const ret = [];
+          for (let targetEnumIndex = 0;
+               targetEnumIndex < this.testVectorOfUnionTypeLength();
+               ++targetEnumIndex) {
+            const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
+            if (targetEnum === null || ABC[targetEnum] === 'NONE') {
+              continue;
+            }
+            const temp = unionListToAbc(
+                targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
             if (temp === null) {
-                return null;
+              continue;
             }
-            return temp.unpack();
-        })(), this.bb.createScalarList(this.testVectorOfUnionType.bind(this), this.testVectorOfUnionTypeLength()), (() => {
-            const ret = [];
-            for (let targetEnumIndex = 0; targetEnumIndex < this.testVectorOfUnionTypeLength(); ++targetEnumIndex) {
-                const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
-                if (targetEnum === null || ABC[targetEnum] === 'NONE') {
-                    continue;
-                }
-                const temp = unionListToAbc(targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
-                if (temp === null) {
-                    continue;
-                }
-                ret.push(temp.unpack());
-            }
-            return ret;
+            ret.push(temp.unpack());
+          }
+          return ret;
         })());
-    }
-    unpackTo(_o) {
-        _o.testUnionType = this.testUnionType();
-        _o.testUnion = (() => {
-            const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
-            if (temp === null) {
-                return null;
-            }
-            return temp.unpack();
-        })();
-        _o.testVectorOfUnionType = this.bb.createScalarList(this.testVectorOfUnionType.bind(this), this.testVectorOfUnionTypeLength());
-        _o.testVectorOfUnion = (() => {
-            const ret = [];
-            for (let targetEnumIndex = 0; targetEnumIndex < this.testVectorOfUnionTypeLength(); ++targetEnumIndex) {
-                const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
-                if (targetEnum === null || ABC[targetEnum] === 'NONE') {
-                    continue;
-                }
-                const temp = unionListToAbc(targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
-                if (temp === null) {
-                    continue;
-                }
-                ret.push(temp.unpack());
-            }
-            return ret;
-        })();
-    }
+  }
+  unpackTo(_o) {
+    _o.testUnionType = this.testUnionType();
+    _o.testUnion = (() => {
+      const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
+      if (temp === null) {
+        return null;
+      }
+      return temp.unpack();
+    })();
+    _o.testVectorOfUnionType = this.bb.createScalarList(
+        this.testVectorOfUnionType.bind(this),
+        this.testVectorOfUnionTypeLength());
+    _o.testVectorOfUnion = (() => {
+      const ret = [];
+      for (let targetEnumIndex = 0;
+           targetEnumIndex < this.testVectorOfUnionTypeLength();
+           ++targetEnumIndex) {
+        const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
+        if (targetEnum === null || ABC[targetEnum] === 'NONE') {
+          continue;
+        }
+        const temp = unionListToAbc(
+            targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
+        if (temp === null) {
+          continue;
+        }
+        ret.push(temp.unpack());
+      }
+      return ret;
+    })();
+  }
 }
 export class DT {
-    constructor(testUnionType = ABC.NONE, testUnion = null, testVectorOfUnionType = [], testVectorOfUnion = []) {
-        this.testUnionType = testUnionType;
-        this.testUnion = testUnion;
-        this.testVectorOfUnionType = testVectorOfUnionType;
-        this.testVectorOfUnion = testVectorOfUnion;
-    }
-    pack(builder) {
-        const testUnion = builder.createObjectOffset(this.testUnion);
-        const testVectorOfUnionType = D.createTestVectorOfUnionTypeVector(builder, this.testVectorOfUnionType);
-        const testVectorOfUnion = D.createTestVectorOfUnionVector(builder, builder.createObjectOffsetList(this.testVectorOfUnion));
-        return D.createD(builder, this.testUnionType, testUnion, testVectorOfUnionType, testVectorOfUnion);
-    }
+  constructor(
+      testUnionType = ABC.NONE, testUnion = null, testVectorOfUnionType = [],
+      testVectorOfUnion = []) {
+    this.testUnionType = testUnionType;
+    this.testUnion = testUnion;
+    this.testVectorOfUnionType = testVectorOfUnionType;
+    this.testVectorOfUnion = testVectorOfUnion;
+  }
+  pack(builder) {
+    const testUnion = builder.createObjectOffset(this.testUnion);
+    const testVectorOfUnionType = D.createTestVectorOfUnionTypeVector(
+        builder, this.testVectorOfUnionType);
+    const testVectorOfUnion = D.createTestVectorOfUnionVector(
+        builder, builder.createObjectOffsetList(this.testVectorOfUnion));
+    return D.createD(
+        builder, this.testUnionType, testUnion, testVectorOfUnionType,
+        testVectorOfUnion);
+  }
 }
diff --git a/tests/ts/union-underlying-type/d.ts b/tests/ts/union-underlying-type/d.ts
index b462feb..18c181a 100644
--- a/tests/ts/union-underlying-type/d.ts
+++ b/tests/ts/union-underlying-type/d.ts
@@ -4,194 +4,281 @@
 
 import * as flatbuffers from 'flatbuffers';
 
-import { A, AT } from '../union-underlying-type/a.js';
-import { ABC, unionToAbc, unionListToAbc } from '../union-underlying-type/abc.js';
-import { B, BT } from '../union-underlying-type/b.js';
-import { C, CT } from '../union-underlying-type/c.js';
-
+import {A, AT} from '../union-underlying-type/a.js';
+import {ABC, unionListToAbc, unionToAbc} from '../union-underlying-type/abc.js';
+import {B, BT} from '../union-underlying-type/b.js';
+import {C, CT} from '../union-underlying-type/c.js';
 
 export class D implements flatbuffers.IUnpackableObject<DT> {
-  bb: flatbuffers.ByteBuffer|null = null;
+  bb: flatbuffers.ByteBuffer | null = null;
   bb_pos = 0;
-  __init(i:number, bb:flatbuffers.ByteBuffer):D {
-  this.bb_pos = i;
-  this.bb = bb;
-  return this;
-}
-
-static getRootAsD(bb:flatbuffers.ByteBuffer, obj?:D):D {
-  return (obj || new D()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-static getSizePrefixedRootAsD(bb:flatbuffers.ByteBuffer, obj?:D):D {
-  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-  return (obj || new D()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-}
-
-testUnionType():ABC {
-  const offset = this.bb!.__offset(this.bb_pos, 4);
-  return offset ? this.bb!.readInt32(this.bb_pos + offset) : ABC.NONE;
-}
-
-testUnion<T extends flatbuffers.Table>(obj:any):any|null {
-  const offset = this.bb!.__offset(this.bb_pos, 6);
-  return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null;
-}
-
-testVectorOfUnionType(index: number):ABC|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.readInt32(this.bb!.__vector(this.bb_pos + offset) + index * 4) : null;
-}
-
-testVectorOfUnionTypeLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-testVectorOfUnionTypeArray():Int32Array|null {
-  const offset = this.bb!.__offset(this.bb_pos, 8);
-  return offset ? new Int32Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
-}
-
-testVectorOfUnion(index: number, obj:any):any|null {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__union(obj, this.bb!.__vector(this.bb_pos + offset) + index * 4) : null;
-}
-
-testVectorOfUnionLength():number {
-  const offset = this.bb!.__offset(this.bb_pos, 10);
-  return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
-}
-
-static getFullyQualifiedName():string {
-  return 'UnionUnderlyingType.D';
-}
-
-static startD(builder:flatbuffers.Builder) {
-  builder.startObject(4);
-}
-
-static addTestUnionType(builder:flatbuffers.Builder, testUnionType:ABC) {
-  builder.addFieldInt32(0, testUnionType, ABC.NONE);
-}
-
-static addTestUnion(builder:flatbuffers.Builder, testUnionOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(1, testUnionOffset, 0);
-}
-
-static addTestVectorOfUnionType(builder:flatbuffers.Builder, testVectorOfUnionTypeOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(2, testVectorOfUnionTypeOffset, 0);
-}
-
-static createTestVectorOfUnionTypeVector(builder:flatbuffers.Builder, data:ABC[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addInt32(data[i]!);
+  __init(i: number, bb: flatbuffers.ByteBuffer): D {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
   }
-  return builder.endVector();
-}
 
-static startTestVectorOfUnionTypeVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
-
-static addTestVectorOfUnion(builder:flatbuffers.Builder, testVectorOfUnionOffset:flatbuffers.Offset) {
-  builder.addFieldOffset(3, testVectorOfUnionOffset, 0);
-}
-
-static createTestVectorOfUnionVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
-  builder.startVector(4, data.length, 4);
-  for (let i = data.length - 1; i >= 0; i--) {
-    builder.addOffset(data[i]!);
+  static getRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D {
+    return (obj || new D()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
   }
-  return builder.endVector();
-}
 
-static startTestVectorOfUnionVector(builder:flatbuffers.Builder, numElems:number) {
-  builder.startVector(4, numElems, 4);
-}
+  static getSizePrefixedRootAsD(bb: flatbuffers.ByteBuffer, obj?: D): D {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new D()).__init(
+      bb.readInt32(bb.position()) + bb.position(),
+      bb,
+    );
+  }
 
-static endD(builder:flatbuffers.Builder):flatbuffers.Offset {
-  const offset = builder.endObject();
-  return offset;
-}
+  testUnionType(): ABC {
+    const offset = this.bb!.__offset(this.bb_pos, 4);
+    return offset ? this.bb!.readInt32(this.bb_pos + offset) : ABC.NONE;
+  }
 
-static createD(builder:flatbuffers.Builder, testUnionType:ABC, testUnionOffset:flatbuffers.Offset, testVectorOfUnionTypeOffset:flatbuffers.Offset, testVectorOfUnionOffset:flatbuffers.Offset):flatbuffers.Offset {
-  D.startD(builder);
-  D.addTestUnionType(builder, testUnionType);
-  D.addTestUnion(builder, testUnionOffset);
-  D.addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset);
-  D.addTestVectorOfUnion(builder, testVectorOfUnionOffset);
-  return D.endD(builder);
-}
+  testUnion<T extends flatbuffers.Table>(obj: any): any | null {
+    const offset = this.bb!.__offset(this.bb_pos, 6);
+    return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null;
+  }
 
-unpack(): DT {
-  return new DT(
-    this.testUnionType(),
-    (() => {
-      const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
-      if(temp === null) { return null; }
-      return temp.unpack()
-  })(),
-    this.bb!.createScalarList<ABC>(this.testVectorOfUnionType.bind(this), this.testVectorOfUnionTypeLength()),
-    (() => {
-    const ret: (AT|BT|CT)[] = [];
-    for(let targetEnumIndex = 0; targetEnumIndex < this.testVectorOfUnionTypeLength(); ++targetEnumIndex) {
-      const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
-      if(targetEnum === null || ABC[targetEnum!] === 'NONE') { continue; }
+  testVectorOfUnionType(index: number): ABC | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? this.bb!.readInt32(this.bb!.__vector(this.bb_pos + offset) + index * 4)
+      : null;
+  }
 
-      const temp = unionListToAbc(targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
-      if(temp === null) { continue; }
-      ret.push(temp.unpack());
+  testVectorOfUnionTypeLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  testVectorOfUnionTypeArray(): Int32Array | null {
+    const offset = this.bb!.__offset(this.bb_pos, 8);
+    return offset
+      ? new Int32Array(
+          this.bb!.bytes().buffer,
+          this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset),
+          this.bb!.__vector_len(this.bb_pos + offset),
+        )
+      : null;
+  }
+
+  testVectorOfUnion(index: number, obj: any): any | null {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset
+      ? this.bb!.__union(
+          obj,
+          this.bb!.__vector(this.bb_pos + offset) + index * 4,
+        )
+      : null;
+  }
+
+  testVectorOfUnionLength(): number {
+    const offset = this.bb!.__offset(this.bb_pos, 10);
+    return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
+  }
+
+  static getFullyQualifiedName(): string {
+    return 'UnionUnderlyingType.D';
+  }
+
+  static startD(builder: flatbuffers.Builder) {
+    builder.startObject(4);
+  }
+
+  static addTestUnionType(builder: flatbuffers.Builder, testUnionType: ABC) {
+    builder.addFieldInt32(0, testUnionType, ABC.NONE);
+  }
+
+  static addTestUnion(
+    builder: flatbuffers.Builder,
+    testUnionOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(1, testUnionOffset, 0);
+  }
+
+  static addTestVectorOfUnionType(
+    builder: flatbuffers.Builder,
+    testVectorOfUnionTypeOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(2, testVectorOfUnionTypeOffset, 0);
+  }
+
+  static createTestVectorOfUnionTypeVector(
+    builder: flatbuffers.Builder,
+    data: ABC[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt32(data[i]!);
     }
-    return ret;
-  })()
-  );
-}
+    return builder.endVector();
+  }
 
+  static startTestVectorOfUnionTypeVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
 
-unpackTo(_o: DT): void {
-  _o.testUnionType = this.testUnionType();
-  _o.testUnion = (() => {
-      const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
-      if(temp === null) { return null; }
-      return temp.unpack()
-  })();
-  _o.testVectorOfUnionType = this.bb!.createScalarList<ABC>(this.testVectorOfUnionType.bind(this), this.testVectorOfUnionTypeLength());
-  _o.testVectorOfUnion = (() => {
-    const ret: (AT|BT|CT)[] = [];
-    for(let targetEnumIndex = 0; targetEnumIndex < this.testVectorOfUnionTypeLength(); ++targetEnumIndex) {
-      const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
-      if(targetEnum === null || ABC[targetEnum!] === 'NONE') { continue; }
+  static addTestVectorOfUnion(
+    builder: flatbuffers.Builder,
+    testVectorOfUnionOffset: flatbuffers.Offset,
+  ) {
+    builder.addFieldOffset(3, testVectorOfUnionOffset, 0);
+  }
 
-      const temp = unionListToAbc(targetEnum, this.testVectorOfUnion.bind(this), targetEnumIndex);
-      if(temp === null) { continue; }
-      ret.push(temp.unpack());
+  static createTestVectorOfUnionVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]!);
     }
-    return ret;
-  })();
-}
+    return builder.endVector();
+  }
+
+  static startTestVectorOfUnionVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ) {
+    builder.startVector(4, numElems, 4);
+  }
+
+  static endD(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const offset = builder.endObject();
+    return offset;
+  }
+
+  static createD(
+    builder: flatbuffers.Builder,
+    testUnionType: ABC,
+    testUnionOffset: flatbuffers.Offset,
+    testVectorOfUnionTypeOffset: flatbuffers.Offset,
+    testVectorOfUnionOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset {
+    D.startD(builder);
+    D.addTestUnionType(builder, testUnionType);
+    D.addTestUnion(builder, testUnionOffset);
+    D.addTestVectorOfUnionType(builder, testVectorOfUnionTypeOffset);
+    D.addTestVectorOfUnion(builder, testVectorOfUnionOffset);
+    return D.endD(builder);
+  }
+
+  unpack(): DT {
+    return new DT(
+      this.testUnionType(),
+      (() => {
+        const temp = unionToAbc(
+          this.testUnionType(),
+          this.testUnion.bind(this),
+        );
+        if (temp === null) {
+          return null;
+        }
+        return temp.unpack();
+      })(),
+      this.bb!.createScalarList<ABC>(
+        this.testVectorOfUnionType.bind(this),
+        this.testVectorOfUnionTypeLength(),
+      ),
+      (() => {
+        const ret: (AT | BT | CT)[] = [];
+        for (
+          let targetEnumIndex = 0;
+          targetEnumIndex < this.testVectorOfUnionTypeLength();
+          ++targetEnumIndex
+        ) {
+          const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
+          if (targetEnum === null || ABC[targetEnum!] === 'NONE') {
+            continue;
+          }
+
+          const temp = unionListToAbc(
+            targetEnum,
+            this.testVectorOfUnion.bind(this),
+            targetEnumIndex,
+          );
+          if (temp === null) {
+            continue;
+          }
+          ret.push(temp.unpack());
+        }
+        return ret;
+      })(),
+    );
+  }
+
+  unpackTo(_o: DT): void {
+    _o.testUnionType = this.testUnionType();
+    _o.testUnion = (() => {
+      const temp = unionToAbc(this.testUnionType(), this.testUnion.bind(this));
+      if (temp === null) {
+        return null;
+      }
+      return temp.unpack();
+    })();
+    _o.testVectorOfUnionType = this.bb!.createScalarList<ABC>(
+      this.testVectorOfUnionType.bind(this),
+      this.testVectorOfUnionTypeLength(),
+    );
+    _o.testVectorOfUnion = (() => {
+      const ret: (AT | BT | CT)[] = [];
+      for (
+        let targetEnumIndex = 0;
+        targetEnumIndex < this.testVectorOfUnionTypeLength();
+        ++targetEnumIndex
+      ) {
+        const targetEnum = this.testVectorOfUnionType(targetEnumIndex);
+        if (targetEnum === null || ABC[targetEnum!] === 'NONE') {
+          continue;
+        }
+
+        const temp = unionListToAbc(
+          targetEnum,
+          this.testVectorOfUnion.bind(this),
+          targetEnumIndex,
+        );
+        if (temp === null) {
+          continue;
+        }
+        ret.push(temp.unpack());
+      }
+      return ret;
+    })();
+  }
 }
 
 export class DT implements flatbuffers.IGeneratedObject {
-constructor(
-  public testUnionType: ABC = ABC.NONE,
-  public testUnion: AT|BT|CT|null = null,
-  public testVectorOfUnionType: (ABC)[] = [],
-  public testVectorOfUnion: (AT|BT|CT)[] = []
-){}
+  constructor(
+    public testUnionType: ABC = ABC.NONE,
+    public testUnion: AT | BT | CT | null = null,
+    public testVectorOfUnionType: ABC[] = [],
+    public testVectorOfUnion: (AT | BT | CT)[] = [],
+  ) {}
 
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset {
+    const testUnion = builder.createObjectOffset(this.testUnion);
+    const testVectorOfUnionType = D.createTestVectorOfUnionTypeVector(
+      builder,
+      this.testVectorOfUnionType,
+    );
+    const testVectorOfUnion = D.createTestVectorOfUnionVector(
+      builder,
+      builder.createObjectOffsetList(this.testVectorOfUnion),
+    );
 
-pack(builder:flatbuffers.Builder): flatbuffers.Offset {
-  const testUnion = builder.createObjectOffset(this.testUnion);
-  const testVectorOfUnionType = D.createTestVectorOfUnionTypeVector(builder, this.testVectorOfUnionType);
-  const testVectorOfUnion = D.createTestVectorOfUnionVector(builder, builder.createObjectOffsetList(this.testVectorOfUnion));
-
-  return D.createD(builder,
-    this.testUnionType,
-    testUnion,
-    testVectorOfUnionType,
-    testVectorOfUnion
-  );
-}
+    return D.createD(
+      builder,
+      this.testUnionType,
+      testUnion,
+      testVectorOfUnionType,
+      testVectorOfUnion,
+    );
+  }
 }
diff --git a/tests/ts/union_underlying_type_test.js b/tests/ts/union_underlying_type_test.js
index d4649b3..6577c0b 100644
--- a/tests/ts/union_underlying_type_test.js
+++ b/tests/ts/union_underlying_type_test.js
@@ -1,3 +1,4 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 export * as UnionUnderlyingType from './union-underlying-type.js';
diff --git a/tests/ts/union_vector/attacker.d.ts b/tests/ts/union_vector/attacker.d.ts
index 302e1d0..8930833 100644
--- a/tests/ts/union_vector/attacker.d.ts
+++ b/tests/ts/union_vector/attacker.d.ts
@@ -1,22 +1,36 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class Attacker implements flatbuffers.IUnpackableObject<AttackerT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Attacker;
-    static getRootAsAttacker(bb: flatbuffers.ByteBuffer, obj?: Attacker): Attacker;
-    static getSizePrefixedRootAsAttacker(bb: flatbuffers.ByteBuffer, obj?: Attacker): Attacker;
-    swordAttackDamage(): number;
-    mutate_sword_attack_damage(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startAttacker(builder: flatbuffers.Builder): void;
-    static addSwordAttackDamage(builder: flatbuffers.Builder, swordAttackDamage: number): void;
-    static endAttacker(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createAttacker(builder: flatbuffers.Builder, swordAttackDamage: number): flatbuffers.Offset;
-    unpack(): AttackerT;
-    unpackTo(_o: AttackerT): void;
+export declare class Attacker
+  implements flatbuffers.IUnpackableObject<AttackerT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Attacker;
+  static getRootAsAttacker(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Attacker,
+  ): Attacker;
+  static getSizePrefixedRootAsAttacker(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Attacker,
+  ): Attacker;
+  swordAttackDamage(): number;
+  mutate_sword_attack_damage(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startAttacker(builder: flatbuffers.Builder): void;
+  static addSwordAttackDamage(
+    builder: flatbuffers.Builder,
+    swordAttackDamage: number,
+  ): void;
+  static endAttacker(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createAttacker(
+    builder: flatbuffers.Builder,
+    swordAttackDamage: number,
+  ): flatbuffers.Offset;
+  unpack(): AttackerT;
+  unpackTo(_o: AttackerT): void;
 }
 export declare class AttackerT implements flatbuffers.IGeneratedObject {
-    swordAttackDamage: number;
-    constructor(swordAttackDamage?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  swordAttackDamage: number;
+  constructor(swordAttackDamage?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/attacker.js b/tests/ts/union_vector/attacker.js
index 28ffc4a..1e72815 100644
--- a/tests/ts/union_vector/attacker.js
+++ b/tests/ts/union_vector/attacker.js
@@ -1,65 +1,68 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class Attacker {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsAttacker(bb, obj) {
+    return (obj || new Attacker())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsAttacker(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Attacker())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  swordAttackDamage() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_sword_attack_damage(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsAttacker(bb, obj) {
-        return (obj || new Attacker()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsAttacker(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Attacker()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    swordAttackDamage() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_sword_attack_damage(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'Attacker';
-    }
-    static startAttacker(builder) {
-        builder.startObject(1);
-    }
-    static addSwordAttackDamage(builder, swordAttackDamage) {
-        builder.addFieldInt32(0, swordAttackDamage, 0);
-    }
-    static endAttacker(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createAttacker(builder, swordAttackDamage) {
-        Attacker.startAttacker(builder);
-        Attacker.addSwordAttackDamage(builder, swordAttackDamage);
-        return Attacker.endAttacker(builder);
-    }
-    unpack() {
-        return new AttackerT(this.swordAttackDamage());
-    }
-    unpackTo(_o) {
-        _o.swordAttackDamage = this.swordAttackDamage();
-    }
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'Attacker';
+  }
+  static startAttacker(builder) {
+    builder.startObject(1);
+  }
+  static addSwordAttackDamage(builder, swordAttackDamage) {
+    builder.addFieldInt32(0, swordAttackDamage, 0);
+  }
+  static endAttacker(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createAttacker(builder, swordAttackDamage) {
+    Attacker.startAttacker(builder);
+    Attacker.addSwordAttackDamage(builder, swordAttackDamage);
+    return Attacker.endAttacker(builder);
+  }
+  unpack() {
+    return new AttackerT(this.swordAttackDamage());
+  }
+  unpackTo(_o) {
+    _o.swordAttackDamage = this.swordAttackDamage();
+  }
 }
 export class AttackerT {
-    constructor(swordAttackDamage = 0) {
-        this.swordAttackDamage = swordAttackDamage;
-    }
-    pack(builder) {
-        return Attacker.createAttacker(builder, this.swordAttackDamage);
-    }
+  constructor(swordAttackDamage = 0) {
+    this.swordAttackDamage = swordAttackDamage;
+  }
+  pack(builder) {
+    return Attacker.createAttacker(builder, this.swordAttackDamage);
+  }
 }
diff --git a/tests/ts/union_vector/book-reader.d.ts b/tests/ts/union_vector/book-reader.d.ts
index 42b7198..dd14e1f 100644
--- a/tests/ts/union_vector/book-reader.d.ts
+++ b/tests/ts/union_vector/book-reader.d.ts
@@ -1,18 +1,23 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class BookReader implements flatbuffers.IUnpackableObject<BookReaderT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): BookReader;
-    booksRead(): number;
-    mutate_books_read(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createBookReader(builder: flatbuffers.Builder, books_read: number): flatbuffers.Offset;
-    unpack(): BookReaderT;
-    unpackTo(_o: BookReaderT): void;
+export declare class BookReader
+  implements flatbuffers.IUnpackableObject<BookReaderT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): BookReader;
+  booksRead(): number;
+  mutate_books_read(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createBookReader(
+    builder: flatbuffers.Builder,
+    books_read: number,
+  ): flatbuffers.Offset;
+  unpack(): BookReaderT;
+  unpackTo(_o: BookReaderT): void;
 }
 export declare class BookReaderT implements flatbuffers.IGeneratedObject {
-    booksRead: number;
-    constructor(booksRead?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  booksRead: number;
+  constructor(booksRead?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/book-reader.js b/tests/ts/union_vector/book-reader.js
index 0d9e1a5..9448243 100644
--- a/tests/ts/union_vector/book-reader.js
+++ b/tests/ts/union_vector/book-reader.js
@@ -1,44 +1,44 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class BookReader {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    booksRead() {
-        return this.bb.readInt32(this.bb_pos);
-    }
-    mutate_books_read(value) {
-        this.bb.writeInt32(this.bb_pos + 0, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'BookReader';
-    }
-    static sizeOf() {
-        return 4;
-    }
-    static createBookReader(builder, books_read) {
-        builder.prep(4, 4);
-        builder.writeInt32(books_read);
-        return builder.offset();
-    }
-    unpack() {
-        return new BookReaderT(this.booksRead());
-    }
-    unpackTo(_o) {
-        _o.booksRead = this.booksRead();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  booksRead() {
+    return this.bb.readInt32(this.bb_pos);
+  }
+  mutate_books_read(value) {
+    this.bb.writeInt32(this.bb_pos + 0, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'BookReader';
+  }
+  static sizeOf() {
+    return 4;
+  }
+  static createBookReader(builder, books_read) {
+    builder.prep(4, 4);
+    builder.writeInt32(books_read);
+    return builder.offset();
+  }
+  unpack() {
+    return new BookReaderT(this.booksRead());
+  }
+  unpackTo(_o) {
+    _o.booksRead = this.booksRead();
+  }
 }
 export class BookReaderT {
-    constructor(booksRead = 0) {
-        this.booksRead = booksRead;
-    }
-    pack(builder) {
-        return BookReader.createBookReader(builder, this.booksRead);
-    }
+  constructor(booksRead = 0) {
+    this.booksRead = booksRead;
+  }
+  pack(builder) {
+    return BookReader.createBookReader(builder, this.booksRead);
+  }
 }
diff --git a/tests/ts/union_vector/character.d.ts b/tests/ts/union_vector/character.d.ts
index dbdb4d9..3b644bb 100644
--- a/tests/ts/union_vector/character.d.ts
+++ b/tests/ts/union_vector/character.d.ts
@@ -1,14 +1,26 @@
-import { Attacker } from './attacker.js';
-import { BookReader } from './book-reader.js';
-import { Rapunzel } from './rapunzel.js';
+import {Attacker} from './attacker.js';
+import {BookReader} from './book-reader.js';
+import {Rapunzel} from './rapunzel.js';
 export declare enum Character {
-    NONE = 0,
-    MuLan = 1,
-    Rapunzel = 2,
-    Belle = 3,
-    BookFan = 4,
-    Other = 5,
-    Unused = 6
+  NONE = 0,
+  MuLan = 1,
+  Rapunzel = 2,
+  Belle = 3,
+  BookFan = 4,
+  Other = 5,
+  Unused = 6,
 }
-export declare function unionToCharacter(type: Character, accessor: (obj: Attacker | BookReader | Rapunzel | string) => Attacker | BookReader | Rapunzel | string | null): Attacker | BookReader | Rapunzel | string | null;
-export declare function unionListToCharacter(type: Character, accessor: (index: number, obj: Attacker | BookReader | Rapunzel | string) => Attacker | BookReader | Rapunzel | string | null, index: number): Attacker | BookReader | Rapunzel | string | null;
+export declare function unionToCharacter(
+  type: Character,
+  accessor: (
+    obj: Attacker | BookReader | Rapunzel | string,
+  ) => Attacker | BookReader | Rapunzel | string | null,
+): Attacker | BookReader | Rapunzel | string | null;
+export declare function unionListToCharacter(
+  type: Character,
+  accessor: (
+    index: number,
+    obj: Attacker | BookReader | Rapunzel | string,
+  ) => Attacker | BookReader | Rapunzel | string | null,
+  index: number,
+): Attacker | BookReader | Rapunzel | string | null;
diff --git a/tests/ts/union_vector/character.js b/tests/ts/union_vector/character.js
index dfa7a19..b3c6442 100644
--- a/tests/ts/union_vector/character.js
+++ b/tests/ts/union_vector/character.js
@@ -1,39 +1,56 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { Attacker } from './attacker.js';
-import { BookReader } from './book-reader.js';
-import { Rapunzel } from './rapunzel.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {Attacker} from './attacker.js';
+import {BookReader} from './book-reader.js';
+import {Rapunzel} from './rapunzel.js';
 export var Character;
-(function (Character) {
-    Character[Character["NONE"] = 0] = "NONE";
-    Character[Character["MuLan"] = 1] = "MuLan";
-    Character[Character["Rapunzel"] = 2] = "Rapunzel";
-    Character[Character["Belle"] = 3] = "Belle";
-    Character[Character["BookFan"] = 4] = "BookFan";
-    Character[Character["Other"] = 5] = "Other";
-    Character[Character["Unused"] = 6] = "Unused";
+(function(Character) {
+Character[Character['NONE'] = 0] = 'NONE';
+Character[Character['MuLan'] = 1] = 'MuLan';
+Character[Character['Rapunzel'] = 2] = 'Rapunzel';
+Character[Character['Belle'] = 3] = 'Belle';
+Character[Character['BookFan'] = 4] = 'BookFan';
+Character[Character['Other'] = 5] = 'Other';
+Character[Character['Unused'] = 6] = 'Unused';
 })(Character || (Character = {}));
 export function unionToCharacter(type, accessor) {
-    switch (Character[type]) {
-        case 'NONE': return null;
-        case 'MuLan': return accessor(new Attacker());
-        case 'Rapunzel': return accessor(new Rapunzel());
-        case 'Belle': return accessor(new BookReader());
-        case 'BookFan': return accessor(new BookReader());
-        case 'Other': return accessor('');
-        case 'Unused': return accessor('');
-        default: return null;
-    }
+  switch (Character[type]) {
+    case 'NONE':
+      return null;
+    case 'MuLan':
+      return accessor(new Attacker());
+    case 'Rapunzel':
+      return accessor(new Rapunzel());
+    case 'Belle':
+      return accessor(new BookReader());
+    case 'BookFan':
+      return accessor(new BookReader());
+    case 'Other':
+      return accessor('');
+    case 'Unused':
+      return accessor('');
+    default:
+      return null;
+  }
 }
 export function unionListToCharacter(type, accessor, index) {
-    switch (Character[type]) {
-        case 'NONE': return null;
-        case 'MuLan': return accessor(index, new Attacker());
-        case 'Rapunzel': return accessor(index, new Rapunzel());
-        case 'Belle': return accessor(index, new BookReader());
-        case 'BookFan': return accessor(index, new BookReader());
-        case 'Other': return accessor(index, '');
-        case 'Unused': return accessor(index, '');
-        default: return null;
-    }
+  switch (Character[type]) {
+    case 'NONE':
+      return null;
+    case 'MuLan':
+      return accessor(index, new Attacker());
+    case 'Rapunzel':
+      return accessor(index, new Rapunzel());
+    case 'Belle':
+      return accessor(index, new BookReader());
+    case 'BookFan':
+      return accessor(index, new BookReader());
+    case 'Other':
+      return accessor(index, '');
+    case 'Unused':
+      return accessor(index, '');
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/union_vector/falling-tub.d.ts b/tests/ts/union_vector/falling-tub.d.ts
index 3cde3fc..dc773ec 100644
--- a/tests/ts/union_vector/falling-tub.d.ts
+++ b/tests/ts/union_vector/falling-tub.d.ts
@@ -1,18 +1,23 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class FallingTub implements flatbuffers.IUnpackableObject<FallingTubT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): FallingTub;
-    weight(): number;
-    mutate_weight(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createFallingTub(builder: flatbuffers.Builder, weight: number): flatbuffers.Offset;
-    unpack(): FallingTubT;
-    unpackTo(_o: FallingTubT): void;
+export declare class FallingTub
+  implements flatbuffers.IUnpackableObject<FallingTubT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): FallingTub;
+  weight(): number;
+  mutate_weight(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createFallingTub(
+    builder: flatbuffers.Builder,
+    weight: number,
+  ): flatbuffers.Offset;
+  unpack(): FallingTubT;
+  unpackTo(_o: FallingTubT): void;
 }
 export declare class FallingTubT implements flatbuffers.IGeneratedObject {
-    weight: number;
-    constructor(weight?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  weight: number;
+  constructor(weight?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/falling-tub.js b/tests/ts/union_vector/falling-tub.js
index d3c4dfe..407055a 100644
--- a/tests/ts/union_vector/falling-tub.js
+++ b/tests/ts/union_vector/falling-tub.js
@@ -1,44 +1,44 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class FallingTub {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    weight() {
-        return this.bb.readInt32(this.bb_pos);
-    }
-    mutate_weight(value) {
-        this.bb.writeInt32(this.bb_pos + 0, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'FallingTub';
-    }
-    static sizeOf() {
-        return 4;
-    }
-    static createFallingTub(builder, weight) {
-        builder.prep(4, 4);
-        builder.writeInt32(weight);
-        return builder.offset();
-    }
-    unpack() {
-        return new FallingTubT(this.weight());
-    }
-    unpackTo(_o) {
-        _o.weight = this.weight();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  weight() {
+    return this.bb.readInt32(this.bb_pos);
+  }
+  mutate_weight(value) {
+    this.bb.writeInt32(this.bb_pos + 0, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'FallingTub';
+  }
+  static sizeOf() {
+    return 4;
+  }
+  static createFallingTub(builder, weight) {
+    builder.prep(4, 4);
+    builder.writeInt32(weight);
+    return builder.offset();
+  }
+  unpack() {
+    return new FallingTubT(this.weight());
+  }
+  unpackTo(_o) {
+    _o.weight = this.weight();
+  }
 }
 export class FallingTubT {
-    constructor(weight = 0) {
-        this.weight = weight;
-    }
-    pack(builder) {
-        return FallingTub.createFallingTub(builder, this.weight);
-    }
+  constructor(weight = 0) {
+    this.weight = weight;
+  }
+  pack(builder) {
+    return FallingTub.createFallingTub(builder, this.weight);
+  }
 }
diff --git a/tests/ts/union_vector/gadget.d.ts b/tests/ts/union_vector/gadget.d.ts
index 46eaa5e..b0f018d 100644
--- a/tests/ts/union_vector/gadget.d.ts
+++ b/tests/ts/union_vector/gadget.d.ts
@@ -1,9 +1,19 @@
-import { FallingTub } from './falling-tub.js';
-import { HandFan } from './hand-fan.js';
+import {FallingTub} from './falling-tub.js';
+import {HandFan} from './hand-fan.js';
 export declare enum Gadget {
-    NONE = 0,
-    FallingTub = 1,
-    HandFan = 2
+  NONE = 0,
+  FallingTub = 1,
+  HandFan = 2,
 }
-export declare function unionToGadget(type: Gadget, accessor: (obj: FallingTub | HandFan) => FallingTub | HandFan | null): FallingTub | HandFan | null;
-export declare function unionListToGadget(type: Gadget, accessor: (index: number, obj: FallingTub | HandFan) => FallingTub | HandFan | null, index: number): FallingTub | HandFan | null;
+export declare function unionToGadget(
+  type: Gadget,
+  accessor: (obj: FallingTub | HandFan) => FallingTub | HandFan | null,
+): FallingTub | HandFan | null;
+export declare function unionListToGadget(
+  type: Gadget,
+  accessor: (
+    index: number,
+    obj: FallingTub | HandFan,
+  ) => FallingTub | HandFan | null,
+  index: number,
+): FallingTub | HandFan | null;
diff --git a/tests/ts/union_vector/gadget.js b/tests/ts/union_vector/gadget.js
index 1618ccc..46b8ea7 100644
--- a/tests/ts/union_vector/gadget.js
+++ b/tests/ts/union_vector/gadget.js
@@ -1,26 +1,35 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-import { FallingTub } from './falling-tub.js';
-import { HandFan } from './hand-fan.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+import {FallingTub} from './falling-tub.js';
+import {HandFan} from './hand-fan.js';
 export var Gadget;
-(function (Gadget) {
-    Gadget[Gadget["NONE"] = 0] = "NONE";
-    Gadget[Gadget["FallingTub"] = 1] = "FallingTub";
-    Gadget[Gadget["HandFan"] = 2] = "HandFan";
+(function(Gadget) {
+Gadget[Gadget['NONE'] = 0] = 'NONE';
+Gadget[Gadget['FallingTub'] = 1] = 'FallingTub';
+Gadget[Gadget['HandFan'] = 2] = 'HandFan';
 })(Gadget || (Gadget = {}));
 export function unionToGadget(type, accessor) {
-    switch (Gadget[type]) {
-        case 'NONE': return null;
-        case 'FallingTub': return accessor(new FallingTub());
-        case 'HandFan': return accessor(new HandFan());
-        default: return null;
-    }
+  switch (Gadget[type]) {
+    case 'NONE':
+      return null;
+    case 'FallingTub':
+      return accessor(new FallingTub());
+    case 'HandFan':
+      return accessor(new HandFan());
+    default:
+      return null;
+  }
 }
 export function unionListToGadget(type, accessor, index) {
-    switch (Gadget[type]) {
-        case 'NONE': return null;
-        case 'FallingTub': return accessor(index, new FallingTub());
-        case 'HandFan': return accessor(index, new HandFan());
-        default: return null;
-    }
+  switch (Gadget[type]) {
+    case 'NONE':
+      return null;
+    case 'FallingTub':
+      return accessor(index, new FallingTub());
+    case 'HandFan':
+      return accessor(index, new HandFan());
+    default:
+      return null;
+  }
 }
diff --git a/tests/ts/union_vector/hand-fan.d.ts b/tests/ts/union_vector/hand-fan.d.ts
index a1981df..7a815b4 100644
--- a/tests/ts/union_vector/hand-fan.d.ts
+++ b/tests/ts/union_vector/hand-fan.d.ts
@@ -1,22 +1,30 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class HandFan implements flatbuffers.IUnpackableObject<HandFanT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): HandFan;
-    static getRootAsHandFan(bb: flatbuffers.ByteBuffer, obj?: HandFan): HandFan;
-    static getSizePrefixedRootAsHandFan(bb: flatbuffers.ByteBuffer, obj?: HandFan): HandFan;
-    length(): number;
-    mutate_length(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static startHandFan(builder: flatbuffers.Builder): void;
-    static addLength(builder: flatbuffers.Builder, length: number): void;
-    static endHandFan(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static createHandFan(builder: flatbuffers.Builder, length: number): flatbuffers.Offset;
-    unpack(): HandFanT;
-    unpackTo(_o: HandFanT): void;
+export declare class HandFan
+  implements flatbuffers.IUnpackableObject<HandFanT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): HandFan;
+  static getRootAsHandFan(bb: flatbuffers.ByteBuffer, obj?: HandFan): HandFan;
+  static getSizePrefixedRootAsHandFan(
+    bb: flatbuffers.ByteBuffer,
+    obj?: HandFan,
+  ): HandFan;
+  length(): number;
+  mutate_length(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static startHandFan(builder: flatbuffers.Builder): void;
+  static addLength(builder: flatbuffers.Builder, length: number): void;
+  static endHandFan(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static createHandFan(
+    builder: flatbuffers.Builder,
+    length: number,
+  ): flatbuffers.Offset;
+  unpack(): HandFanT;
+  unpackTo(_o: HandFanT): void;
 }
 export declare class HandFanT implements flatbuffers.IGeneratedObject {
-    length: number;
-    constructor(length?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  length: number;
+  constructor(length?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/hand-fan.js b/tests/ts/union_vector/hand-fan.js
index b85b6d3..d1b04e5 100644
--- a/tests/ts/union_vector/hand-fan.js
+++ b/tests/ts/union_vector/hand-fan.js
@@ -1,65 +1,68 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
 export class HandFan {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsHandFan(bb, obj) {
+    return (obj || new HandFan())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsHandFan(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new HandFan())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  length() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
+  }
+  mutate_length(value) {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    if (offset === 0) {
+      return false;
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    static getRootAsHandFan(bb, obj) {
-        return (obj || new HandFan()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsHandFan(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new HandFan()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    length() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
-    }
-    mutate_length(value) {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        if (offset === 0) {
-            return false;
-        }
-        this.bb.writeInt32(this.bb_pos + offset, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'HandFan';
-    }
-    static startHandFan(builder) {
-        builder.startObject(1);
-    }
-    static addLength(builder, length) {
-        builder.addFieldInt32(0, length, 0);
-    }
-    static endHandFan(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static createHandFan(builder, length) {
-        HandFan.startHandFan(builder);
-        HandFan.addLength(builder, length);
-        return HandFan.endHandFan(builder);
-    }
-    unpack() {
-        return new HandFanT(this.length());
-    }
-    unpackTo(_o) {
-        _o.length = this.length();
-    }
+    this.bb.writeInt32(this.bb_pos + offset, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'HandFan';
+  }
+  static startHandFan(builder) {
+    builder.startObject(1);
+  }
+  static addLength(builder, length) {
+    builder.addFieldInt32(0, length, 0);
+  }
+  static endHandFan(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static createHandFan(builder, length) {
+    HandFan.startHandFan(builder);
+    HandFan.addLength(builder, length);
+    return HandFan.endHandFan(builder);
+  }
+  unpack() {
+    return new HandFanT(this.length());
+  }
+  unpackTo(_o) {
+    _o.length = this.length();
+  }
 }
 export class HandFanT {
-    constructor(length = 0) {
-        this.length = length;
-    }
-    pack(builder) {
-        return HandFan.createHandFan(builder, this.length);
-    }
+  constructor(length = 0) {
+    this.length = length;
+  }
+  pack(builder) {
+    return HandFan.createHandFan(builder, this.length);
+  }
 }
diff --git a/tests/ts/union_vector/movie.d.ts b/tests/ts/union_vector/movie.d.ts
index 68c9e16..a28d0ce 100644
--- a/tests/ts/union_vector/movie.d.ts
+++ b/tests/ts/union_vector/movie.d.ts
@@ -1,44 +1,90 @@
 import * as flatbuffers from 'flatbuffers';
-import { AttackerT } from './attacker.js';
-import { BookReaderT } from './book-reader.js';
-import { Character } from './character.js';
-import { RapunzelT } from './rapunzel.js';
+import {AttackerT} from './attacker.js';
+import {BookReaderT} from './book-reader.js';
+import {Character} from './character.js';
+import {RapunzelT} from './rapunzel.js';
 export declare class Movie implements flatbuffers.IUnpackableObject<MovieT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Movie;
-    static getRootAsMovie(bb: flatbuffers.ByteBuffer, obj?: Movie): Movie;
-    static getSizePrefixedRootAsMovie(bb: flatbuffers.ByteBuffer, obj?: Movie): Movie;
-    static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
-    mainCharacterType(): Character;
-    mainCharacter<T extends flatbuffers.Table>(obj: any | string): any | string | null;
-    charactersType(index: number): Character | null;
-    charactersTypeLength(): number;
-    charactersTypeArray(): Uint8Array | null;
-    characters(index: number, obj: any | string): any | string | null;
-    charactersLength(): number;
-    static getFullyQualifiedName(): string;
-    static startMovie(builder: flatbuffers.Builder): void;
-    static addMainCharacterType(builder: flatbuffers.Builder, mainCharacterType: Character): void;
-    static addMainCharacter(builder: flatbuffers.Builder, mainCharacterOffset: flatbuffers.Offset): void;
-    static addCharactersType(builder: flatbuffers.Builder, charactersTypeOffset: flatbuffers.Offset): void;
-    static createCharactersTypeVector(builder: flatbuffers.Builder, data: Character[]): flatbuffers.Offset;
-    static startCharactersTypeVector(builder: flatbuffers.Builder, numElems: number): void;
-    static addCharacters(builder: flatbuffers.Builder, charactersOffset: flatbuffers.Offset): void;
-    static createCharactersVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
-    static startCharactersVector(builder: flatbuffers.Builder, numElems: number): void;
-    static endMovie(builder: flatbuffers.Builder): flatbuffers.Offset;
-    static finishMovieBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static finishSizePrefixedMovieBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
-    static createMovie(builder: flatbuffers.Builder, mainCharacterType: Character, mainCharacterOffset: flatbuffers.Offset, charactersTypeOffset: flatbuffers.Offset, charactersOffset: flatbuffers.Offset): flatbuffers.Offset;
-    unpack(): MovieT;
-    unpackTo(_o: MovieT): void;
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Movie;
+  static getRootAsMovie(bb: flatbuffers.ByteBuffer, obj?: Movie): Movie;
+  static getSizePrefixedRootAsMovie(
+    bb: flatbuffers.ByteBuffer,
+    obj?: Movie,
+  ): Movie;
+  static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
+  mainCharacterType(): Character;
+  mainCharacter<T extends flatbuffers.Table>(
+    obj: any | string,
+  ): any | string | null;
+  charactersType(index: number): Character | null;
+  charactersTypeLength(): number;
+  charactersTypeArray(): Uint8Array | null;
+  characters(index: number, obj: any | string): any | string | null;
+  charactersLength(): number;
+  static getFullyQualifiedName(): string;
+  static startMovie(builder: flatbuffers.Builder): void;
+  static addMainCharacterType(
+    builder: flatbuffers.Builder,
+    mainCharacterType: Character,
+  ): void;
+  static addMainCharacter(
+    builder: flatbuffers.Builder,
+    mainCharacterOffset: flatbuffers.Offset,
+  ): void;
+  static addCharactersType(
+    builder: flatbuffers.Builder,
+    charactersTypeOffset: flatbuffers.Offset,
+  ): void;
+  static createCharactersTypeVector(
+    builder: flatbuffers.Builder,
+    data: Character[],
+  ): flatbuffers.Offset;
+  static startCharactersTypeVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static addCharacters(
+    builder: flatbuffers.Builder,
+    charactersOffset: flatbuffers.Offset,
+  ): void;
+  static createCharactersVector(
+    builder: flatbuffers.Builder,
+    data: flatbuffers.Offset[],
+  ): flatbuffers.Offset;
+  static startCharactersVector(
+    builder: flatbuffers.Builder,
+    numElems: number,
+  ): void;
+  static endMovie(builder: flatbuffers.Builder): flatbuffers.Offset;
+  static finishMovieBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static finishSizePrefixedMovieBuffer(
+    builder: flatbuffers.Builder,
+    offset: flatbuffers.Offset,
+  ): void;
+  static createMovie(
+    builder: flatbuffers.Builder,
+    mainCharacterType: Character,
+    mainCharacterOffset: flatbuffers.Offset,
+    charactersTypeOffset: flatbuffers.Offset,
+    charactersOffset: flatbuffers.Offset,
+  ): flatbuffers.Offset;
+  unpack(): MovieT;
+  unpackTo(_o: MovieT): void;
 }
 export declare class MovieT implements flatbuffers.IGeneratedObject {
-    mainCharacterType: Character;
-    mainCharacter: AttackerT | BookReaderT | RapunzelT | string | null;
-    charactersType: (Character)[];
-    characters: (AttackerT | BookReaderT | RapunzelT | string)[];
-    constructor(mainCharacterType?: Character, mainCharacter?: AttackerT | BookReaderT | RapunzelT | string | null, charactersType?: (Character)[], characters?: (AttackerT | BookReaderT | RapunzelT | string)[]);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  mainCharacterType: Character;
+  mainCharacter: AttackerT | BookReaderT | RapunzelT | string | null;
+  charactersType: Character[];
+  characters: (AttackerT | BookReaderT | RapunzelT | string)[];
+  constructor(
+    mainCharacterType?: Character,
+    mainCharacter?: AttackerT | BookReaderT | RapunzelT | string | null,
+    charactersType?: Character[],
+    characters?: (AttackerT | BookReaderT | RapunzelT | string)[],
+  );
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/movie.js b/tests/ts/union_vector/movie.js
index 81dee0e..36bcd3f 100644
--- a/tests/ts/union_vector/movie.js
+++ b/tests/ts/union_vector/movie.js
@@ -1,186 +1,222 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
 import * as flatbuffers from 'flatbuffers';
-import { Character, unionToCharacter, unionListToCharacter } from './character.js';
+
+import {Character, unionListToCharacter, unionToCharacter} from './character.js';
+
 export class Movie {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  static getRootAsMovie(bb, obj) {
+    return (obj || new Movie())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static getSizePrefixedRootAsMovie(bb, obj) {
+    bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
+    return (obj || new Movie())
+        .__init(bb.readInt32(bb.position()) + bb.position(), bb);
+  }
+  static bufferHasIdentifier(bb) {
+    return bb.__has_identifier('MOVI');
+  }
+  mainCharacterType() {
+    const offset = this.bb.__offset(this.bb_pos, 4);
+    return offset ? this.bb.readUint8(this.bb_pos + offset) : Character.NONE;
+  }
+  mainCharacter(obj) {
+    const offset = this.bb.__offset(this.bb_pos, 6);
+    return offset ? this.bb.__union_with_string(obj, this.bb_pos + offset) :
+                    null;
+  }
+  charactersType(index) {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) :
+        null;
+  }
+  charactersTypeLength() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  charactersTypeArray() {
+    const offset = this.bb.__offset(this.bb_pos, 8);
+    return offset ?
+        new Uint8Array(
+            this.bb.bytes().buffer,
+            this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset),
+            this.bb.__vector_len(this.bb_pos + offset)) :
+        null;
+  }
+  characters(index, obj) {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ?
+        this.bb.__union_with_string(
+            obj, this.bb.__vector(this.bb_pos + offset) + index * 4) :
+        null;
+  }
+  charactersLength() {
+    const offset = this.bb.__offset(this.bb_pos, 10);
+    return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
+  }
+  static getFullyQualifiedName() {
+    return 'Movie';
+  }
+  static startMovie(builder) {
+    builder.startObject(4);
+  }
+  static addMainCharacterType(builder, mainCharacterType) {
+    builder.addFieldInt8(0, mainCharacterType, Character.NONE);
+  }
+  static addMainCharacter(builder, mainCharacterOffset) {
+    builder.addFieldOffset(1, mainCharacterOffset, 0);
+  }
+  static addCharactersType(builder, charactersTypeOffset) {
+    builder.addFieldOffset(2, charactersTypeOffset, 0);
+  }
+  static createCharactersTypeVector(builder, data) {
+    builder.startVector(1, data.length, 1);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addInt8(data[i]);
     }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
+    return builder.endVector();
+  }
+  static startCharactersTypeVector(builder, numElems) {
+    builder.startVector(1, numElems, 1);
+  }
+  static addCharacters(builder, charactersOffset) {
+    builder.addFieldOffset(3, charactersOffset, 0);
+  }
+  static createCharactersVector(builder, data) {
+    builder.startVector(4, data.length, 4);
+    for (let i = data.length - 1; i >= 0; i--) {
+      builder.addOffset(data[i]);
     }
-    static getRootAsMovie(bb, obj) {
-        return (obj || new Movie()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static getSizePrefixedRootAsMovie(bb, obj) {
-        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
-        return (obj || new Movie()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
-    }
-    static bufferHasIdentifier(bb) {
-        return bb.__has_identifier('MOVI');
-    }
-    mainCharacterType() {
-        const offset = this.bb.__offset(this.bb_pos, 4);
-        return offset ? this.bb.readUint8(this.bb_pos + offset) : Character.NONE;
-    }
-    mainCharacter(obj) {
-        const offset = this.bb.__offset(this.bb_pos, 6);
-        return offset ? this.bb.__union_with_string(obj, this.bb_pos + offset) : null;
-    }
-    charactersType(index) {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : null;
-    }
-    charactersTypeLength() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    charactersTypeArray() {
-        const offset = this.bb.__offset(this.bb_pos, 8);
-        return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
-    }
-    characters(index, obj) {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__union_with_string(obj, this.bb.__vector(this.bb_pos + offset) + index * 4) : null;
-    }
-    charactersLength() {
-        const offset = this.bb.__offset(this.bb_pos, 10);
-        return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
-    }
-    static getFullyQualifiedName() {
-        return 'Movie';
-    }
-    static startMovie(builder) {
-        builder.startObject(4);
-    }
-    static addMainCharacterType(builder, mainCharacterType) {
-        builder.addFieldInt8(0, mainCharacterType, Character.NONE);
-    }
-    static addMainCharacter(builder, mainCharacterOffset) {
-        builder.addFieldOffset(1, mainCharacterOffset, 0);
-    }
-    static addCharactersType(builder, charactersTypeOffset) {
-        builder.addFieldOffset(2, charactersTypeOffset, 0);
-    }
-    static createCharactersTypeVector(builder, data) {
-        builder.startVector(1, data.length, 1);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addInt8(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startCharactersTypeVector(builder, numElems) {
-        builder.startVector(1, numElems, 1);
-    }
-    static addCharacters(builder, charactersOffset) {
-        builder.addFieldOffset(3, charactersOffset, 0);
-    }
-    static createCharactersVector(builder, data) {
-        builder.startVector(4, data.length, 4);
-        for (let i = data.length - 1; i >= 0; i--) {
-            builder.addOffset(data[i]);
-        }
-        return builder.endVector();
-    }
-    static startCharactersVector(builder, numElems) {
-        builder.startVector(4, numElems, 4);
-    }
-    static endMovie(builder) {
-        const offset = builder.endObject();
-        return offset;
-    }
-    static finishMovieBuffer(builder, offset) {
-        builder.finish(offset, 'MOVI');
-    }
-    static finishSizePrefixedMovieBuffer(builder, offset) {
-        builder.finish(offset, 'MOVI', true);
-    }
-    static createMovie(builder, mainCharacterType, mainCharacterOffset, charactersTypeOffset, charactersOffset) {
-        Movie.startMovie(builder);
-        Movie.addMainCharacterType(builder, mainCharacterType);
-        Movie.addMainCharacter(builder, mainCharacterOffset);
-        Movie.addCharactersType(builder, charactersTypeOffset);
-        Movie.addCharacters(builder, charactersOffset);
-        return Movie.endMovie(builder);
-    }
-    unpack() {
-        return new MovieT(this.mainCharacterType(), (() => {
-            const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this));
+    return builder.endVector();
+  }
+  static startCharactersVector(builder, numElems) {
+    builder.startVector(4, numElems, 4);
+  }
+  static endMovie(builder) {
+    const offset = builder.endObject();
+    return offset;
+  }
+  static finishMovieBuffer(builder, offset) {
+    builder.finish(offset, 'MOVI');
+  }
+  static finishSizePrefixedMovieBuffer(builder, offset) {
+    builder.finish(offset, 'MOVI', true);
+  }
+  static createMovie(
+      builder, mainCharacterType, mainCharacterOffset, charactersTypeOffset,
+      charactersOffset) {
+    Movie.startMovie(builder);
+    Movie.addMainCharacterType(builder, mainCharacterType);
+    Movie.addMainCharacter(builder, mainCharacterOffset);
+    Movie.addCharactersType(builder, charactersTypeOffset);
+    Movie.addCharacters(builder, charactersOffset);
+    return Movie.endMovie(builder);
+  }
+  unpack() {
+    return new MovieT(
+        this.mainCharacterType(), (() => {
+          const temp = unionToCharacter(
+              this.mainCharacterType(), this.mainCharacter.bind(this));
+          if (temp === null) {
+            return null;
+          }
+          if (typeof temp === 'string') {
+            return temp;
+          }
+          return temp.unpack();
+        })(),
+        this.bb.createScalarList(
+            this.charactersType.bind(this), this.charactersTypeLength()),
+        (() => {
+          const ret = [];
+          for (let targetEnumIndex = 0;
+               targetEnumIndex < this.charactersTypeLength();
+               ++targetEnumIndex) {
+            const targetEnum = this.charactersType(targetEnumIndex);
+            if (targetEnum === null || Character[targetEnum] === 'NONE') {
+              continue;
+            }
+            const temp = unionListToCharacter(
+                targetEnum, this.characters.bind(this), targetEnumIndex);
             if (temp === null) {
-                return null;
+              continue;
             }
             if (typeof temp === 'string') {
-                return temp;
+              ret.push(temp);
+              continue;
             }
-            return temp.unpack();
-        })(), this.bb.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()), (() => {
-            const ret = [];
-            for (let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) {
-                const targetEnum = this.charactersType(targetEnumIndex);
-                if (targetEnum === null || Character[targetEnum] === 'NONE') {
-                    continue;
-                }
-                const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex);
-                if (temp === null) {
-                    continue;
-                }
-                if (typeof temp === 'string') {
-                    ret.push(temp);
-                    continue;
-                }
-                ret.push(temp.unpack());
-            }
-            return ret;
+            ret.push(temp.unpack());
+          }
+          return ret;
         })());
-    }
-    unpackTo(_o) {
-        _o.mainCharacterType = this.mainCharacterType();
-        _o.mainCharacter = (() => {
-            const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this));
-            if (temp === null) {
-                return null;
-            }
-            if (typeof temp === 'string') {
-                return temp;
-            }
-            return temp.unpack();
-        })();
-        _o.charactersType = this.bb.createScalarList(this.charactersType.bind(this), this.charactersTypeLength());
-        _o.characters = (() => {
-            const ret = [];
-            for (let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) {
-                const targetEnum = this.charactersType(targetEnumIndex);
-                if (targetEnum === null || Character[targetEnum] === 'NONE') {
-                    continue;
-                }
-                const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex);
-                if (temp === null) {
-                    continue;
-                }
-                if (typeof temp === 'string') {
-                    ret.push(temp);
-                    continue;
-                }
-                ret.push(temp.unpack());
-            }
-            return ret;
-        })();
-    }
+  }
+  unpackTo(_o) {
+    _o.mainCharacterType = this.mainCharacterType();
+    _o.mainCharacter = (() => {
+      const temp = unionToCharacter(
+          this.mainCharacterType(), this.mainCharacter.bind(this));
+      if (temp === null) {
+        return null;
+      }
+      if (typeof temp === 'string') {
+        return temp;
+      }
+      return temp.unpack();
+    })();
+    _o.charactersType = this.bb.createScalarList(
+        this.charactersType.bind(this), this.charactersTypeLength());
+    _o.characters = (() => {
+      const ret = [];
+      for (let targetEnumIndex = 0;
+           targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) {
+        const targetEnum = this.charactersType(targetEnumIndex);
+        if (targetEnum === null || Character[targetEnum] === 'NONE') {
+          continue;
+        }
+        const temp = unionListToCharacter(
+            targetEnum, this.characters.bind(this), targetEnumIndex);
+        if (temp === null) {
+          continue;
+        }
+        if (typeof temp === 'string') {
+          ret.push(temp);
+          continue;
+        }
+        ret.push(temp.unpack());
+      }
+      return ret;
+    })();
+  }
 }
 export class MovieT {
-    constructor(mainCharacterType = Character.NONE, mainCharacter = null, charactersType = [], characters = []) {
-        this.mainCharacterType = mainCharacterType;
-        this.mainCharacter = mainCharacter;
-        this.charactersType = charactersType;
-        this.characters = characters;
-    }
-    pack(builder) {
-        const mainCharacter = builder.createObjectOffset(this.mainCharacter);
-        const charactersType = Movie.createCharactersTypeVector(builder, this.charactersType);
-        const characters = Movie.createCharactersVector(builder, builder.createObjectOffsetList(this.characters));
-        return Movie.createMovie(builder, this.mainCharacterType, mainCharacter, charactersType, characters);
-    }
+  constructor(
+      mainCharacterType = Character.NONE, mainCharacter = null,
+      charactersType = [], characters = []) {
+    this.mainCharacterType = mainCharacterType;
+    this.mainCharacter = mainCharacter;
+    this.charactersType = charactersType;
+    this.characters = characters;
+  }
+  pack(builder) {
+    const mainCharacter = builder.createObjectOffset(this.mainCharacter);
+    const charactersType =
+        Movie.createCharactersTypeVector(builder, this.charactersType);
+    const characters = Movie.createCharactersVector(
+        builder, builder.createObjectOffsetList(this.characters));
+    return Movie.createMovie(
+        builder, this.mainCharacterType, mainCharacter, charactersType,
+        characters);
+  }
 }
diff --git a/tests/ts/union_vector/rapunzel.d.ts b/tests/ts/union_vector/rapunzel.d.ts
index c28f1b8..60b3e5f 100644
--- a/tests/ts/union_vector/rapunzel.d.ts
+++ b/tests/ts/union_vector/rapunzel.d.ts
@@ -1,18 +1,23 @@
 import * as flatbuffers from 'flatbuffers';
-export declare class Rapunzel implements flatbuffers.IUnpackableObject<RapunzelT> {
-    bb: flatbuffers.ByteBuffer | null;
-    bb_pos: number;
-    __init(i: number, bb: flatbuffers.ByteBuffer): Rapunzel;
-    hairLength(): number;
-    mutate_hair_length(value: number): boolean;
-    static getFullyQualifiedName(): string;
-    static sizeOf(): number;
-    static createRapunzel(builder: flatbuffers.Builder, hair_length: number): flatbuffers.Offset;
-    unpack(): RapunzelT;
-    unpackTo(_o: RapunzelT): void;
+export declare class Rapunzel
+  implements flatbuffers.IUnpackableObject<RapunzelT>
+{
+  bb: flatbuffers.ByteBuffer | null;
+  bb_pos: number;
+  __init(i: number, bb: flatbuffers.ByteBuffer): Rapunzel;
+  hairLength(): number;
+  mutate_hair_length(value: number): boolean;
+  static getFullyQualifiedName(): string;
+  static sizeOf(): number;
+  static createRapunzel(
+    builder: flatbuffers.Builder,
+    hair_length: number,
+  ): flatbuffers.Offset;
+  unpack(): RapunzelT;
+  unpackTo(_o: RapunzelT): void;
 }
 export declare class RapunzelT implements flatbuffers.IGeneratedObject {
-    hairLength: number;
-    constructor(hairLength?: number);
-    pack(builder: flatbuffers.Builder): flatbuffers.Offset;
+  hairLength: number;
+  constructor(hairLength?: number);
+  pack(builder: flatbuffers.Builder): flatbuffers.Offset;
 }
diff --git a/tests/ts/union_vector/rapunzel.js b/tests/ts/union_vector/rapunzel.js
index 67a5e44..51614eb 100644
--- a/tests/ts/union_vector/rapunzel.js
+++ b/tests/ts/union_vector/rapunzel.js
@@ -1,44 +1,44 @@
 // automatically generated by the FlatBuffers compiler, do not modify
 export class Rapunzel {
-    constructor() {
-        this.bb = null;
-        this.bb_pos = 0;
-    }
-    __init(i, bb) {
-        this.bb_pos = i;
-        this.bb = bb;
-        return this;
-    }
-    hairLength() {
-        return this.bb.readInt32(this.bb_pos);
-    }
-    mutate_hair_length(value) {
-        this.bb.writeInt32(this.bb_pos + 0, value);
-        return true;
-    }
-    static getFullyQualifiedName() {
-        return 'Rapunzel';
-    }
-    static sizeOf() {
-        return 4;
-    }
-    static createRapunzel(builder, hair_length) {
-        builder.prep(4, 4);
-        builder.writeInt32(hair_length);
-        return builder.offset();
-    }
-    unpack() {
-        return new RapunzelT(this.hairLength());
-    }
-    unpackTo(_o) {
-        _o.hairLength = this.hairLength();
-    }
+  constructor() {
+    this.bb = null;
+    this.bb_pos = 0;
+  }
+  __init(i, bb) {
+    this.bb_pos = i;
+    this.bb = bb;
+    return this;
+  }
+  hairLength() {
+    return this.bb.readInt32(this.bb_pos);
+  }
+  mutate_hair_length(value) {
+    this.bb.writeInt32(this.bb_pos + 0, value);
+    return true;
+  }
+  static getFullyQualifiedName() {
+    return 'Rapunzel';
+  }
+  static sizeOf() {
+    return 4;
+  }
+  static createRapunzel(builder, hair_length) {
+    builder.prep(4, 4);
+    builder.writeInt32(hair_length);
+    return builder.offset();
+  }
+  unpack() {
+    return new RapunzelT(this.hairLength());
+  }
+  unpackTo(_o) {
+    _o.hairLength = this.hairLength();
+  }
 }
 export class RapunzelT {
-    constructor(hairLength = 0) {
-        this.hairLength = hairLength;
-    }
-    pack(builder) {
-        return Rapunzel.createRapunzel(builder, this.hairLength);
-    }
+  constructor(hairLength = 0) {
+    this.hairLength = hairLength;
+  }
+  pack(builder) {
+    return Rapunzel.createRapunzel(builder, this.hairLength);
+  }
 }
diff --git a/tests/ts/union_vector/union_vector.d.ts b/tests/ts/union_vector/union_vector.d.ts
index ebd9379..ae13e6d 100644
--- a/tests/ts/union_vector/union_vector.d.ts
+++ b/tests/ts/union_vector/union_vector.d.ts
@@ -1,8 +1,8 @@
-export { Attacker, AttackerT } from './attacker.js';
-export { BookReader, BookReaderT } from './book-reader.js';
-export { Character } from './character.js';
-export { FallingTub, FallingTubT } from './falling-tub.js';
-export { Gadget } from './gadget.js';
-export { HandFan, HandFanT } from './hand-fan.js';
-export { Movie, MovieT } from './movie.js';
-export { Rapunzel, RapunzelT } from './rapunzel.js';
+export {Attacker, AttackerT} from './attacker.js';
+export {BookReader, BookReaderT} from './book-reader.js';
+export {Character} from './character.js';
+export {FallingTub, FallingTubT} from './falling-tub.js';
+export {Gadget} from './gadget.js';
+export {HandFan, HandFanT} from './hand-fan.js';
+export {Movie, MovieT} from './movie.js';
+export {Rapunzel, RapunzelT} from './rapunzel.js';
diff --git a/tests/ts/union_vector/union_vector.js b/tests/ts/union_vector/union_vector.js
index 63b782e..fc7b8ec 100644
--- a/tests/ts/union_vector/union_vector.js
+++ b/tests/ts/union_vector/union_vector.js
@@ -1,10 +1,11 @@
 // automatically generated by the FlatBuffers compiler, do not modify
-/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
-export { Attacker, AttackerT } from './attacker.js';
-export { BookReader, BookReaderT } from './book-reader.js';
-export { Character } from './character.js';
-export { FallingTub, FallingTubT } from './falling-tub.js';
-export { Gadget } from './gadget.js';
-export { HandFan, HandFanT } from './hand-fan.js';
-export { Movie, MovieT } from './movie.js';
-export { Rapunzel, RapunzelT } from './rapunzel.js';
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any,
+ * @typescript-eslint/no-non-null-assertion */
+export {Attacker, AttackerT} from './attacker.js';
+export {BookReader, BookReaderT} from './book-reader.js';
+export {Character} from './character.js';
+export {FallingTub, FallingTubT} from './falling-tub.js';
+export {Gadget} from './gadget.js';
+export {HandFan, HandFanT} from './hand-fan.js';
+export {Movie, MovieT} from './movie.js';
+export {Rapunzel, RapunzelT} from './rapunzel.js';
diff --git a/tests/util_test.h b/tests/util_test.h
index 9f2a257..4e2fc9d 100644
--- a/tests/util_test.h
+++ b/tests/util_test.h
@@ -8,7 +8,6 @@
 void IsAsciiUtilsTest();
 void UtilConvertCase();
 
-
 }  // namespace tests
 }  // namespace flatbuffers
 
diff --git a/ts/builder.ts b/ts/builder.ts
index f7f69cf..54a95ab 100644
--- a/ts/builder.ts
+++ b/ts/builder.ts
@@ -1,607 +1,660 @@
-import { ByteBuffer } from "./byte-buffer.js"
-import { SIZEOF_SHORT, SIZE_PREFIX_LENGTH, SIZEOF_INT, FILE_IDENTIFIER_LENGTH } from "./constants.js"
-import { Offset, IGeneratedObject } from "./types.js"
+import {ByteBuffer} from './byte-buffer.js';
+import {
+  FILE_IDENTIFIER_LENGTH,
+  SIZE_PREFIX_LENGTH,
+  SIZEOF_INT,
+  SIZEOF_SHORT,
+} from './constants.js';
+import {IGeneratedObject, Offset} from './types.js';
 
 export class Builder {
-    private bb: ByteBuffer
-    /** Remaining space in the ByteBuffer. */
-    private space: number
-    /** Minimum alignment encountered so far. */
-    private minalign = 1
-    /** The vtable for the current table. */
-    private vtable: number[] | null = null
-    /** The amount of fields we're actually using. */
-    private vtable_in_use = 0
-    /** Whether we are currently serializing a table. */
-    private isNested = false;
-    /** Starting offset of the current struct/table. */
-    private object_start = 0
-    /** List of offsets of all vtables. */
-    private vtables: number[] = []
-    /** For the current vector being built. */
-    private vector_num_elems = 0 
-    /** False omits default values from the serialized data */
-    private force_defaults = false;
-    
-    private string_maps: Map<string | Uint8Array, number> | null = null;
-    private text_encoder = new TextEncoder();
-  
-    /**
-     * Create a FlatBufferBuilder.
-     */
-    constructor(opt_initial_size?: number) {
-      let initial_size: number;
-  
-      if (!opt_initial_size) {
-        initial_size = 1024;
-      } else {
-        initial_size = opt_initial_size;
-      }
-  
-      /**
-       * @type {ByteBuffer}
-       * @private
-       */
-      this.bb = ByteBuffer.allocate(initial_size);
-      this.space = initial_size;
-    }
-  
-  
-    clear(): void {
-      this.bb.clear();
-      this.space = this.bb.capacity();
-      this.minalign = 1;
-      this.vtable = null;
-      this.vtable_in_use = 0;
-      this.isNested = false;
-      this.object_start = 0;
-      this.vtables = [];
-      this.vector_num_elems = 0;
-      this.force_defaults = false;
-      this.string_maps = null;
-    }
-  
-    /**
-     * In order to save space, fields that are set to their default value
-     * don't get serialized into the buffer. Forcing defaults provides a
-     * way to manually disable this optimization.
-     *
-     * @param forceDefaults true always serializes default values
-     */
-    forceDefaults(forceDefaults: boolean): void {
-      this.force_defaults = forceDefaults;
-    }
-  
-    /**
-     * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
-     * called finish(). The actual data starts at the ByteBuffer's current position,
-     * not necessarily at 0.
-     */
-    dataBuffer(): ByteBuffer {
-      return this.bb;
-    }
-  
-    /**
-     * Get the bytes representing the FlatBuffer. Only call this after you've
-     * called finish().
-     */
-    asUint8Array(): Uint8Array {
-      return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());
-    }
-  
-    /**
-     * Prepare to write an element of `size` after `additional_bytes` have been
-     * written, e.g. if you write a string, you need to align such the int length
-     * field is aligned to 4 bytes, and the string data follows it directly. If all
-     * you need to do is alignment, `additional_bytes` will be 0.
-     *
-     * @param size This is the of the new element to write
-     * @param additional_bytes The padding size
-     */
-    prep(size: number, additional_bytes: number): void {
-      // Track the biggest thing we've ever aligned to.
-      if (size > this.minalign) {
-        this.minalign = size;
-      }
-  
-      // Find the amount of alignment needed such that `size` is properly
-      // aligned after `additional_bytes`
-      const align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);
-  
-      // Reallocate the buffer if needed.
-      while (this.space < align_size + size + additional_bytes) {
-        const old_buf_size = this.bb.capacity();
-        this.bb = Builder.growByteBuffer(this.bb);
-        this.space += this.bb.capacity() - old_buf_size;
-      }
-  
-      this.pad(align_size);
-    }
-  
-    pad(byte_size: number): void {
-      for (let i = 0; i < byte_size; i++) {
-        this.bb.writeInt8(--this.space, 0);
-      }
-    }
-  
-    writeInt8(value: number): void {
-      this.bb.writeInt8(this.space -= 1, value);
-    }
-  
-    writeInt16(value: number): void {
-      this.bb.writeInt16(this.space -= 2, value);
-    }
-  
-    writeInt32(value: number): void {
-      this.bb.writeInt32(this.space -= 4, value);
-    }
-  
-    writeInt64(value: bigint): void {
-      this.bb.writeInt64(this.space -= 8, value);
-    }
-  
-    writeFloat32(value: number): void {
-      this.bb.writeFloat32(this.space -= 4, value);
-    }
-  
-    writeFloat64(value: number): void {
-      this.bb.writeFloat64(this.space -= 8, value);
-    }
-  
-    /**
-     * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `int8` to add the buffer.
-     */
-    addInt8(value: number): void {
-      this.prep(1, 0);
-      this.writeInt8(value);
-    }
-  
-    /**
-     * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `int16` to add the buffer.
-     */
-    addInt16(value: number): void {
-      this.prep(2, 0);
-      this.writeInt16(value);
-    }
-  
-    /**
-     * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `int32` to add the buffer.
-     */
-    addInt32(value: number): void {
-      this.prep(4, 0);
-      this.writeInt32(value);
-    }
-  
-    /**
-     * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `int64` to add the buffer.
-     */
-    addInt64(value: bigint): void {
-      this.prep(8, 0);
-      this.writeInt64(value);
-    }
-  
-    /**
-     * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `float32` to add the buffer.
-     */
-    addFloat32(value: number): void {
-      this.prep(4, 0);
-      this.writeFloat32(value);
-    }
-  
-    /**
-     * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).
-     * @param value The `float64` to add the buffer.
-     */
-    addFloat64(value: number): void {
-      this.prep(8, 0);
-      this.writeFloat64(value);
-    }
-  
-    addFieldInt8(voffset: number, value: number, defaultValue: number|null): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addInt8(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldInt16(voffset: number, value: number, defaultValue: number|null): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addInt16(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldInt32(voffset: number, value: number, defaultValue: number|null): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addInt32(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldInt64(voffset: number, value: bigint, defaultValue: bigint|null): void {
-      if (this.force_defaults || value !== defaultValue) {
-        this.addInt64(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldFloat32(voffset: number, value: number, defaultValue: number|null): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addFloat32(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldFloat64(voffset: number, value: number, defaultValue: number|null): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addFloat64(value);
-        this.slot(voffset);
-      }
-    }
-  
-    addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void {
-      if (this.force_defaults || value != defaultValue) {
-        this.addOffset(value);
-        this.slot(voffset);
-      }
-    }
-  
-    /**
-     * Structs are stored inline, so nothing additional is being added. `d` is always 0.
-     */
-    addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void {
-      if (value != defaultValue) {
-        this.nested(value);
-        this.slot(voffset);
-      }
-    }
-  
-    /**
-     * Structures are always stored inline, they need to be created right
-     * where they're used.  You'll get this assertion failure if you
-     * created it elsewhere.
-     */
-    nested(obj: Offset): void {
-      if (obj != this.offset()) {
-        throw new TypeError('FlatBuffers: struct must be serialized inline.');
-      }
-    }
-  
-    /**
-     * Should not be creating any other object, string or vector
-     * while an object is being constructed
-     */
-    notNested(): void {
-      if (this.isNested) {
-        throw new TypeError('FlatBuffers: object serialization must not be nested.');
-      }
-    }
-  
-    /**
-     * Set the current vtable at `voffset` to the current location in the buffer.
-     */
-    slot(voffset: number): void {
-      if (this.vtable !== null)
-        this.vtable[voffset] = this.offset();
-    }
-  
-    /**
-     * @returns Offset relative to the end of the buffer.
-     */
-    offset(): Offset {
-      return this.bb.capacity() - this.space;
-    }
-  
-    /**
-     * Doubles the size of the backing ByteBuffer and copies the old data towards
-     * the end of the new buffer (since we build the buffer backwards).
-     *
-     * @param bb The current buffer with the existing data
-     * @returns A new byte buffer with the old data copied
-     * to it. The data is located at the end of the buffer.
-     *
-     * uint8Array.set() formally takes {Array<number>|ArrayBufferView}, so to pass
-     * it a uint8Array we need to suppress the type check:
-     * @suppress {checkTypes}
-     */
-    static growByteBuffer(bb: ByteBuffer): ByteBuffer {
-      const old_buf_size = bb.capacity();
-  
-      // Ensure we don't grow beyond what fits in an int.
-      if (old_buf_size & 0xC0000000) {
-        throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');
-      }
-  
-      const new_buf_size = old_buf_size << 1;
-      const nbb = ByteBuffer.allocate(new_buf_size);
-      nbb.setPosition(new_buf_size - old_buf_size);
-      nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);
-      return nbb;
-    }
-  
-    /**
-     * Adds on offset, relative to where it will be written.
-     *
-     * @param offset The offset to add.
-     */
-    addOffset(offset: Offset): void {
-      this.prep(SIZEOF_INT, 0); // Ensure alignment is already done.
-      this.writeInt32(this.offset() - offset + SIZEOF_INT);
-    }
-  
-    /**
-     * Start encoding a new object in the buffer.  Users will not usually need to
-     * call this directly. The FlatBuffers compiler will generate helper methods
-     * that call this method internally.
-     */
-    startObject(numfields: number): void {
-      this.notNested();
-      if (this.vtable == null) {
-        this.vtable = [];
-      }
-      this.vtable_in_use = numfields;
-      for (let i = 0; i < numfields; i++) {
-        this.vtable[i] = 0; // This will push additional elements as needed
-      }
-      this.isNested = true;
-      this.object_start = this.offset();
-    }
-  
-    /**
-     * Finish off writing the object that is under construction.
-     *
-     * @returns The offset to the object inside `dataBuffer`
-     */
-    endObject(): Offset {
-      if (this.vtable == null || !this.isNested) {
-        throw new Error('FlatBuffers: endObject called without startObject');
-      }
-  
-      this.addInt32(0);
-      const vtableloc = this.offset();
-  
-      // Trim trailing zeroes.
-      let i = this.vtable_in_use - 1;
-      // eslint-disable-next-line no-empty
-      for (; i >= 0 && this.vtable[i] == 0; i--) {}
-      const trimmed_size = i + 1;
-  
-      // Write out the current vtable.
-      for (; i >= 0; i--) {
-        // Offset relative to the start of the table.
-        this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);
-      }
-  
-      const standard_fields = 2; // The fields below:
-      this.addInt16(vtableloc - this.object_start);
-      const len = (trimmed_size + standard_fields) * SIZEOF_SHORT;
-      this.addInt16(len);
-  
-      // Search for an existing vtable that matches the current one.
-      let existing_vtable = 0;
-      const vt1 = this.space;
-    outer_loop:
-      for (i = 0; i < this.vtables.length; i++) {
-        const vt2 = this.bb.capacity() - this.vtables[i];
-        if (len == this.bb.readInt16(vt2)) {
-          for (let j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {
-            if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {
-              continue outer_loop;
-            }
-          }
-          existing_vtable = this.vtables[i];
-          break;
-        }
-      }
-  
-      if (existing_vtable) {
-        // Found a match:
-        // Remove the current vtable.
-        this.space = this.bb.capacity() - vtableloc;
-  
-        // Point table to existing vtable.
-        this.bb.writeInt32(this.space, existing_vtable - vtableloc);
-      } else {
-        // No match:
-        // Add the location of the current vtable to the list of vtables.
-        this.vtables.push(this.offset());
-  
-        // Point table to current vtable.
-        this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);
-      }
-  
-      this.isNested = false;
-      return vtableloc as Offset;
-    }
-  
-    /**
-     * Finalize a buffer, poiting to the given `root_table`.
-     */
-    finish(root_table: Offset, opt_file_identifier?: string, opt_size_prefix?: boolean): void {
-      const size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;
-      if (opt_file_identifier) {
-        const file_identifier = opt_file_identifier;
-        this.prep(this.minalign, SIZEOF_INT +
-          FILE_IDENTIFIER_LENGTH + size_prefix);
-        if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {
-          throw new TypeError('FlatBuffers: file identifier must be length ' +
-            FILE_IDENTIFIER_LENGTH);
-        }
-        for (let i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {
-          this.writeInt8(file_identifier.charCodeAt(i));
-        }
-      }
-      this.prep(this.minalign, SIZEOF_INT + size_prefix);
-      this.addOffset(root_table);
-      if (size_prefix) {
-        this.addInt32(this.bb.capacity() - this.space);
-      }
-      this.bb.setPosition(this.space);
-    }
-  
-    /**
-     * Finalize a size prefixed buffer, pointing to the given `root_table`.
-     */
-    finishSizePrefixed(this: Builder, root_table: Offset, opt_file_identifier?: string): void {
-      this.finish(root_table, opt_file_identifier, true);
-    }
-  
-    /**
-     * This checks a required field has been set in a given table that has
-     * just been constructed.
-     */
-    requiredField(table: Offset, field: number): void {
-      const table_start = this.bb.capacity() - table;
-      const vtable_start = table_start - this.bb.readInt32(table_start);
-      const ok = field < this.bb.readInt16(vtable_start) &&
-                 this.bb.readInt16(vtable_start + field) != 0;
-  
-      // If this fails, the caller will show what field needs to be set.
-      if (!ok) {
-        throw new TypeError('FlatBuffers: field ' + field + ' must be set');
-      }
-    }
-  
-    /**
-     * Start a new array/vector of objects.  Users usually will not call
-     * this directly. The FlatBuffers compiler will create a start/end
-     * method for vector types in generated code.
-     *
-     * @param elem_size The size of each element in the array
-     * @param num_elems The number of elements in the array
-     * @param alignment The alignment of the array
-     */
-    startVector(elem_size: number, num_elems: number, alignment: number): void {
-      this.notNested();
-      this.vector_num_elems = num_elems;
-      this.prep(SIZEOF_INT, elem_size * num_elems);
-      this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.
-    }
-  
-    /**
-     * Finish off the creation of an array and all its elements. The array must be
-     * created with `startVector`.
-     *
-     * @returns The offset at which the newly created array
-     * starts.
-     */
-    endVector(): Offset {
-      this.writeInt32(this.vector_num_elems);
-      return this.offset();
-    }
-  
-    /**
-     * Encode the string `s` in the buffer using UTF-8. If the string passed has 
-     * already been seen, we return the offset of the already written string
-     *
-     * @param s The string to encode
-     * @return The offset in the buffer where the encoded string starts
-     */
-    createSharedString(s: string | Uint8Array): Offset {
-      if (!s) { return 0 }
-  
-      if (!this.string_maps) {
-        this.string_maps = new Map();
-      }
-  
-      if (this.string_maps.has(s)) {
-        return this.string_maps.get(s) as Offset
-      }
-      const offset = this.createString(s)
-      this.string_maps.set(s, offset)
-      return offset
-    }
-  
-    /**
-     * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed
-     * instead of a string, it is assumed to contain valid UTF-8 encoded data.
-     *
-     * @param s The string to encode
-     * @return The offset in the buffer where the encoded string starts
-     */
-    createString(s: string | Uint8Array | null | undefined): Offset {
-      if (s === null || s === undefined) {
-        return 0;
-      }
+  private bb: ByteBuffer;
+  /** Remaining space in the ByteBuffer. */
+  private space: number;
+  /** Minimum alignment encountered so far. */
+  private minalign = 1;
+  /** The vtable for the current table. */
+  private vtable: number[] | null = null;
+  /** The amount of fields we're actually using. */
+  private vtable_in_use = 0;
+  /** Whether we are currently serializing a table. */
+  private isNested = false;
+  /** Starting offset of the current struct/table. */
+  private object_start = 0;
+  /** List of offsets of all vtables. */
+  private vtables: number[] = [];
+  /** For the current vector being built. */
+  private vector_num_elems = 0;
+  /** False omits default values from the serialized data */
+  private force_defaults = false;
 
-      let utf8: string | Uint8Array | number[];
-      if (s instanceof Uint8Array) {
-        utf8 = s;
-      } else {
-        utf8 = this.text_encoder.encode(s);
-      }
-  
-      this.addInt8(0);
-      this.startVector(1, utf8.length, 1);
-      this.bb.setPosition(this.space -= utf8.length);
-      this.bb.bytes().set(utf8, this.space);
-      return this.endVector();
-    }
-  
-    /**
-     * Create a byte vector.
-     *
-     * @param v The bytes to add
-     * @returns The offset in the buffer where the byte vector starts
-     */
-    createByteVector(v: Uint8Array | null | undefined): Offset {
-      if (v === null || v === undefined) {
-        return 0;
-      }
+  private string_maps: Map<string | Uint8Array, number> | null = null;
+  private text_encoder = new TextEncoder();
 
-      this.startVector(1, v.length, 1);
-      this.bb.setPosition(this.space -= v.length);
-      this.bb.bytes().set(v, this.space);
-      return this.endVector();
+  /**
+   * Create a FlatBufferBuilder.
+   */
+  constructor(opt_initial_size?: number) {
+    let initial_size: number;
+
+    if (!opt_initial_size) {
+      initial_size = 1024;
+    } else {
+      initial_size = opt_initial_size;
     }
-  
+
     /**
-     * A helper function to pack an object
-     * 
-     * @returns offset of obj
+     * @type {ByteBuffer}
+     * @private
      */
-    createObjectOffset(obj: string | IGeneratedObject | null): Offset {
-      if(obj === null) {
-        return 0
-      }
-  
-      if(typeof obj === 'string') {
-        return this.createString(obj);
-      } else {
-        return obj.pack(this);
-      }
+    this.bb = ByteBuffer.allocate(initial_size);
+    this.space = initial_size;
+  }
+
+  clear(): void {
+    this.bb.clear();
+    this.space = this.bb.capacity();
+    this.minalign = 1;
+    this.vtable = null;
+    this.vtable_in_use = 0;
+    this.isNested = false;
+    this.object_start = 0;
+    this.vtables = [];
+    this.vector_num_elems = 0;
+    this.force_defaults = false;
+    this.string_maps = null;
+  }
+
+  /**
+   * In order to save space, fields that are set to their default value
+   * don't get serialized into the buffer. Forcing defaults provides a
+   * way to manually disable this optimization.
+   *
+   * @param forceDefaults true always serializes default values
+   */
+  forceDefaults(forceDefaults: boolean): void {
+    this.force_defaults = forceDefaults;
+  }
+
+  /**
+   * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
+   * called finish(). The actual data starts at the ByteBuffer's current position,
+   * not necessarily at 0.
+   */
+  dataBuffer(): ByteBuffer {
+    return this.bb;
+  }
+
+  /**
+   * Get the bytes representing the FlatBuffer. Only call this after you've
+   * called finish().
+   */
+  asUint8Array(): Uint8Array {
+    return this.bb
+      .bytes()
+      .subarray(this.bb.position(), this.bb.position() + this.offset());
+  }
+
+  /**
+   * Prepare to write an element of `size` after `additional_bytes` have been
+   * written, e.g. if you write a string, you need to align such the int length
+   * field is aligned to 4 bytes, and the string data follows it directly. If all
+   * you need to do is alignment, `additional_bytes` will be 0.
+   *
+   * @param size This is the of the new element to write
+   * @param additional_bytes The padding size
+   */
+  prep(size: number, additional_bytes: number): void {
+    // Track the biggest thing we've ever aligned to.
+    if (size > this.minalign) {
+      this.minalign = size;
     }
-  
-    /**
-     * A helper function to pack a list of object
-     * 
-     * @returns list of offsets of each non null object
-     */
-    createObjectOffsetList(list: (string | IGeneratedObject)[]): Offset[] {
-      const ret: number[] = [];
-  
-      for(let i = 0; i < list.length; ++i) {
-        const val = list[i];
-  
-        if(val !== null) {
-          ret.push(this.createObjectOffset(val));
-        } else {
-          throw new TypeError(
-            'FlatBuffers: Argument for createObjectOffsetList cannot contain null.'); 
-        }
-      }
-      
-      return ret;
+
+    // Find the amount of alignment needed such that `size` is properly
+    // aligned after `additional_bytes`
+    const align_size =
+      (~(this.bb.capacity() - this.space + additional_bytes) + 1) & (size - 1);
+
+    // Reallocate the buffer if needed.
+    while (this.space < align_size + size + additional_bytes) {
+      const old_buf_size = this.bb.capacity();
+      this.bb = Builder.growByteBuffer(this.bb);
+      this.space += this.bb.capacity() - old_buf_size;
     }
-  
-    createStructOffsetList(list: (string | IGeneratedObject)[], startFunc: (builder: Builder, length: number) => void): Offset {
-      startFunc(this, list.length);
-      this.createObjectOffsetList(list.slice().reverse());
-      return this.endVector();
+
+    this.pad(align_size);
+  }
+
+  pad(byte_size: number): void {
+    for (let i = 0; i < byte_size; i++) {
+      this.bb.writeInt8(--this.space, 0);
     }
   }
+
+  writeInt8(value: number): void {
+    this.bb.writeInt8((this.space -= 1), value);
+  }
+
+  writeInt16(value: number): void {
+    this.bb.writeInt16((this.space -= 2), value);
+  }
+
+  writeInt32(value: number): void {
+    this.bb.writeInt32((this.space -= 4), value);
+  }
+
+  writeInt64(value: bigint): void {
+    this.bb.writeInt64((this.space -= 8), value);
+  }
+
+  writeFloat32(value: number): void {
+    this.bb.writeFloat32((this.space -= 4), value);
+  }
+
+  writeFloat64(value: number): void {
+    this.bb.writeFloat64((this.space -= 8), value);
+  }
+
+  /**
+   * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `int8` to add the buffer.
+   */
+  addInt8(value: number): void {
+    this.prep(1, 0);
+    this.writeInt8(value);
+  }
+
+  /**
+   * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `int16` to add the buffer.
+   */
+  addInt16(value: number): void {
+    this.prep(2, 0);
+    this.writeInt16(value);
+  }
+
+  /**
+   * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `int32` to add the buffer.
+   */
+  addInt32(value: number): void {
+    this.prep(4, 0);
+    this.writeInt32(value);
+  }
+
+  /**
+   * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `int64` to add the buffer.
+   */
+  addInt64(value: bigint): void {
+    this.prep(8, 0);
+    this.writeInt64(value);
+  }
+
+  /**
+   * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `float32` to add the buffer.
+   */
+  addFloat32(value: number): void {
+    this.prep(4, 0);
+    this.writeFloat32(value);
+  }
+
+  /**
+   * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).
+   * @param value The `float64` to add the buffer.
+   */
+  addFloat64(value: number): void {
+    this.prep(8, 0);
+    this.writeFloat64(value);
+  }
+
+  addFieldInt8(
+    voffset: number,
+    value: number,
+    defaultValue: number | null,
+  ): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addInt8(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldInt16(
+    voffset: number,
+    value: number,
+    defaultValue: number | null,
+  ): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addInt16(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldInt32(
+    voffset: number,
+    value: number,
+    defaultValue: number | null,
+  ): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addInt32(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldInt64(
+    voffset: number,
+    value: bigint,
+    defaultValue: bigint | null,
+  ): void {
+    if (this.force_defaults || value !== defaultValue) {
+      this.addInt64(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldFloat32(
+    voffset: number,
+    value: number,
+    defaultValue: number | null,
+  ): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addFloat32(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldFloat64(
+    voffset: number,
+    value: number,
+    defaultValue: number | null,
+  ): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addFloat64(value);
+      this.slot(voffset);
+    }
+  }
+
+  addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void {
+    if (this.force_defaults || value != defaultValue) {
+      this.addOffset(value);
+      this.slot(voffset);
+    }
+  }
+
+  /**
+   * Structs are stored inline, so nothing additional is being added. `d` is always 0.
+   */
+  addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void {
+    if (value != defaultValue) {
+      this.nested(value);
+      this.slot(voffset);
+    }
+  }
+
+  /**
+   * Structures are always stored inline, they need to be created right
+   * where they're used.  You'll get this assertion failure if you
+   * created it elsewhere.
+   */
+  nested(obj: Offset): void {
+    if (obj != this.offset()) {
+      throw new TypeError('FlatBuffers: struct must be serialized inline.');
+    }
+  }
+
+  /**
+   * Should not be creating any other object, string or vector
+   * while an object is being constructed
+   */
+  notNested(): void {
+    if (this.isNested) {
+      throw new TypeError(
+        'FlatBuffers: object serialization must not be nested.',
+      );
+    }
+  }
+
+  /**
+   * Set the current vtable at `voffset` to the current location in the buffer.
+   */
+  slot(voffset: number): void {
+    if (this.vtable !== null) this.vtable[voffset] = this.offset();
+  }
+
+  /**
+   * @returns Offset relative to the end of the buffer.
+   */
+  offset(): Offset {
+    return this.bb.capacity() - this.space;
+  }
+
+  /**
+   * Doubles the size of the backing ByteBuffer and copies the old data towards
+   * the end of the new buffer (since we build the buffer backwards).
+   *
+   * @param bb The current buffer with the existing data
+   * @returns A new byte buffer with the old data copied
+   * to it. The data is located at the end of the buffer.
+   *
+   * uint8Array.set() formally takes {Array<number>|ArrayBufferView}, so to pass
+   * it a uint8Array we need to suppress the type check:
+   * @suppress {checkTypes}
+   */
+  static growByteBuffer(bb: ByteBuffer): ByteBuffer {
+    const old_buf_size = bb.capacity();
+
+    // Ensure we don't grow beyond what fits in an int.
+    if (old_buf_size & 0xc0000000) {
+      throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');
+    }
+
+    const new_buf_size = old_buf_size << 1;
+    const nbb = ByteBuffer.allocate(new_buf_size);
+    nbb.setPosition(new_buf_size - old_buf_size);
+    nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);
+    return nbb;
+  }
+
+  /**
+   * Adds on offset, relative to where it will be written.
+   *
+   * @param offset The offset to add.
+   */
+  addOffset(offset: Offset): void {
+    this.prep(SIZEOF_INT, 0); // Ensure alignment is already done.
+    this.writeInt32(this.offset() - offset + SIZEOF_INT);
+  }
+
+  /**
+   * Start encoding a new object in the buffer.  Users will not usually need to
+   * call this directly. The FlatBuffers compiler will generate helper methods
+   * that call this method internally.
+   */
+  startObject(numfields: number): void {
+    this.notNested();
+    if (this.vtable == null) {
+      this.vtable = [];
+    }
+    this.vtable_in_use = numfields;
+    for (let i = 0; i < numfields; i++) {
+      this.vtable[i] = 0; // This will push additional elements as needed
+    }
+    this.isNested = true;
+    this.object_start = this.offset();
+  }
+
+  /**
+   * Finish off writing the object that is under construction.
+   *
+   * @returns The offset to the object inside `dataBuffer`
+   */
+  endObject(): Offset {
+    if (this.vtable == null || !this.isNested) {
+      throw new Error('FlatBuffers: endObject called without startObject');
+    }
+
+    this.addInt32(0);
+    const vtableloc = this.offset();
+
+    // Trim trailing zeroes.
+    let i = this.vtable_in_use - 1;
+    // eslint-disable-next-line no-empty
+    for (; i >= 0 && this.vtable[i] == 0; i--) {}
+    const trimmed_size = i + 1;
+
+    // Write out the current vtable.
+    for (; i >= 0; i--) {
+      // Offset relative to the start of the table.
+      this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);
+    }
+
+    const standard_fields = 2; // The fields below:
+    this.addInt16(vtableloc - this.object_start);
+    const len = (trimmed_size + standard_fields) * SIZEOF_SHORT;
+    this.addInt16(len);
+
+    // Search for an existing vtable that matches the current one.
+    let existing_vtable = 0;
+    const vt1 = this.space;
+    outer_loop: for (i = 0; i < this.vtables.length; i++) {
+      const vt2 = this.bb.capacity() - this.vtables[i];
+      if (len == this.bb.readInt16(vt2)) {
+        for (let j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {
+          if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {
+            continue outer_loop;
+          }
+        }
+        existing_vtable = this.vtables[i];
+        break;
+      }
+    }
+
+    if (existing_vtable) {
+      // Found a match:
+      // Remove the current vtable.
+      this.space = this.bb.capacity() - vtableloc;
+
+      // Point table to existing vtable.
+      this.bb.writeInt32(this.space, existing_vtable - vtableloc);
+    } else {
+      // No match:
+      // Add the location of the current vtable to the list of vtables.
+      this.vtables.push(this.offset());
+
+      // Point table to current vtable.
+      this.bb.writeInt32(
+        this.bb.capacity() - vtableloc,
+        this.offset() - vtableloc,
+      );
+    }
+
+    this.isNested = false;
+    return vtableloc as Offset;
+  }
+
+  /**
+   * Finalize a buffer, poiting to the given `root_table`.
+   */
+  finish(
+    root_table: Offset,
+    opt_file_identifier?: string,
+    opt_size_prefix?: boolean,
+  ): void {
+    const size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;
+    if (opt_file_identifier) {
+      const file_identifier = opt_file_identifier;
+      this.prep(
+        this.minalign,
+        SIZEOF_INT + FILE_IDENTIFIER_LENGTH + size_prefix,
+      );
+      if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {
+        throw new TypeError(
+          'FlatBuffers: file identifier must be length ' +
+            FILE_IDENTIFIER_LENGTH,
+        );
+      }
+      for (let i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {
+        this.writeInt8(file_identifier.charCodeAt(i));
+      }
+    }
+    this.prep(this.minalign, SIZEOF_INT + size_prefix);
+    this.addOffset(root_table);
+    if (size_prefix) {
+      this.addInt32(this.bb.capacity() - this.space);
+    }
+    this.bb.setPosition(this.space);
+  }
+
+  /**
+   * Finalize a size prefixed buffer, pointing to the given `root_table`.
+   */
+  finishSizePrefixed(
+    this: Builder,
+    root_table: Offset,
+    opt_file_identifier?: string,
+  ): void {
+    this.finish(root_table, opt_file_identifier, true);
+  }
+
+  /**
+   * This checks a required field has been set in a given table that has
+   * just been constructed.
+   */
+  requiredField(table: Offset, field: number): void {
+    const table_start = this.bb.capacity() - table;
+    const vtable_start = table_start - this.bb.readInt32(table_start);
+    const ok =
+      field < this.bb.readInt16(vtable_start) &&
+      this.bb.readInt16(vtable_start + field) != 0;
+
+    // If this fails, the caller will show what field needs to be set.
+    if (!ok) {
+      throw new TypeError('FlatBuffers: field ' + field + ' must be set');
+    }
+  }
+
+  /**
+   * Start a new array/vector of objects.  Users usually will not call
+   * this directly. The FlatBuffers compiler will create a start/end
+   * method for vector types in generated code.
+   *
+   * @param elem_size The size of each element in the array
+   * @param num_elems The number of elements in the array
+   * @param alignment The alignment of the array
+   */
+  startVector(elem_size: number, num_elems: number, alignment: number): void {
+    this.notNested();
+    this.vector_num_elems = num_elems;
+    this.prep(SIZEOF_INT, elem_size * num_elems);
+    this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.
+  }
+
+  /**
+   * Finish off the creation of an array and all its elements. The array must be
+   * created with `startVector`.
+   *
+   * @returns The offset at which the newly created array
+   * starts.
+   */
+  endVector(): Offset {
+    this.writeInt32(this.vector_num_elems);
+    return this.offset();
+  }
+
+  /**
+   * Encode the string `s` in the buffer using UTF-8. If the string passed has
+   * already been seen, we return the offset of the already written string
+   *
+   * @param s The string to encode
+   * @return The offset in the buffer where the encoded string starts
+   */
+  createSharedString(s: string | Uint8Array): Offset {
+    if (!s) {
+      return 0;
+    }
+
+    if (!this.string_maps) {
+      this.string_maps = new Map();
+    }
+
+    if (this.string_maps.has(s)) {
+      return this.string_maps.get(s) as Offset;
+    }
+    const offset = this.createString(s);
+    this.string_maps.set(s, offset);
+    return offset;
+  }
+
+  /**
+   * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed
+   * instead of a string, it is assumed to contain valid UTF-8 encoded data.
+   *
+   * @param s The string to encode
+   * @return The offset in the buffer where the encoded string starts
+   */
+  createString(s: string | Uint8Array | null | undefined): Offset {
+    if (s === null || s === undefined) {
+      return 0;
+    }
+
+    let utf8: string | Uint8Array | number[];
+    if (s instanceof Uint8Array) {
+      utf8 = s;
+    } else {
+      utf8 = this.text_encoder.encode(s);
+    }
+
+    this.addInt8(0);
+    this.startVector(1, utf8.length, 1);
+    this.bb.setPosition((this.space -= utf8.length));
+    this.bb.bytes().set(utf8, this.space);
+    return this.endVector();
+  }
+
+  /**
+   * Create a byte vector.
+   *
+   * @param v The bytes to add
+   * @returns The offset in the buffer where the byte vector starts
+   */
+  createByteVector(v: Uint8Array | null | undefined): Offset {
+    if (v === null || v === undefined) {
+      return 0;
+    }
+
+    this.startVector(1, v.length, 1);
+    this.bb.setPosition((this.space -= v.length));
+    this.bb.bytes().set(v, this.space);
+    return this.endVector();
+  }
+
+  /**
+   * A helper function to pack an object
+   *
+   * @returns offset of obj
+   */
+  createObjectOffset(obj: string | IGeneratedObject | null): Offset {
+    if (obj === null) {
+      return 0;
+    }
+
+    if (typeof obj === 'string') {
+      return this.createString(obj);
+    } else {
+      return obj.pack(this);
+    }
+  }
+
+  /**
+   * A helper function to pack a list of object
+   *
+   * @returns list of offsets of each non null object
+   */
+  createObjectOffsetList(list: (string | IGeneratedObject)[]): Offset[] {
+    const ret: number[] = [];
+
+    for (let i = 0; i < list.length; ++i) {
+      const val = list[i];
+
+      if (val !== null) {
+        ret.push(this.createObjectOffset(val));
+      } else {
+        throw new TypeError(
+          'FlatBuffers: Argument for createObjectOffsetList cannot contain null.',
+        );
+      }
+    }
+
+    return ret;
+  }
+
+  createStructOffsetList(
+    list: (string | IGeneratedObject)[],
+    startFunc: (builder: Builder, length: number) => void,
+  ): Offset {
+    startFunc(this, list.length);
+    this.createObjectOffsetList(list.slice().reverse());
+    return this.endVector();
+  }
+}
diff --git a/ts/byte-buffer.ts b/ts/byte-buffer.ts
index 90a1a4d..84ef410 100644
--- a/ts/byte-buffer.ts
+++ b/ts/byte-buffer.ts
@@ -1,287 +1,316 @@
-import { FILE_IDENTIFIER_LENGTH, SIZEOF_INT } from "./constants.js";
-import { int32, isLittleEndian, float32, float64 } from "./utils.js";
-import { Offset, Table, IGeneratedObject, IUnpackableObject } from "./types.js";
-import { Encoding } from "./encoding.js";
+import {FILE_IDENTIFIER_LENGTH, SIZEOF_INT} from './constants.js';
+import {Encoding} from './encoding.js';
+import {IGeneratedObject, IUnpackableObject, Offset, Table} from './types.js';
+import {float32, float64, int32, isLittleEndian} from './utils.js';
 
 export class ByteBuffer {
-    private position_ = 0;
-    private text_decoder_ = new TextDecoder();
-  
-    /**
-     * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)
-     */
-    constructor(private bytes_: Uint8Array) { }
-  
-    /**
-     * Create and allocate a new ByteBuffer with a given size.
-     */
-    static allocate(byte_size: number): ByteBuffer {
-      return new ByteBuffer(new Uint8Array(byte_size));
-    }
-  
-    clear(): void {
-      this.position_ = 0;
-    }
-  
-    /**
-     * Get the underlying `Uint8Array`.
-     */
-    bytes(): Uint8Array {
-      return this.bytes_;
-    }
-  
-    /**
-     * Get the buffer's position.
-     */
-    position(): number {
-      return this.position_;
-    }
-  
-    /**
-     * Set the buffer's position.
-     */
-    setPosition(position: number): void {
-      this.position_ = position;
-    }
-  
-    /**
-     * Get the buffer's capacity.
-     */
-    capacity(): number {
-      return this.bytes_.length;
-    }
-  
-    readInt8(offset: number): number {
-      return this.readUint8(offset) << 24 >> 24;
-    }
-  
-    readUint8(offset: number): number {
-      return this.bytes_[offset];
-    }
-  
-    readInt16(offset: number): number {
-      return this.readUint16(offset) << 16 >> 16;
-    }
-  
-    readUint16(offset: number): number {
-      return this.bytes_[offset] | this.bytes_[offset + 1] << 8;
-    }
-  
-    readInt32(offset: number): number {
-      return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;
-    }
-  
-    readUint32(offset: number): number {
-      return this.readInt32(offset) >>> 0;
-    }
-  
-    readInt64(offset: number): bigint {
-      return BigInt.asIntN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
-    }
-  
-    readUint64(offset: number): bigint {
-      return BigInt.asUintN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
-    }
-  
-    readFloat32(offset: number): number {
-      int32[0] = this.readInt32(offset);
-      return float32[0];
-    }
-  
-    readFloat64(offset: number): number {
-      int32[isLittleEndian ? 0 : 1] = this.readInt32(offset);
-      int32[isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);
-      return float64[0];
-    }
-  
-    writeInt8(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-    }
-  
-    writeUint8(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-    }
-  
-    writeInt16(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-      this.bytes_[offset + 1] = value >> 8;
-    }
-  
-    writeUint16(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-      this.bytes_[offset + 1] = value >> 8;
-    }
-  
-    writeInt32(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-      this.bytes_[offset + 1] = value >> 8;
-      this.bytes_[offset + 2] = value >> 16;
-      this.bytes_[offset + 3] = value >> 24;
-    }
-  
-    writeUint32(offset: number, value: number): void {
-      this.bytes_[offset] = value;
-      this.bytes_[offset + 1] = value >> 8;
-      this.bytes_[offset + 2] = value >> 16;
-      this.bytes_[offset + 3] = value >> 24;
-    }
-  
-    writeInt64(offset: number, value: bigint): void {
-      this.writeInt32(offset, Number(BigInt.asIntN(32, value)));
-      this.writeInt32(offset + 4, Number(BigInt.asIntN(32, value >> BigInt(32))));
-    }
-  
-    writeUint64(offset: number, value: bigint): void {
-      this.writeUint32(offset, Number(BigInt.asUintN(32, value)));
-      this.writeUint32(offset + 4, Number(BigInt.asUintN(32, value >> BigInt(32))));
-    }
-  
-    writeFloat32(offset: number, value: number): void {
-      float32[0] = value;
-      this.writeInt32(offset, int32[0]);
-    }
-  
-    writeFloat64(offset: number, value: number): void {
-      float64[0] = value;
-      this.writeInt32(offset, int32[isLittleEndian ? 0 : 1]);
-      this.writeInt32(offset + 4, int32[isLittleEndian ? 1 : 0]);
-    }
-  
-    /**
-     * Return the file identifier.   Behavior is undefined for FlatBuffers whose
-     * schema does not include a file_identifier (likely points at padding or the
-     * start of a the root vtable).
-     */
-    getBufferIdentifier(): string {
-      if (this.bytes_.length < this.position_ + SIZEOF_INT +
-          FILE_IDENTIFIER_LENGTH) {
-        throw new Error(
-            'FlatBuffers: ByteBuffer is too short to contain an identifier.');
-      }
-      let result = "";
-      for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
-        result += String.fromCharCode(
-            this.readInt8(this.position_ + SIZEOF_INT + i));
-      }
-      return result;
-    }
-  
-    /**
-     * Look up a field in the vtable, return an offset into the object, or 0 if the
-     * field is not present.
-     */
-    __offset(bb_pos: number, vtable_offset: number): Offset {
-      const vtable = bb_pos - this.readInt32(bb_pos);
-      return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;
-    }
-  
-    /**
-     * Initialize any Table-derived type to point to the union at the given offset.
-     */
-    __union(t: Table, offset: number): Table {
-      t.bb_pos = offset + this.readInt32(offset);
-      t.bb = this;
-      return t;
-    }
-  
-    /**
-     * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.
-     * This allocates a new string and converts to wide chars upon each access.
-     *
-     * To avoid the conversion to string, pass Encoding.UTF8_BYTES as the
-     * "optionalEncoding" argument. This is useful for avoiding conversion when
-     * the data will just be packaged back up in another FlatBuffer later on.
-     *
-     * @param offset
-     * @param opt_encoding Defaults to UTF16_STRING
-     */
-    __string(offset: number, opt_encoding?: Encoding): string | Uint8Array {
-      offset += this.readInt32(offset);
-      const length = this.readInt32(offset);
-      offset += SIZEOF_INT;
-      const utf8bytes = this.bytes_.subarray(offset, offset + length);
-      if (opt_encoding === Encoding.UTF8_BYTES)
-        return utf8bytes;
-      else
-        return this.text_decoder_.decode(utf8bytes);
-    }
-  
-    /**
-     * Handle unions that can contain string as its member, if a Table-derived type then initialize it, 
-     * if a string then return a new one
-     * 
-     * WARNING: strings are immutable in JS so we can't change the string that the user gave us, this 
-     * makes the behaviour of __union_with_string different compared to __union
-     */
-    __union_with_string(o: Table | string, offset: number) : Table | string {
-      if(typeof o === 'string') {
-        return this.__string(offset) as string;
-      } 
-      return this.__union(o, offset);
-    }
-  
-    /**
-     * Retrieve the relative offset stored at "offset"
-     */
-    __indirect(offset: Offset): Offset {
-      return offset + this.readInt32(offset);
-    }
-  
-    /**
-     * Get the start of data of a vector whose offset is stored at "offset" in this object.
-     */
-    __vector(offset: Offset): Offset {
-      return offset + this.readInt32(offset) + SIZEOF_INT; // data starts after the length
-    }
-  
-    /**
-     * Get the length of a vector whose offset is stored at "offset" in this object.
-     */
-    __vector_len(offset: Offset): Offset {
-      return this.readInt32(offset + this.readInt32(offset));
-    }
-  
-    __has_identifier(ident: string): boolean {
-      if (ident.length != FILE_IDENTIFIER_LENGTH) {
-        throw new Error('FlatBuffers: file identifier must be length ' +
-                        FILE_IDENTIFIER_LENGTH);
-      }
-      for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
-        if (ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)) {
-          return false;
-        }
-      }
-      return true;
-    }
+  private position_ = 0;
+  private text_decoder_ = new TextDecoder();
 
-    /**
-     * A helper function for generating list for obj api
-     */
-    createScalarList<T>(listAccessor: (i: number) => T | null, listLength: number): T[] {
-      const ret: T[]  = [];
-      for(let i = 0; i < listLength; ++i) {
-        const val = listAccessor(i);
-        if(val !== null) {
-          ret.push(val);
-        }
-      }
-      return ret;
-    }
+  /**
+   * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)
+   */
+  constructor(private bytes_: Uint8Array) {}
 
-    /**
-     * A helper function for generating list for obj api
-     * @param listAccessor function that accepts an index and return data at that index
-     * @param listLength listLength
-     * @param res result list
-     */
-    createObjList<T1 extends IUnpackableObject<T2>, T2 extends IGeneratedObject>(listAccessor: (i: number) => T1 | null, listLength: number): T2[] {
-      const ret: T2[] = [];
-      for(let i = 0; i < listLength; ++i) {
-        const val = listAccessor(i);
-        if(val !== null) {
-          ret.push(val.unpack());
-        }
-      }
-      return ret;
-    }
+  /**
+   * Create and allocate a new ByteBuffer with a given size.
+   */
+  static allocate(byte_size: number): ByteBuffer {
+    return new ByteBuffer(new Uint8Array(byte_size));
   }
+
+  clear(): void {
+    this.position_ = 0;
+  }
+
+  /**
+   * Get the underlying `Uint8Array`.
+   */
+  bytes(): Uint8Array {
+    return this.bytes_;
+  }
+
+  /**
+   * Get the buffer's position.
+   */
+  position(): number {
+    return this.position_;
+  }
+
+  /**
+   * Set the buffer's position.
+   */
+  setPosition(position: number): void {
+    this.position_ = position;
+  }
+
+  /**
+   * Get the buffer's capacity.
+   */
+  capacity(): number {
+    return this.bytes_.length;
+  }
+
+  readInt8(offset: number): number {
+    return (this.readUint8(offset) << 24) >> 24;
+  }
+
+  readUint8(offset: number): number {
+    return this.bytes_[offset];
+  }
+
+  readInt16(offset: number): number {
+    return (this.readUint16(offset) << 16) >> 16;
+  }
+
+  readUint16(offset: number): number {
+    return this.bytes_[offset] | (this.bytes_[offset + 1] << 8);
+  }
+
+  readInt32(offset: number): number {
+    return (
+      this.bytes_[offset] |
+      (this.bytes_[offset + 1] << 8) |
+      (this.bytes_[offset + 2] << 16) |
+      (this.bytes_[offset + 3] << 24)
+    );
+  }
+
+  readUint32(offset: number): number {
+    return this.readInt32(offset) >>> 0;
+  }
+
+  readInt64(offset: number): bigint {
+    return BigInt.asIntN(
+      64,
+      BigInt(this.readUint32(offset)) +
+        (BigInt(this.readUint32(offset + 4)) << BigInt(32)),
+    );
+  }
+
+  readUint64(offset: number): bigint {
+    return BigInt.asUintN(
+      64,
+      BigInt(this.readUint32(offset)) +
+        (BigInt(this.readUint32(offset + 4)) << BigInt(32)),
+    );
+  }
+
+  readFloat32(offset: number): number {
+    int32[0] = this.readInt32(offset);
+    return float32[0];
+  }
+
+  readFloat64(offset: number): number {
+    int32[isLittleEndian ? 0 : 1] = this.readInt32(offset);
+    int32[isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);
+    return float64[0];
+  }
+
+  writeInt8(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+  }
+
+  writeUint8(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+  }
+
+  writeInt16(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+    this.bytes_[offset + 1] = value >> 8;
+  }
+
+  writeUint16(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+    this.bytes_[offset + 1] = value >> 8;
+  }
+
+  writeInt32(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+    this.bytes_[offset + 1] = value >> 8;
+    this.bytes_[offset + 2] = value >> 16;
+    this.bytes_[offset + 3] = value >> 24;
+  }
+
+  writeUint32(offset: number, value: number): void {
+    this.bytes_[offset] = value;
+    this.bytes_[offset + 1] = value >> 8;
+    this.bytes_[offset + 2] = value >> 16;
+    this.bytes_[offset + 3] = value >> 24;
+  }
+
+  writeInt64(offset: number, value: bigint): void {
+    this.writeInt32(offset, Number(BigInt.asIntN(32, value)));
+    this.writeInt32(offset + 4, Number(BigInt.asIntN(32, value >> BigInt(32))));
+  }
+
+  writeUint64(offset: number, value: bigint): void {
+    this.writeUint32(offset, Number(BigInt.asUintN(32, value)));
+    this.writeUint32(
+      offset + 4,
+      Number(BigInt.asUintN(32, value >> BigInt(32))),
+    );
+  }
+
+  writeFloat32(offset: number, value: number): void {
+    float32[0] = value;
+    this.writeInt32(offset, int32[0]);
+  }
+
+  writeFloat64(offset: number, value: number): void {
+    float64[0] = value;
+    this.writeInt32(offset, int32[isLittleEndian ? 0 : 1]);
+    this.writeInt32(offset + 4, int32[isLittleEndian ? 1 : 0]);
+  }
+
+  /**
+   * Return the file identifier.   Behavior is undefined for FlatBuffers whose
+   * schema does not include a file_identifier (likely points at padding or the
+   * start of a the root vtable).
+   */
+  getBufferIdentifier(): string {
+    if (
+      this.bytes_.length <
+      this.position_ + SIZEOF_INT + FILE_IDENTIFIER_LENGTH
+    ) {
+      throw new Error(
+        'FlatBuffers: ByteBuffer is too short to contain an identifier.',
+      );
+    }
+    let result = '';
+    for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
+      result += String.fromCharCode(
+        this.readInt8(this.position_ + SIZEOF_INT + i),
+      );
+    }
+    return result;
+  }
+
+  /**
+   * Look up a field in the vtable, return an offset into the object, or 0 if the
+   * field is not present.
+   */
+  __offset(bb_pos: number, vtable_offset: number): Offset {
+    const vtable = bb_pos - this.readInt32(bb_pos);
+    return vtable_offset < this.readInt16(vtable)
+      ? this.readInt16(vtable + vtable_offset)
+      : 0;
+  }
+
+  /**
+   * Initialize any Table-derived type to point to the union at the given offset.
+   */
+  __union(t: Table, offset: number): Table {
+    t.bb_pos = offset + this.readInt32(offset);
+    t.bb = this;
+    return t;
+  }
+
+  /**
+   * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.
+   * This allocates a new string and converts to wide chars upon each access.
+   *
+   * To avoid the conversion to string, pass Encoding.UTF8_BYTES as the
+   * "optionalEncoding" argument. This is useful for avoiding conversion when
+   * the data will just be packaged back up in another FlatBuffer later on.
+   *
+   * @param offset
+   * @param opt_encoding Defaults to UTF16_STRING
+   */
+  __string(offset: number, opt_encoding?: Encoding): string | Uint8Array {
+    offset += this.readInt32(offset);
+    const length = this.readInt32(offset);
+    offset += SIZEOF_INT;
+    const utf8bytes = this.bytes_.subarray(offset, offset + length);
+    if (opt_encoding === Encoding.UTF8_BYTES) return utf8bytes;
+    else return this.text_decoder_.decode(utf8bytes);
+  }
+
+  /**
+   * Handle unions that can contain string as its member, if a Table-derived type then initialize it,
+   * if a string then return a new one
+   *
+   * WARNING: strings are immutable in JS so we can't change the string that the user gave us, this
+   * makes the behaviour of __union_with_string different compared to __union
+   */
+  __union_with_string(o: Table | string, offset: number): Table | string {
+    if (typeof o === 'string') {
+      return this.__string(offset) as string;
+    }
+    return this.__union(o, offset);
+  }
+
+  /**
+   * Retrieve the relative offset stored at "offset"
+   */
+  __indirect(offset: Offset): Offset {
+    return offset + this.readInt32(offset);
+  }
+
+  /**
+   * Get the start of data of a vector whose offset is stored at "offset" in this object.
+   */
+  __vector(offset: Offset): Offset {
+    return offset + this.readInt32(offset) + SIZEOF_INT; // data starts after the length
+  }
+
+  /**
+   * Get the length of a vector whose offset is stored at "offset" in this object.
+   */
+  __vector_len(offset: Offset): Offset {
+    return this.readInt32(offset + this.readInt32(offset));
+  }
+
+  __has_identifier(ident: string): boolean {
+    if (ident.length != FILE_IDENTIFIER_LENGTH) {
+      throw new Error(
+        'FlatBuffers: file identifier must be length ' + FILE_IDENTIFIER_LENGTH,
+      );
+    }
+    for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
+      if (
+        ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)
+      ) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * A helper function for generating list for obj api
+   */
+  createScalarList<T>(
+    listAccessor: (i: number) => T | null,
+    listLength: number,
+  ): T[] {
+    const ret: T[] = [];
+    for (let i = 0; i < listLength; ++i) {
+      const val = listAccessor(i);
+      if (val !== null) {
+        ret.push(val);
+      }
+    }
+    return ret;
+  }
+
+  /**
+   * A helper function for generating list for obj api
+   * @param listAccessor function that accepts an index and return data at that index
+   * @param listLength listLength
+   * @param res result list
+   */
+  createObjList<T1 extends IUnpackableObject<T2>, T2 extends IGeneratedObject>(
+    listAccessor: (i: number) => T1 | null,
+    listLength: number,
+  ): T2[] {
+    const ret: T2[] = [];
+    for (let i = 0; i < listLength; ++i) {
+      const val = listAccessor(i);
+      if (val !== null) {
+        ret.push(val.unpack());
+      }
+    }
+    return ret;
+  }
+}
diff --git a/ts/constants.ts b/ts/constants.ts
index 04510fb..cb70ced 100644
--- a/ts/constants.ts
+++ b/ts/constants.ts
@@ -1,4 +1,4 @@
 export const SIZEOF_SHORT = 2;
 export const SIZEOF_INT = 4;
 export const FILE_IDENTIFIER_LENGTH = 4;
-export const SIZE_PREFIX_LENGTH = 4;
\ No newline at end of file
+export const SIZE_PREFIX_LENGTH = 4;
diff --git a/ts/encoding.ts b/ts/encoding.ts
index 856792c..90e35fe 100644
--- a/ts/encoding.ts
+++ b/ts/encoding.ts
@@ -1,4 +1,4 @@
 export enum Encoding {
-    UTF8_BYTES = 1,
-    UTF16_STRING = 2
-}
\ No newline at end of file
+  UTF8_BYTES = 1,
+  UTF16_STRING = 2,
+}
diff --git a/ts/flatbuffers.ts b/ts/flatbuffers.ts
index a608512..26b128a 100644
--- a/ts/flatbuffers.ts
+++ b/ts/flatbuffers.ts
@@ -1,12 +1,14 @@
-export { SIZEOF_SHORT } from './constants.js'
-export { SIZEOF_INT } from './constants.js'
-export { FILE_IDENTIFIER_LENGTH } from './constants.js'
-export { SIZE_PREFIX_LENGTH } from './constants.js'
+export {
+  FILE_IDENTIFIER_LENGTH,
+  SIZEOF_INT,
+  SIZEOF_SHORT,
+  SIZE_PREFIX_LENGTH,
+} from './constants.js';
 
-export { Table, Offset, IGeneratedObject, IUnpackableObject } from './types.js'
+export {IGeneratedObject, IUnpackableObject, Offset, Table} from './types.js';
 
-export { int32, float32, float64, isLittleEndian } from './utils.js'
+export {float32, float64, int32, isLittleEndian} from './utils.js';
 
-export { Encoding } from './encoding.js'
-export { Builder } from './builder.js'
-export { ByteBuffer } from './byte-buffer.js'
+export {Builder} from './builder.js';
+export {ByteBuffer} from './byte-buffer.js';
+export {Encoding} from './encoding.js';
diff --git a/ts/flexbuffers.ts b/ts/flexbuffers.ts
index a59d497..e6d71c0 100644
--- a/ts/flexbuffers.ts
+++ b/ts/flexbuffers.ts
@@ -1,18 +1,29 @@
 /* eslint-disable @typescript-eslint/no-namespace */
-import { Builder } from './flexbuffers/builder.js'
-import { toReference } from './flexbuffers/reference.js'
-export { toReference } from './flexbuffers/reference.js'
+import {Builder} from './flexbuffers/builder.js';
+import {toReference} from './flexbuffers/reference.js';
+export {toReference} from './flexbuffers/reference.js';
 
 export function builder(): Builder {
-    return new Builder();
+  return new Builder();
 }
 
 export function toObject(buffer: ArrayBuffer): unknown {
-    return toReference(buffer).toObject();
+  return toReference(buffer).toObject();
 }
 
-export function encode(object: unknown, size = 2048, deduplicateStrings = true, deduplicateKeys = true, deduplicateKeyVectors = true): Uint8Array {
-    const builder = new Builder(size > 0 ? size : 2048, deduplicateStrings, deduplicateKeys, deduplicateKeyVectors);
-    builder.add(object);
-    return builder.finish();
+export function encode(
+  object: unknown,
+  size = 2048,
+  deduplicateStrings = true,
+  deduplicateKeys = true,
+  deduplicateKeyVectors = true,
+): Uint8Array {
+  const builder = new Builder(
+    size > 0 ? size : 2048,
+    deduplicateStrings,
+    deduplicateKeys,
+    deduplicateKeyVectors,
+  );
+  builder.add(object);
+  return builder.finish();
 }
diff --git a/ts/flexbuffers/bit-width-util.ts b/ts/flexbuffers/bit-width-util.ts
index 3a295fd..ed07b6a 100644
--- a/ts/flexbuffers/bit-width-util.ts
+++ b/ts/flexbuffers/bit-width-util.ts
@@ -1,4 +1,4 @@
-import { BitWidth } from './bit-width.js'
+import {BitWidth} from './bit-width.js';
 
 export function toByteWidth(bitWidth: BitWidth): number {
   return 1 << bitWidth;
@@ -31,4 +31,4 @@
 
 export function paddingSize(bufSize: number, scalarSize: number): number {
   return (~bufSize + 1) & (scalarSize - 1);
-}
\ No newline at end of file
+}
diff --git a/ts/flexbuffers/bit-width.ts b/ts/flexbuffers/bit-width.ts
index 5f85b61..497b2d7 100644
--- a/ts/flexbuffers/bit-width.ts
+++ b/ts/flexbuffers/bit-width.ts
@@ -3,4 +3,4 @@
   WIDTH16 = 1,
   WIDTH32 = 2,
   WIDTH64 = 3,
-}
\ No newline at end of file
+}
diff --git a/ts/flexbuffers/builder.ts b/ts/flexbuffers/builder.ts
index 9c2aa2a..8ec5e95 100644
--- a/ts/flexbuffers/builder.ts
+++ b/ts/flexbuffers/builder.ts
@@ -1,19 +1,30 @@
-import { BitWidth } from './bit-width.js'
-import { paddingSize, iwidth, uwidth, fwidth, toByteWidth, fromByteWidth } from './bit-width-util.js'
-import { toUTF8Array } from './flexbuffers-util.js'
-import { ValueType } from './value-type.js'
-import { isNumber, isTypedVectorElement, toTypedVector } from './value-type-util.js'
-import { StackValue } from './stack-value.js'
+import {
+  fromByteWidth,
+  fwidth,
+  iwidth,
+  paddingSize,
+  toByteWidth,
+  uwidth,
+} from './bit-width-util.js';
+import {BitWidth} from './bit-width.js';
+import {toUTF8Array} from './flexbuffers-util.js';
+import {StackValue} from './stack-value.js';
+import {
+  isNumber,
+  isTypedVectorElement,
+  toTypedVector,
+} from './value-type-util.js';
+import {ValueType} from './value-type.js';
 
 interface StackPointer {
-  stackPosition: number,
-  isVector: boolean
-  presorted?: boolean
+  stackPosition: number;
+  isVector: boolean;
+  presorted?: boolean;
 }
 
 export class Builder {
-  buffer: ArrayBuffer
-  view: DataView
+  buffer: ArrayBuffer;
+  view: DataView;
 
   readonly stack: Array<StackValue> = [];
   readonly stackPointers: Array<StackPointer> = [];
@@ -26,7 +37,12 @@
   readonly indirectUIntLookup: Record<number, StackValue> = {};
   readonly indirectFloatLookup: Record<number, StackValue> = {};
 
-  constructor(size = 2048, private dedupStrings = true, private dedupKeys = true, private dedupKeyVectors = true) {
+  constructor(
+    size = 2048,
+    private dedupStrings = true,
+    private dedupKeys = true,
+    private dedupKeyVectors = true,
+  ) {
     this.buffer = new ArrayBuffer(size > 0 ? size : 2048);
     this.view = new DataView(this.buffer);
   }
@@ -101,12 +117,17 @@
     const blobOffset = this.offset;
     const newOffset = this.computeOffset(length);
     new Uint8Array(this.buffer).set(new Uint8Array(arrayBuffer), blobOffset);
-    this.stack.push(this.offsetStackValue(blobOffset, ValueType.BLOB, bitWidth));
+    this.stack.push(
+      this.offsetStackValue(blobOffset, ValueType.BLOB, bitWidth),
+    );
     this.offset = newOffset;
   }
 
   private writeString(str: string): void {
-    if (this.dedupStrings && Object.prototype.hasOwnProperty.call(this.stringLookup, str)) {
+    if (
+      this.dedupStrings &&
+      Object.prototype.hasOwnProperty.call(this.stringLookup, str)
+    ) {
       this.stack.push(this.stringLookup[str]);
       return;
     }
@@ -118,7 +139,11 @@
     const stringOffset = this.offset;
     const newOffset = this.computeOffset(length + 1);
     new Uint8Array(this.buffer).set(utf8, stringOffset);
-    const stackValue = this.offsetStackValue(stringOffset, ValueType.STRING, bitWidth);
+    const stackValue = this.offsetStackValue(
+      stringOffset,
+      ValueType.STRING,
+      bitWidth,
+    );
     this.stack.push(stackValue);
     if (this.dedupStrings) {
       this.stringLookup[str] = stackValue;
@@ -127,7 +152,10 @@
   }
 
   private writeKey(str: string): void {
-    if (this.dedupKeys && Object.prototype.hasOwnProperty.call(this.keyLookup, str)) {
+    if (
+      this.dedupKeys &&
+      Object.prototype.hasOwnProperty.call(this.keyLookup, str)
+    ) {
       this.stack.push(this.keyLookup[str]);
       return;
     }
@@ -135,7 +163,11 @@
     const length = utf8.length;
     const newOffset = this.computeOffset(length + 1);
     new Uint8Array(this.buffer).set(utf8, this.offset);
-    const stackValue = this.offsetStackValue(this.offset, ValueType.KEY, BitWidth.WIDTH8);
+    const stackValue = this.offsetStackValue(
+      this.offset,
+      ValueType.KEY,
+      BitWidth.WIDTH8,
+    );
     this.stack.push(stackValue);
     if (this.dedupKeys) {
       this.keyLookup[str] = stackValue;
@@ -147,10 +179,13 @@
     const newOffset = this.computeOffset(byteWidth);
     if (value.isOffset()) {
       const relativeOffset = this.offset - value.offset;
-      if (byteWidth === 8 || BigInt(relativeOffset) < (BigInt(1) << BigInt(byteWidth * 8))) {
+      if (
+        byteWidth === 8 ||
+        BigInt(relativeOffset) < BigInt(1) << BigInt(byteWidth * 8)
+      ) {
         this.writeUInt(relativeOffset, byteWidth);
       } else {
-        throw `Unexpected size ${byteWidth}. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new`
+        throw `Unexpected size ${byteWidth}. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new`;
       }
     } else {
       value.writeToBuffer(byteWidth);
@@ -160,30 +195,40 @@
 
   private integrityCheckOnValueAddition() {
     if (this.finished) {
-      throw "Adding values after finish is prohibited";
+      throw 'Adding values after finish is prohibited';
     }
-    if (this.stackPointers.length !== 0 && this.stackPointers[this.stackPointers.length - 1].isVector === false) {
+    if (
+      this.stackPointers.length !== 0 &&
+      this.stackPointers[this.stackPointers.length - 1].isVector === false
+    ) {
       if (this.stack[this.stack.length - 1].type !== ValueType.KEY) {
-        throw "Adding value to a map before adding a key is prohibited";
+        throw 'Adding value to a map before adding a key is prohibited';
       }
     }
   }
 
   private integrityCheckOnKeyAddition() {
     if (this.finished) {
-      throw "Adding values after finish is prohibited";
+      throw 'Adding values after finish is prohibited';
     }
-    if (this.stackPointers.length === 0 || this.stackPointers[this.stackPointers.length - 1].isVector) {
-      throw "Adding key before starting a map is prohibited";
+    if (
+      this.stackPointers.length === 0 ||
+      this.stackPointers[this.stackPointers.length - 1].isVector
+    ) {
+      throw 'Adding key before starting a map is prohibited';
     }
   }
 
   startVector(): void {
-    this.stackPointers.push({ stackPosition: this.stack.length, isVector: true });
+    this.stackPointers.push({stackPosition: this.stack.length, isVector: true});
   }
 
   startMap(presorted = false): void {
-    this.stackPointers.push({ stackPosition: this.stack.length, isVector: false, presorted: presorted });
+    this.stackPointers.push({
+      stackPosition: this.stack.length,
+      isVector: false,
+      presorted: presorted,
+    });
   }
 
   private endVector(stackPointer: StackPointer) {
@@ -197,28 +242,42 @@
     if (!stackPointer.presorted) {
       this.sort(stackPointer);
     }
-    let keyVectorHash = "";
+    let keyVectorHash = '';
     for (let i = stackPointer.stackPosition; i < this.stack.length; i += 2) {
       keyVectorHash += `,${this.stack[i].offset}`;
     }
     const vecLength = (this.stack.length - stackPointer.stackPosition) >> 1;
 
-    if (this.dedupKeyVectors && !Object.prototype.hasOwnProperty.call(this.keyVectorLookup, keyVectorHash)) {
-      this.keyVectorLookup[keyVectorHash] = this.createVector(stackPointer.stackPosition, vecLength, 2);
+    if (
+      this.dedupKeyVectors &&
+      !Object.prototype.hasOwnProperty.call(this.keyVectorLookup, keyVectorHash)
+    ) {
+      this.keyVectorLookup[keyVectorHash] = this.createVector(
+        stackPointer.stackPosition,
+        vecLength,
+        2,
+      );
     }
-    const keysStackValue = this.dedupKeyVectors ? this.keyVectorLookup[keyVectorHash] : this.createVector(stackPointer.stackPosition, vecLength, 2);
-    const valuesStackValue = this.createVector(stackPointer.stackPosition + 1, vecLength, 2, keysStackValue);
+    const keysStackValue = this.dedupKeyVectors
+      ? this.keyVectorLookup[keyVectorHash]
+      : this.createVector(stackPointer.stackPosition, vecLength, 2);
+    const valuesStackValue = this.createVector(
+      stackPointer.stackPosition + 1,
+      vecLength,
+      2,
+      keysStackValue,
+    );
     this.stack.splice(stackPointer.stackPosition, vecLength << 1);
     this.stack.push(valuesStackValue);
   }
 
   private sort(stackPointer: StackPointer) {
-    const view = this.view
-    const stack = this.stack
+    const view = this.view;
+    const stack = this.stack;
 
     function shouldFlip(v1: StackValue, v2: StackValue) {
       if (v1.type !== ValueType.KEY || v2.type !== ValueType.KEY) {
-        throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method calls properly.`
+        throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method calls properly.`;
       }
       let c1, c2;
       let index = 0;
@@ -258,7 +317,7 @@
 
     function smaller(v1: StackValue, v2: StackValue) {
       if (v1.type !== ValueType.KEY || v2.type !== ValueType.KEY) {
-        throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method calls properly.`
+        throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method calls properly.`;
       }
       if (v1.offset === v2.offset) {
         return false;
@@ -276,9 +335,8 @@
     }
 
     function quickSort(left: number, right: number) {
-
       if (left < right) {
-        const mid = left + (((right - left) >> 2)) * 2;
+        const mid = left + ((right - left) >> 2) * 2;
         const pivot = stack[mid];
         let left_new = left;
         let right_new = right;
@@ -299,12 +357,15 @@
 
         quickSort(left, right_new);
         quickSort(left_new, right);
-
       }
     }
 
     let sorted = true;
-    for (let i = stackPointer.stackPosition; i < this.stack.length - 2; i += 2) {
+    for (
+      let i = stackPointer.stackPosition;
+      i < this.stack.length - 2;
+      i += 2
+    ) {
       if (shouldFlip(this.stack[i], this.stack[i + 2])) {
         sorted = false;
         break;
@@ -330,7 +391,12 @@
     }
   }
 
-  private createVector(start: number, vecLength: number, step: number, keys: StackValue | null = null) {
+  private createVector(
+    start: number,
+    vecLength: number,
+    step: number,
+    keys: StackValue | null = null,
+  ) {
     let bitWidth = uwidth(vecLength);
     let prefixElements = 1;
     if (keys !== null) {
@@ -343,7 +409,10 @@
     let vectorType = ValueType.KEY;
     let typed = keys === null;
     for (let i = start; i < this.stack.length; i += step) {
-      const elementWidth = this.stack[i].elementWidth(this.offset, i + prefixElements);
+      const elementWidth = this.stack[i].elementWidth(
+        this.offset,
+        i + prefixElements,
+      );
       if (elementWidth > bitWidth) {
         bitWidth = elementWidth;
       }
@@ -357,7 +426,8 @@
       }
     }
     const byteWidth = this.align(bitWidth);
-    const fix = typed && isNumber(vectorType) && vecLength >= 2 && vecLength <= 4;
+    const fix =
+      typed && isNumber(vectorType) && vecLength >= 2 && vecLength <= 4;
     if (keys !== null) {
       this.writeStackValue(keys, byteWidth);
       this.writeUInt(1 << keys.width, byteWidth);
@@ -404,7 +474,11 @@
     return new StackValue(this, ValueType.FLOAT, fwidth(value), value);
   }
 
-  private offsetStackValue(offset: number, valueType: ValueType, bitWidth: BitWidth): StackValue {
+  private offsetStackValue(
+    offset: number,
+    valueType: ValueType,
+    bitWidth: BitWidth,
+  ): StackValue {
     return new StackValue(this, valueType, bitWidth, null, offset);
   }
 
@@ -420,16 +494,28 @@
     this.finished = true;
   }
 
-  add(value: undefined | null | boolean | bigint | number | DataView | string | Array<unknown> | Record<string, unknown> | unknown): void {
+  add(
+    value:
+      | undefined
+      | null
+      | boolean
+      | bigint
+      | number
+      | DataView
+      | string
+      | Array<unknown>
+      | Record<string, unknown>
+      | unknown,
+  ): void {
     this.integrityCheckOnValueAddition();
     if (typeof value === 'undefined') {
-      throw "You need to provide a value";
+      throw 'You need to provide a value';
     }
     if (value === null) {
       this.stack.push(this.nullStackValue());
-    } else if (typeof value === "boolean") {
+    } else if (typeof value === 'boolean') {
       this.stack.push(this.boolStackValue(value));
-    } else if (typeof value === "bigint") {
+    } else if (typeof value === 'bigint') {
       this.stack.push(this.intStackValue(value));
     } else if (typeof value == 'number') {
       if (Number.isInteger(value)) {
@@ -484,7 +570,10 @@
       this.stack.push(this.intStackValue(value));
       return;
     }
-    if (deduplicate && Object.prototype.hasOwnProperty.call(this.indirectIntLookup, value)) {
+    if (
+      deduplicate &&
+      Object.prototype.hasOwnProperty.call(this.indirectIntLookup, value)
+    ) {
       this.stack.push(this.indirectIntLookup[value]);
       return;
     }
@@ -493,7 +582,11 @@
     const newOffset = this.computeOffset(byteWidth);
     const valueOffset = this.offset;
     stackValue.writeToBuffer(byteWidth);
-    const stackOffset = this.offsetStackValue(valueOffset, ValueType.INDIRECT_INT, stackValue.width);
+    const stackOffset = this.offsetStackValue(
+      valueOffset,
+      ValueType.INDIRECT_INT,
+      stackValue.width,
+    );
     this.stack.push(stackOffset);
     this.offset = newOffset;
     if (deduplicate) {
@@ -507,7 +600,10 @@
       this.stack.push(this.uintStackValue(value));
       return;
     }
-    if (deduplicate && Object.prototype.hasOwnProperty.call(this.indirectUIntLookup, value)) {
+    if (
+      deduplicate &&
+      Object.prototype.hasOwnProperty.call(this.indirectUIntLookup, value)
+    ) {
       this.stack.push(this.indirectUIntLookup[value]);
       return;
     }
@@ -516,7 +612,11 @@
     const newOffset = this.computeOffset(byteWidth);
     const valueOffset = this.offset;
     stackValue.writeToBuffer(byteWidth);
-    const stackOffset = this.offsetStackValue(valueOffset, ValueType.INDIRECT_UINT, stackValue.width);
+    const stackOffset = this.offsetStackValue(
+      valueOffset,
+      ValueType.INDIRECT_UINT,
+      stackValue.width,
+    );
     this.stack.push(stackOffset);
     this.offset = newOffset;
     if (deduplicate) {
@@ -530,7 +630,10 @@
       this.stack.push(this.floatStackValue(value));
       return;
     }
-    if (deduplicate && Object.prototype.hasOwnProperty.call(this.indirectFloatLookup, value)) {
+    if (
+      deduplicate &&
+      Object.prototype.hasOwnProperty.call(this.indirectFloatLookup, value)
+    ) {
       this.stack.push(this.indirectFloatLookup[value]);
       return;
     }
@@ -539,7 +642,11 @@
     const newOffset = this.computeOffset(byteWidth);
     const valueOffset = this.offset;
     stackValue.writeToBuffer(byteWidth);
-    const stackOffset = this.offsetStackValue(valueOffset, ValueType.INDIRECT_FLOAT, stackValue.width);
+    const stackOffset = this.offsetStackValue(
+      valueOffset,
+      ValueType.INDIRECT_FLOAT,
+      stackValue.width,
+    );
     this.stack.push(stackOffset);
     this.offset = newOffset;
     if (deduplicate) {
diff --git a/ts/flexbuffers/flexbuffers-util.ts b/ts/flexbuffers/flexbuffers-util.ts
index 83186e9..c4ab007 100644
--- a/ts/flexbuffers/flexbuffers-util.ts
+++ b/ts/flexbuffers/flexbuffers-util.ts
@@ -3,7 +3,7 @@
   return decoder.decode(data);
 }
 
-export function toUTF8Array(str: string) : Uint8Array {
+export function toUTF8Array(str: string): Uint8Array {
   const encoder = new TextEncoder();
   return encoder.encode(str);
-}
\ No newline at end of file
+}
diff --git a/ts/flexbuffers/reference-util.ts b/ts/flexbuffers/reference-util.ts
index 52fb600..c0e0be6 100644
--- a/ts/flexbuffers/reference-util.ts
+++ b/ts/flexbuffers/reference-util.ts
@@ -1,14 +1,25 @@
-import { BitWidth } from './bit-width.js'
-import { toByteWidth, fromByteWidth } from './bit-width-util.js'
-import { toUTF8Array, fromUTF8Array } from './flexbuffers-util.js'
+import {fromByteWidth, toByteWidth} from './bit-width-util.js';
+import {BitWidth} from './bit-width.js';
+import {fromUTF8Array, toUTF8Array} from './flexbuffers-util.js';
 
-export function validateOffset(dataView: DataView, offset: number, width: number): void {
-  if (dataView.byteLength <= offset + width || (offset & (toByteWidth(width) - 1)) !== 0) {
-    throw "Bad offset: " + offset + ", width: " + width;
+export function validateOffset(
+  dataView: DataView,
+  offset: number,
+  width: number,
+): void {
+  if (
+    dataView.byteLength <= offset + width ||
+    (offset & (toByteWidth(width) - 1)) !== 0
+  ) {
+    throw 'Bad offset: ' + offset + ', width: ' + width;
   }
 }
 
-export function readInt(dataView: DataView, offset: number, width: number): number | bigint {
+export function readInt(
+  dataView: DataView,
+  offset: number,
+  width: number,
+): number | bigint {
   if (width < 2) {
     if (width < 1) {
       return dataView.getInt8(offset);
@@ -17,17 +28,24 @@
     }
   } else {
     if (width < 3) {
-      return dataView.getInt32(offset, true)
+      return dataView.getInt32(offset, true);
     } else {
       if (dataView.setBigInt64 === undefined) {
-        return BigInt(dataView.getUint32(offset, true)) + (BigInt(dataView.getUint32(offset + 4, true)) << BigInt(32));
+        return (
+          BigInt(dataView.getUint32(offset, true)) +
+          (BigInt(dataView.getUint32(offset + 4, true)) << BigInt(32))
+        );
       }
-      return dataView.getBigInt64(offset, true)
+      return dataView.getBigInt64(offset, true);
     }
   }
 }
 
-export function readUInt(dataView: DataView, offset: number, width: number): number | bigint {
+export function readUInt(
+  dataView: DataView,
+  offset: number,
+  width: number,
+): number | bigint {
   if (width < 2) {
     if (width < 1) {
       return dataView.getUint8(offset);
@@ -36,19 +54,26 @@
     }
   } else {
     if (width < 3) {
-      return dataView.getUint32(offset, true)
+      return dataView.getUint32(offset, true);
     } else {
       if (dataView.getBigUint64 === undefined) {
-        return BigInt(dataView.getUint32(offset, true)) + (BigInt(dataView.getUint32(offset + 4, true)) << BigInt(32));
+        return (
+          BigInt(dataView.getUint32(offset, true)) +
+          (BigInt(dataView.getUint32(offset + 4, true)) << BigInt(32))
+        );
       }
-      return dataView.getBigUint64(offset, true)
+      return dataView.getBigUint64(offset, true);
     }
   }
 }
 
-export function readFloat(dataView: DataView, offset: number, width: number): number {
+export function readFloat(
+  dataView: DataView,
+  offset: number,
+  width: number,
+): number {
   if (width < BitWidth.WIDTH32) {
-    throw "Bad width: " + width;
+    throw 'Bad width: ' + width;
   }
   if (width === BitWidth.WIDTH32) {
     return dataView.getFloat32(offset, true);
@@ -56,17 +81,32 @@
   return dataView.getFloat64(offset, true);
 }
 
-export function indirect(dataView: DataView, offset: number, width: number): number {
+export function indirect(
+  dataView: DataView,
+  offset: number,
+  width: number,
+): number {
   const step = readUInt(dataView, offset, width) as number;
   return offset - step;
 }
 
-export function keyIndex(key: string, dataView: DataView, offset: number, parentWidth: number, byteWidth: number, length: number): number | null {
+export function keyIndex(
+  key: string,
+  dataView: DataView,
+  offset: number,
+  parentWidth: number,
+  byteWidth: number,
+  length: number,
+): number | null {
   const input = toUTF8Array(key);
-  const keysVectorOffset = indirect(dataView, offset, parentWidth) - byteWidth * 3;
+  const keysVectorOffset =
+    indirect(dataView, offset, parentWidth) - byteWidth * 3;
   const bitWidth = fromByteWidth(byteWidth);
-  const indirectOffset = keysVectorOffset - Number(readUInt(dataView, keysVectorOffset, bitWidth));
-  const _byteWidth = Number(readUInt(dataView, keysVectorOffset + byteWidth, bitWidth));
+  const indirectOffset =
+    keysVectorOffset - Number(readUInt(dataView, keysVectorOffset, bitWidth));
+  const _byteWidth = Number(
+    readUInt(dataView, keysVectorOffset + byteWidth, bitWidth),
+  );
   let low = 0;
   let high = length - 1;
   while (low <= high) {
@@ -82,9 +122,16 @@
   return null;
 }
 
-export function diffKeys(input: Uint8Array, index: number, dataView: DataView, offset: number, width: number): number {
+export function diffKeys(
+  input: Uint8Array,
+  index: number,
+  dataView: DataView,
+  offset: number,
+  width: number,
+): number {
   const keyOffset = offset + index * width;
-  const keyIndirectOffset = keyOffset - Number(readUInt(dataView, keyOffset, fromByteWidth(width)));
+  const keyIndirectOffset =
+    keyOffset - Number(readUInt(dataView, keyOffset, fromByteWidth(width)));
   for (let i = 0; i < input.length; i++) {
     const dif = input[i] - dataView.getUint8(keyIndirectOffset + i);
     if (dif !== 0) {
@@ -94,16 +141,30 @@
   return dataView.getUint8(keyIndirectOffset + input.length) === 0 ? 0 : -1;
 }
 
-export function keyForIndex(index: number, dataView: DataView, offset: number, parentWidth: number, byteWidth: number): string {
-  const keysVectorOffset = indirect(dataView, offset, parentWidth) - byteWidth * 3;
+export function keyForIndex(
+  index: number,
+  dataView: DataView,
+  offset: number,
+  parentWidth: number,
+  byteWidth: number,
+): string {
+  const keysVectorOffset =
+    indirect(dataView, offset, parentWidth) - byteWidth * 3;
   const bitWidth = fromByteWidth(byteWidth);
-  const indirectOffset = keysVectorOffset - Number(readUInt(dataView, keysVectorOffset, bitWidth));
-  const _byteWidth = Number(readUInt(dataView, keysVectorOffset + byteWidth, bitWidth));
+  const indirectOffset =
+    keysVectorOffset - Number(readUInt(dataView, keysVectorOffset, bitWidth));
+  const _byteWidth = Number(
+    readUInt(dataView, keysVectorOffset + byteWidth, bitWidth),
+  );
   const keyOffset = indirectOffset + index * _byteWidth;
-  const keyIndirectOffset = keyOffset - Number(readUInt(dataView, keyOffset, fromByteWidth(_byteWidth)));
+  const keyIndirectOffset =
+    keyOffset -
+    Number(readUInt(dataView, keyOffset, fromByteWidth(_byteWidth)));
   let length = 0;
   while (dataView.getUint8(keyIndirectOffset + length) !== 0) {
     length++;
   }
-  return fromUTF8Array(new Uint8Array(dataView.buffer, keyIndirectOffset, length));
+  return fromUTF8Array(
+    new Uint8Array(dataView.buffer, keyIndirectOffset, length),
+  );
 }
diff --git a/ts/flexbuffers/reference.ts b/ts/flexbuffers/reference.ts
index 38c2f0a..d4e59c3 100644
--- a/ts/flexbuffers/reference.ts
+++ b/ts/flexbuffers/reference.ts
@@ -1,15 +1,32 @@
-import { fromByteWidth } from './bit-width-util.js'
-import { ValueType } from './value-type.js'
-import { isNumber, isIndirectNumber, isAVector, fixedTypedVectorElementSize, isFixedTypedVector, isTypedVector, typedVectorElementType, packedType, fixedTypedVectorElementType } from './value-type-util.js'
-import { indirect, keyForIndex, keyIndex, readFloat, readInt, readUInt } from './reference-util.js'
-import { fromUTF8Array } from './flexbuffers-util.js';
-import { BitWidth } from './bit-width.js';
+import {fromByteWidth} from './bit-width-util.js';
+import {BitWidth} from './bit-width.js';
+import {fromUTF8Array} from './flexbuffers-util.js';
+import {
+  indirect,
+  keyForIndex,
+  keyIndex,
+  readFloat,
+  readInt,
+  readUInt,
+} from './reference-util.js';
+import {
+  fixedTypedVectorElementSize,
+  fixedTypedVectorElementType,
+  isAVector,
+  isFixedTypedVector,
+  isIndirectNumber,
+  isNumber,
+  isTypedVector,
+  packedType,
+  typedVectorElementType,
+} from './value-type-util.js';
+import {ValueType} from './value-type.js';
 
 export function toReference(buffer: ArrayBuffer): Reference {
   const len = buffer.byteLength;
 
   if (len < 3) {
-    throw "Buffer needs to be bigger than 3";
+    throw 'Buffer needs to be bigger than 3';
   }
 
   const dataView = new DataView(buffer);
@@ -18,34 +35,78 @@
   const parentWidth = fromByteWidth(byteWidth);
   const offset = len - byteWidth - 2;
 
-  return new Reference(dataView, offset, parentWidth, packedType, "/")
+  return new Reference(dataView, offset, parentWidth, packedType, '/');
 }
 
-function valueForIndexWithKey(index: number, key: string, dataView: DataView, offset: number, parentWidth: number, byteWidth: number, length: number, path: string): Reference {
+function valueForIndexWithKey(
+  index: number,
+  key: string,
+  dataView: DataView,
+  offset: number,
+  parentWidth: number,
+  byteWidth: number,
+  length: number,
+  path: string,
+): Reference {
   const _indirect = indirect(dataView, offset, parentWidth);
   const elementOffset = _indirect + index * byteWidth;
   const packedType = dataView.getUint8(_indirect + length * byteWidth + index);
-  return new Reference(dataView, elementOffset, fromByteWidth(byteWidth), packedType, `${path}/${key}`)
+  return new Reference(
+    dataView,
+    elementOffset,
+    fromByteWidth(byteWidth),
+    packedType,
+    `${path}/${key}`,
+  );
 }
 
 export class Reference {
-  private readonly byteWidth: number
-  private readonly valueType: ValueType
-  private _length = -1
-  constructor(private dataView: DataView, private offset: number, private parentWidth: number, private packedType: ValueType, private path: string) {
-    this.byteWidth = 1 << (packedType & 3)
-    this.valueType = packedType >> 2
+  private readonly byteWidth: number;
+  private readonly valueType: ValueType;
+  private _length = -1;
+  constructor(
+    private dataView: DataView,
+    private offset: number,
+    private parentWidth: number,
+    private packedType: ValueType,
+    private path: string,
+  ) {
+    this.byteWidth = 1 << (packedType & 3);
+    this.valueType = packedType >> 2;
   }
 
-  isNull(): boolean { return this.valueType === ValueType.NULL; }
-  isNumber(): boolean { return isNumber(this.valueType) || isIndirectNumber(this.valueType); }
-  isFloat(): boolean { return ValueType.FLOAT === this.valueType || ValueType.INDIRECT_FLOAT === this.valueType; }
-  isInt(): boolean { return this.isNumber() && !this.isFloat(); }
-  isString(): boolean { return ValueType.STRING === this.valueType || ValueType.KEY === this.valueType; }
-  isBool(): boolean { return ValueType.BOOL === this.valueType; }
-  isBlob(): boolean { return ValueType.BLOB === this.valueType; }
-  isVector(): boolean { return isAVector(this.valueType); }
-  isMap(): boolean { return ValueType.MAP === this.valueType; }
+  isNull(): boolean {
+    return this.valueType === ValueType.NULL;
+  }
+  isNumber(): boolean {
+    return isNumber(this.valueType) || isIndirectNumber(this.valueType);
+  }
+  isFloat(): boolean {
+    return (
+      ValueType.FLOAT === this.valueType ||
+      ValueType.INDIRECT_FLOAT === this.valueType
+    );
+  }
+  isInt(): boolean {
+    return this.isNumber() && !this.isFloat();
+  }
+  isString(): boolean {
+    return (
+      ValueType.STRING === this.valueType || ValueType.KEY === this.valueType
+    );
+  }
+  isBool(): boolean {
+    return ValueType.BOOL === this.valueType;
+  }
+  isBlob(): boolean {
+    return ValueType.BLOB === this.valueType;
+  }
+  isVector(): boolean {
+    return isAVector(this.valueType);
+  }
+  isMap(): boolean {
+    return ValueType.MAP === this.valueType;
+  }
 
   boolValue(): boolean | null {
     if (this.isBool()) {
@@ -62,10 +123,18 @@
       return readUInt(this.dataView, this.offset, this.parentWidth);
     }
     if (this.valueType === ValueType.INDIRECT_INT) {
-      return readInt(this.dataView, indirect(this.dataView, this.offset, this.parentWidth), fromByteWidth(this.byteWidth));
+      return readInt(
+        this.dataView,
+        indirect(this.dataView, this.offset, this.parentWidth),
+        fromByteWidth(this.byteWidth),
+      );
     }
     if (this.valueType === ValueType.INDIRECT_UINT) {
-      return readUInt(this.dataView, indirect(this.dataView, this.offset, this.parentWidth), fromByteWidth(this.byteWidth));
+      return readUInt(
+        this.dataView,
+        indirect(this.dataView, this.offset, this.parentWidth),
+        fromByteWidth(this.byteWidth),
+      );
     }
     return null;
   }
@@ -75,17 +144,28 @@
       return readFloat(this.dataView, this.offset, this.parentWidth);
     }
     if (this.valueType === ValueType.INDIRECT_FLOAT) {
-      return readFloat(this.dataView, indirect(this.dataView, this.offset, this.parentWidth), fromByteWidth(this.byteWidth));
+      return readFloat(
+        this.dataView,
+        indirect(this.dataView, this.offset, this.parentWidth),
+        fromByteWidth(this.byteWidth),
+      );
     }
     return null;
   }
 
-  numericValue(): number | bigint | null { return this.floatValue() || this.intValue()}
+  numericValue(): number | bigint | null {
+    return this.floatValue() || this.intValue();
+  }
 
   stringValue(): string | null {
-    if (this.valueType === ValueType.STRING || this.valueType === ValueType.KEY) {
+    if (
+      this.valueType === ValueType.STRING ||
+      this.valueType === ValueType.KEY
+    ) {
       const begin = indirect(this.dataView, this.offset, this.parentWidth);
-      return fromUTF8Array(new Uint8Array(this.dataView.buffer, begin, this.length()));
+      return fromUTF8Array(
+        new Uint8Array(this.dataView.buffer, begin, this.length()),
+      );
     }
     return null;
   }
@@ -106,7 +186,9 @@
       }
       const _indirect = indirect(this.dataView, this.offset, this.parentWidth);
       const elementOffset = _indirect + key * this.byteWidth;
-      let _packedType = this.dataView.getUint8(_indirect + length * this.byteWidth + key);
+      let _packedType = this.dataView.getUint8(
+        _indirect + length * this.byteWidth + key,
+      );
       if (isTypedVector(this.valueType)) {
         const _valueType = typedVectorElementType(this.valueType);
         _packedType = packedType(_valueType, BitWidth.WIDTH8);
@@ -114,12 +196,34 @@
         const _valueType = fixedTypedVectorElementType(this.valueType);
         _packedType = packedType(_valueType, BitWidth.WIDTH8);
       }
-      return new Reference(this.dataView, elementOffset, fromByteWidth(this.byteWidth), _packedType, `${this.path}[${key}]`);
+      return new Reference(
+        this.dataView,
+        elementOffset,
+        fromByteWidth(this.byteWidth),
+        _packedType,
+        `${this.path}[${key}]`,
+      );
     }
     if (typeof key === 'string') {
-      const index = keyIndex(key, this.dataView, this.offset, this.parentWidth, this.byteWidth, length);
+      const index = keyIndex(
+        key,
+        this.dataView,
+        this.offset,
+        this.parentWidth,
+        this.byteWidth,
+        length,
+      );
       if (index !== null) {
-        return valueForIndexWithKey(index, key, this.dataView, this.offset, this.parentWidth, this.byteWidth, length, this.path)
+        return valueForIndexWithKey(
+          index,
+          key,
+          this.dataView,
+          this.offset,
+          this.parentWidth,
+          this.byteWidth,
+          length,
+          this.path,
+        );
       }
     }
     throw `Key [${key}] is not applicable on ${this.path} of ${this.valueType}`;
@@ -132,19 +236,33 @@
     }
     if (isFixedTypedVector(this.valueType)) {
       this._length = fixedTypedVectorElementSize(this.valueType);
-    } else if (this.valueType === ValueType.BLOB
-      || this.valueType === ValueType.MAP
-      || isAVector(this.valueType)) {
-      this._length = readUInt(this.dataView, indirect(this.dataView, this.offset, this.parentWidth) - this.byteWidth, fromByteWidth(this.byteWidth)) as number
+    } else if (
+      this.valueType === ValueType.BLOB ||
+      this.valueType === ValueType.MAP ||
+      isAVector(this.valueType)
+    ) {
+      this._length = readUInt(
+        this.dataView,
+        indirect(this.dataView, this.offset, this.parentWidth) - this.byteWidth,
+        fromByteWidth(this.byteWidth),
+      ) as number;
     } else if (this.valueType === ValueType.NULL) {
       this._length = 0;
     } else if (this.valueType === ValueType.STRING) {
       const _indirect = indirect(this.dataView, this.offset, this.parentWidth);
       let sizeByteWidth = this.byteWidth;
-      size = readUInt(this.dataView, _indirect - sizeByteWidth, fromByteWidth(this.byteWidth));
+      size = readUInt(
+        this.dataView,
+        _indirect - sizeByteWidth,
+        fromByteWidth(this.byteWidth),
+      );
       while (this.dataView.getInt8(_indirect + (size as number)) !== 0) {
         sizeByteWidth <<= 1;
-        size = readUInt(this.dataView, _indirect - sizeByteWidth, fromByteWidth(this.byteWidth));
+        size = readUInt(
+          this.dataView,
+          _indirect - sizeByteWidth,
+          fromByteWidth(this.byteWidth),
+        );
       }
       this._length = size as number;
     } else if (this.valueType === ValueType.KEY) {
@@ -172,8 +290,23 @@
     if (this.isMap()) {
       const result: Record<string, unknown> = {};
       for (let i = 0; i < length; i++) {
-        const key = keyForIndex(i, this.dataView, this.offset, this.parentWidth, this.byteWidth);
-        result[key] = valueForIndexWithKey(i, key, this.dataView, this.offset, this.parentWidth, this.byteWidth, length, this.path).toObject();
+        const key = keyForIndex(
+          i,
+          this.dataView,
+          this.offset,
+          this.parentWidth,
+          this.byteWidth,
+        );
+        result[key] = valueForIndexWithKey(
+          i,
+          key,
+          this.dataView,
+          this.offset,
+          this.parentWidth,
+          this.byteWidth,
+          length,
+          this.path,
+        ).toObject();
       }
       return result;
     }
diff --git a/ts/flexbuffers/stack-value.ts b/ts/flexbuffers/stack-value.ts
index 0106417..3edf7b3 100644
--- a/ts/flexbuffers/stack-value.ts
+++ b/ts/flexbuffers/stack-value.ts
@@ -1,13 +1,17 @@
-import { Builder } from './builder.js'
-import { BitWidth } from './bit-width.js'
-import { paddingSize, uwidth, fromByteWidth } from './bit-width-util.js'
-import { ValueType } from './value-type.js'
-import { isInline, packedType } from './value-type-util.js'
+import {fromByteWidth, paddingSize, uwidth} from './bit-width-util.js';
+import {BitWidth} from './bit-width.js';
+import {Builder} from './builder.js';
+import {isInline, packedType} from './value-type-util.js';
+import {ValueType} from './value-type.js';
 
 export class StackValue {
-  constructor(private builder: Builder, public type: ValueType, public width: number, public value: number | boolean | null = null, public offset: number = 0) {
-
-  }
+  constructor(
+    private builder: Builder,
+    public type: ValueType,
+    public width: number,
+    public value: number | boolean | null = null,
+    public offset: number = 0,
+  ) {}
 
   elementWidth(size: number, index: number): BitWidth {
     if (isInline(this.type)) return this.width;
@@ -27,9 +31,17 @@
     const newOffset = this.builder.computeOffset(byteWidth);
     if (this.type === ValueType.FLOAT) {
       if (this.width === BitWidth.WIDTH32) {
-        this.builder.view.setFloat32(this.builder.offset, this.value as number, true);
+        this.builder.view.setFloat32(
+          this.builder.offset,
+          this.value as number,
+          true,
+        );
       } else {
-        this.builder.view.setFloat64(this.builder.offset, this.value as number, true);
+        this.builder.view.setFloat64(
+          this.builder.offset,
+          this.value as number,
+          true,
+        );
       }
     } else if (this.type === ValueType.INT) {
       const bitWidth = fromByteWidth(byteWidth);
@@ -42,7 +54,7 @@
     } else if (this.type === ValueType.BOOL) {
       this.builder.pushInt(this.value ? 1 : 0, this.width);
     } else {
-      throw `Unexpected type: ${this.type}. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new`
+      throw `Unexpected type: ${this.type}. This might be a bug. Please create an issue https://github.com/google/flatbuffers/issues/new`;
     }
     this.offset = newOffset;
   }
@@ -56,6 +68,6 @@
   }
 
   isOffset(): boolean {
-    return !isInline(this.type)
+    return !isInline(this.type);
   }
-}
\ No newline at end of file
+}
diff --git a/ts/flexbuffers/value-type-util.ts b/ts/flexbuffers/value-type-util.ts
index 784977d..7bf9873 100644
--- a/ts/flexbuffers/value-type-util.ts
+++ b/ts/flexbuffers/value-type-util.ts
@@ -1,41 +1,42 @@
-import { ValueType } from './value-type.js'
+import {ValueType} from './value-type.js';
 
 export function isInline(value: ValueType): boolean {
-  return value === ValueType.BOOL
-    || value <= ValueType.FLOAT;
+  return value === ValueType.BOOL || value <= ValueType.FLOAT;
 }
 
 export function isNumber(value: ValueType): boolean {
-  return value >= ValueType.INT
-    && value <= ValueType.FLOAT;
+  return value >= ValueType.INT && value <= ValueType.FLOAT;
 }
 
 export function isIndirectNumber(value: ValueType): boolean {
-  return value >= ValueType.INDIRECT_INT
-    && value <= ValueType.INDIRECT_FLOAT;
+  return value >= ValueType.INDIRECT_INT && value <= ValueType.INDIRECT_FLOAT;
 }
 
 export function isTypedVectorElement(value: ValueType): boolean {
-  return value === ValueType.BOOL
-    || (value >= ValueType.INT
-      && value <= ValueType.STRING);
+  return (
+    value === ValueType.BOOL ||
+    (value >= ValueType.INT && value <= ValueType.STRING)
+  );
 }
 
 export function isTypedVector(value: ValueType): boolean {
-  return value === ValueType.VECTOR_BOOL
-    || (value >= ValueType.VECTOR_INT
-      && value <= ValueType.VECTOR_STRING_DEPRECATED);
+  return (
+    value === ValueType.VECTOR_BOOL ||
+    (value >= ValueType.VECTOR_INT &&
+      value <= ValueType.VECTOR_STRING_DEPRECATED)
+  );
 }
 
 export function isFixedTypedVector(value: ValueType): boolean {
-  return value >= ValueType.VECTOR_INT2
-    && value <= ValueType.VECTOR_FLOAT4;
+  return value >= ValueType.VECTOR_INT2 && value <= ValueType.VECTOR_FLOAT4;
 }
 
 export function isAVector(value: ValueType): boolean {
-  return isTypedVector(value)
-    || isFixedTypedVector(value)
-    || value === ValueType.VECTOR;
+  return (
+    isTypedVector(value) ||
+    isFixedTypedVector(value) ||
+    value === ValueType.VECTOR
+  );
 }
 
 export function toTypedVector(valueType: ValueType, length: number): ValueType {
@@ -43,7 +44,7 @@
   if (length === 2) return valueType - ValueType.INT + ValueType.VECTOR_INT2;
   if (length === 3) return valueType - ValueType.INT + ValueType.VECTOR_INT3;
   if (length === 4) return valueType - ValueType.INT + ValueType.VECTOR_INT4;
-  throw "Unexpected length " + length;
+  throw 'Unexpected length ' + length;
 }
 
 export function typedVectorElementType(valueType: ValueType): ValueType {
@@ -61,4 +62,4 @@
 
 export function packedType(valueType: ValueType, bitWidth: number): ValueType {
   return bitWidth | (valueType << 2);
-}
\ No newline at end of file
+}
diff --git a/ts/flexbuffers/value-type.ts b/ts/flexbuffers/value-type.ts
index 9c88ba2..83f83b3 100644
--- a/ts/flexbuffers/value-type.ts
+++ b/ts/flexbuffers/value-type.ts
@@ -27,4 +27,4 @@
   BLOB = 25,
   BOOL = 26,
   VECTOR_BOOL = 36,
-}
\ No newline at end of file
+}
diff --git a/ts/types.ts b/ts/types.ts
index 851486c..0eb3422 100644
--- a/ts/types.ts
+++ b/ts/types.ts
@@ -1,17 +1,17 @@
-import { ByteBuffer } from './byte-buffer.js'
-import { Builder } from './builder.js'
+import {Builder} from './builder.js';
+import {ByteBuffer} from './byte-buffer.js';
 
 export type Offset = number;
 
 export type Table = {
-  bb: ByteBuffer
-  bb_pos: number
+  bb: ByteBuffer;
+  bb_pos: number;
 };
 
 export interface IGeneratedObject {
-  pack(builder:Builder): Offset
+  pack(builder: Builder): Offset;
 }
 
 export interface IUnpackableObject<T> {
-  unpack(): T
-}
\ No newline at end of file
+  unpack(): T;
+}
diff --git a/ts/utils.ts b/ts/utils.ts
index a2902e3..bf028d2 100644
--- a/ts/utils.ts
+++ b/ts/utils.ts
@@ -1,4 +1,5 @@
 export const int32 = new Int32Array(2);
 export const float32 = new Float32Array(int32.buffer);
 export const float64 = new Float64Array(int32.buffer);
-export const isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
\ No newline at end of file
+export const isLittleEndian =
+  new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;