@colyseus/schema 4.0.28 → 4.0.29
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.
|
@@ -28,7 +28,7 @@ export declare class MapSchema<V = any, K extends string = string> implements Ma
|
|
|
28
28
|
static is(type: any): boolean;
|
|
29
29
|
constructor(initialValues?: Map<K, V> | Record<K, V>);
|
|
30
30
|
/** Iterator */
|
|
31
|
-
[Symbol.iterator]():
|
|
31
|
+
[Symbol.iterator](): ReturnType<Map<K, V>[typeof Symbol.iterator]>;
|
|
32
32
|
get [Symbol.toStringTag](): string;
|
|
33
33
|
static get [Symbol.species](): typeof MapSchema;
|
|
34
34
|
set(key: K, value: V): this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colyseus/schema",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.29",
|
|
4
4
|
"description": "Binary state serializer with delta encoding for games",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc -p tsconfig.build.json && rollup -c rollup.config.mjs",
|
|
12
12
|
"watch": "tsc -p tsconfig.build.json -w",
|
|
13
|
-
"test": "tsx --tsconfig tsconfig.test.json ./node_modules/.bin/mocha test/*.test.ts test/**/*.test.ts",
|
|
13
|
+
"test": "npm run test:types && tsx --tsconfig tsconfig.test.json ./node_modules/.bin/mocha test/*.test.ts test/**/*.test.ts",
|
|
14
|
+
"test:types": "tsc -p tsconfig.build.json && tsc -p tsconfig.types.json",
|
|
14
15
|
"typecheck": "tsc -p tsconfig.test.json",
|
|
15
16
|
"coverage": "c8 npm run test",
|
|
16
17
|
"generate-test-1": "bin/schema-codegen test-external/PrimitiveTypes.ts --namespace SchemaTest.PrimitiveTypes --output ../colyseus-unity-sdk/Assets/Colyseus/Tests/Editor/ColyseusTests/Schema/PrimitiveTypes",
|
|
@@ -77,7 +77,7 @@ export class MapSchema<V=any, K extends string = string> implements Map<K, V>, C
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/** Iterator */
|
|
80
|
-
[Symbol.iterator]():
|
|
80
|
+
[Symbol.iterator](): ReturnType<Map<K, V>[typeof Symbol.iterator]> { return this.$items[Symbol.iterator](); }
|
|
81
81
|
get [Symbol.toStringTag]() { return this.$items[Symbol.toStringTag] }
|
|
82
82
|
|
|
83
83
|
static get [Symbol.species]() { return MapSchema; }
|