@colyseus/schema 3.0.6 → 3.0.7
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 +5 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +5 -1
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +5 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/build/cjs/index.js
CHANGED
|
@@ -2684,6 +2684,10 @@ class MapSchema {
|
|
|
2684
2684
|
registerType("map", { constructor: MapSchema });
|
|
2685
2685
|
|
|
2686
2686
|
const DEFAULT_VIEW_TAG = -1;
|
|
2687
|
+
function entity(constructor) {
|
|
2688
|
+
TypeContext.register(constructor);
|
|
2689
|
+
return constructor;
|
|
2690
|
+
}
|
|
2687
2691
|
/**
|
|
2688
2692
|
* [See documentation](https://docs.colyseus.io/state/schema/)
|
|
2689
2693
|
*
|
|
@@ -4898,6 +4902,7 @@ exports.dumpChanges = dumpChanges;
|
|
|
4898
4902
|
exports.encode = encode;
|
|
4899
4903
|
exports.encodeKeyValueOperation = encodeArray;
|
|
4900
4904
|
exports.encodeSchemaOperation = encodeSchemaOperation;
|
|
4905
|
+
exports.entity = entity;
|
|
4901
4906
|
exports.getDecoderStateCallbacks = getDecoderStateCallbacks;
|
|
4902
4907
|
exports.getRawChangesCallback = getRawChangesCallback;
|
|
4903
4908
|
exports.registerType = registerType;
|