@colyseus/schema 4.0.18 → 4.0.19
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/Schema.d.ts +2 -2
- package/build/annotations.d.ts +1 -1
- package/build/index.cjs.map +1 -1
- package/build/index.mjs.map +1 -1
- package/build/types/HelperTypes.d.ts +3 -3
- package/package.json +2 -1
- package/src/Schema.ts +2 -2
- package/src/types/HelperTypes.ts +3 -3
package/build/Schema.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare class Schema<C = any> implements IRef {
|
|
|
53
53
|
* @param jsonData JSON data to restore the instance from
|
|
54
54
|
* @returns
|
|
55
55
|
*/
|
|
56
|
-
restore
|
|
56
|
+
restore(jsonData: ToJSON<this>): this;
|
|
57
57
|
/**
|
|
58
58
|
* (Server-side): Flag a property to be encoded for the next patch.
|
|
59
59
|
* @param instance Schema instance
|
|
@@ -62,7 +62,7 @@ export declare class Schema<C = any> implements IRef {
|
|
|
62
62
|
*/
|
|
63
63
|
setDirty<K extends NonFunctionPropNames<this>>(property: K | number, operation?: OPERATION): void;
|
|
64
64
|
clone(): this;
|
|
65
|
-
toJSON(this: any): ToJSON<
|
|
65
|
+
toJSON(this: any): ToJSON<this>;
|
|
66
66
|
/**
|
|
67
67
|
* Used in tests only
|
|
68
68
|
* @internal
|
package/build/annotations.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare function view<T>(tag?: number): (target: T, fieldName: string) =>
|
|
|
63
63
|
export declare function unreliable<T>(target: T, field: string): void;
|
|
64
64
|
export declare function type(type: DefinitionType, options?: TypeOptions): PropertyDecorator;
|
|
65
65
|
export declare function getPropertyDescriptor(fieldCached: string, fieldIndex: number, type: DefinitionType, complexTypeKlass: TypeDefinition): {
|
|
66
|
-
get: (this: Schema) => number | ((index: number) => any) | ((index: number) => void) | (() => Schema<any>) | (<T extends Partial<Schema<any>>>(props: AssignableProps<T>) => Schema<any>) | (
|
|
66
|
+
get: (this: Schema) => number | ((index: number) => any) | ((index: number) => void) | (() => Schema<any>) | (<T extends Partial<Schema<any>>>(props: AssignableProps<T>) => Schema<any>) | ((jsonData: import("./index.js").ToJSON<Schema<any>>) => Schema<any>) | (<K extends "~refId">(property: number | K, operation?: OPERATION) => void) | ((this: any) => import("./index.js").ToJSON<Schema<any>>) | (() => void);
|
|
67
67
|
set: (this: Schema, value: any) => void;
|
|
68
68
|
enumerable: boolean;
|
|
69
69
|
configurable: boolean;
|