@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.
- package/build/cjs/index.js +1 -2
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +1 -2
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +1 -2
- package/lib/Reflection.d.ts +1 -1
- package/lib/Reflection.js +1 -2
- package/lib/Reflection.js.map +1 -1
- package/package.json +1 -1
- package/src/Reflection.ts +1 -2
package/build/cjs/index.js
CHANGED
|
@@ -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
|
}
|