@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.
@@ -3822,7 +3822,7 @@ class Reflection extends Schema {
3822
3822
  super(...arguments);
3823
3823
  this.types = new ArraySchema();
3824
3824
  }
3825
- static encode(instance, context) {
3825
+ static encode(instance, context, it = { offset: 0 }) {
3826
3826
  if (!context) {
3827
3827
  context = new TypeContext(instance.constructor);
3828
3828
  }
@@ -3879,7 +3879,6 @@ class Reflection extends Schema {
3879
3879
  }
3880
3880
  buildType(type, klass[Symbol.metadata]);
3881
3881
  }
3882
- const it = { offset: 0 };
3883
3882
  const buf = encoder.encodeAll(it);
3884
3883
  return Buffer.from(buf, 0, it.offset);
3885
3884
  }