@colyseus/schema 2.0.14 → 2.0.15
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 +14 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +6 -0
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +14 -0
- package/lib/types/ArraySchema.d.ts +1 -0
- package/lib/types/ArraySchema.js +3 -0
- package/lib/types/ArraySchema.js.map +1 -1
- package/lib/types/MapSchema.d.ts +1 -0
- package/lib/types/MapSchema.js +3 -0
- package/lib/types/MapSchema.js.map +1 -1
- package/package.json +1 -1
- package/src/types/ArraySchema.ts +4 -0
- package/src/types/MapSchema.ts +4 -0
package/build/cjs/index.js
CHANGED
|
@@ -774,6 +774,13 @@ var ArraySchema = /** @class */ (function () {
|
|
|
774
774
|
ArraySchema.prototype[Symbol.iterator] = function () {
|
|
775
775
|
return Array.from(this.$items.values())[Symbol.iterator]();
|
|
776
776
|
};
|
|
777
|
+
Object.defineProperty(ArraySchema, Symbol.species, {
|
|
778
|
+
get: function () {
|
|
779
|
+
return ArraySchema;
|
|
780
|
+
},
|
|
781
|
+
enumerable: false,
|
|
782
|
+
configurable: true
|
|
783
|
+
});
|
|
777
784
|
/**
|
|
778
785
|
* Returns an iterable of key, value pairs for every entry in the array
|
|
779
786
|
*/
|
|
@@ -943,6 +950,13 @@ var MapSchema = /** @class */ (function () {
|
|
|
943
950
|
enumerable: false,
|
|
944
951
|
configurable: true
|
|
945
952
|
});
|
|
953
|
+
Object.defineProperty(MapSchema, Symbol.species, {
|
|
954
|
+
get: function () {
|
|
955
|
+
return MapSchema;
|
|
956
|
+
},
|
|
957
|
+
enumerable: false,
|
|
958
|
+
configurable: true
|
|
959
|
+
});
|
|
946
960
|
MapSchema.prototype.set = function (key, value) {
|
|
947
961
|
if (value === undefined || value === null) {
|
|
948
962
|
throw new Error("MapSchema#set('".concat(key, "', ").concat(value, "): trying to set ").concat(value, " value on '").concat(key, "'."));
|