@colyseus/schema 4.0.9 → 4.0.10
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.
|
@@ -110,6 +110,9 @@ export declare const Callbacks: {
|
|
|
110
110
|
serializer: {
|
|
111
111
|
decoder: Decoder<T>;
|
|
112
112
|
};
|
|
113
|
+
} | {
|
|
114
|
+
state: T;
|
|
115
|
+
serializer: object;
|
|
113
116
|
}): StateCallbackStrategy<T>;
|
|
114
117
|
/**
|
|
115
118
|
* Get the legacy callbacks API.
|
|
@@ -123,6 +126,9 @@ export declare const Callbacks: {
|
|
|
123
126
|
serializer: {
|
|
124
127
|
decoder: Decoder<T>;
|
|
125
128
|
};
|
|
129
|
+
} | {
|
|
130
|
+
state: T;
|
|
131
|
+
serializer: object;
|
|
126
132
|
}): SchemaCallbackProxy<T>;
|
|
127
133
|
getRawChanges(decoder: Decoder, callback: (changes: DataChange[]) => void): void;
|
|
128
134
|
};
|
package/build/index.cjs
CHANGED
|
@@ -5441,7 +5441,7 @@ const Callbacks = {
|
|
|
5441
5441
|
if (roomOrDecoder instanceof Decoder) {
|
|
5442
5442
|
return new StateCallbackStrategy(roomOrDecoder);
|
|
5443
5443
|
}
|
|
5444
|
-
else if (roomOrDecoder.serializer
|
|
5444
|
+
else if ('decoder' in roomOrDecoder.serializer) {
|
|
5445
5445
|
return new StateCallbackStrategy(roomOrDecoder.serializer.decoder);
|
|
5446
5446
|
}
|
|
5447
5447
|
else {
|
|
@@ -5460,7 +5460,7 @@ const Callbacks = {
|
|
|
5460
5460
|
if (roomOrDecoder instanceof Decoder) {
|
|
5461
5461
|
return getDecoderStateCallbacks(roomOrDecoder);
|
|
5462
5462
|
}
|
|
5463
|
-
else if (roomOrDecoder.serializer
|
|
5463
|
+
else if ('decoder' in roomOrDecoder.serializer) {
|
|
5464
5464
|
return getDecoderStateCallbacks(roomOrDecoder.serializer.decoder);
|
|
5465
5465
|
}
|
|
5466
5466
|
},
|