@colyseus/schema 3.0.0-alpha.4 → 3.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3818,7 +3818,7 @@ class Reflection extends Schema {
3818
3818
  super(...arguments);
3819
3819
  this.types = new ArraySchema();
3820
3820
  }
3821
- static encode(instance, context) {
3821
+ static encode(instance, context, it = { offset: 0 }) {
3822
3822
  if (!context) {
3823
3823
  context = new TypeContext(instance.constructor);
3824
3824
  }
@@ -3875,7 +3875,6 @@ class Reflection extends Schema {
3875
3875
  }
3876
3876
  buildType(type, klass[Symbol.metadata]);
3877
3877
  }
3878
- const it = { offset: 0 };
3879
3878
  const buf = encoder.encodeAll(it);
3880
3879
  return Buffer.from(buf, 0, it.offset);
3881
3880
  }