@colyseus/schema 3.0.4 → 3.0.6
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 +4 -5
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +4 -5
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +4 -5
- package/lib/decoder/Decoder.js +2 -3
- package/lib/decoder/Decoder.js.map +1 -1
- package/lib/types/custom/ArraySchema.d.ts +8 -0
- package/lib/types/custom/ArraySchema.js +2 -2
- package/lib/types/custom/ArraySchema.js.map +1 -1
- package/package.json +1 -1
- package/src/decoder/Decoder.ts +2 -4
- package/src/types/custom/ArraySchema.ts +10 -10
package/build/esm/index.mjs
CHANGED
|
@@ -2228,8 +2228,8 @@ class ArraySchema {
|
|
|
2228
2228
|
lastIndexOf(searchElement, fromIndex = this.length - 1) {
|
|
2229
2229
|
return this.items.lastIndexOf(searchElement, fromIndex);
|
|
2230
2230
|
}
|
|
2231
|
-
every(
|
|
2232
|
-
return this.items.every(
|
|
2231
|
+
every(callbackfn, thisArg) {
|
|
2232
|
+
return this.items.every(callbackfn, thisArg);
|
|
2233
2233
|
}
|
|
2234
2234
|
/**
|
|
2235
2235
|
* Determines whether the specified callback function returns true for any element of an array.
|
|
@@ -4203,12 +4203,11 @@ class Decoder {
|
|
|
4203
4203
|
return new type();
|
|
4204
4204
|
}
|
|
4205
4205
|
removeChildRefs(ref, allChanges) {
|
|
4206
|
-
const changeTree = ref[$changes];
|
|
4207
4206
|
const needRemoveRef = typeof (ref[$childType]) !== "string";
|
|
4208
|
-
const refId =
|
|
4207
|
+
const refId = this.root.refIds.get(ref);
|
|
4209
4208
|
ref.forEach((value, key) => {
|
|
4210
4209
|
allChanges.push({
|
|
4211
|
-
ref:
|
|
4210
|
+
ref: ref,
|
|
4212
4211
|
refId,
|
|
4213
4212
|
op: OPERATION.DELETE,
|
|
4214
4213
|
field: key,
|