Skip to content

Commit 9a611c3

Browse files
committed
avoid breaking changes with colyseus.js types
1 parent 8f5e112 commit 9a611c3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@colyseus/schema",
3-
"version": "3.0.15",
3+
"version": "3.0.16",
44
"description": "Binary state serializer with delta encoding for games",
55
"bin": {
66
"schema-codegen": "./bin/schema-codegen",

src/decoder/strategy/StateCallbacks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type { CollectionSchema } from "../../types/custom/CollectionSchema";
1818
//
1919

2020
export type SchemaCallbackProxy<RoomState> = (<T extends Schema>(instance: T) => CallbackProxy<T>);
21+
export type GetCallbackProxy = SchemaCallbackProxy<any>; // workaround for compatibility for < colyseus.js0.16.6. Remove me on next major release.
2122

2223
export type CallbackProxy<T> = unknown extends T // is "any"?
2324
? SchemaCallback<T> & CollectionCallback<any, any>

0 commit comments

Comments
 (0)