@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.
@@ -2682,6 +2682,10 @@ class MapSchema {
2682
2682
  registerType("map", { constructor: MapSchema });
2683
2683
 
2684
2684
  const DEFAULT_VIEW_TAG = -1;
2685
+ function entity(constructor) {
2686
+ TypeContext.register(constructor);
2687
+ return constructor;
2688
+ }
2685
2689
  /**
2686
2690
  * [See documentation](https://docs.colyseus.io/state/schema/)
2687
2691
  *
@@ -4864,5 +4868,5 @@ registerType("array", { constructor: ArraySchema });
4864
4868
  registerType("set", { constructor: SetSchema });
4865
4869
  registerType("collection", { constructor: CollectionSchema, });
4866
4870
 
4867
- export { $changes, $childType, $decoder, $deleteByIndex, $encoder, $filter, $getByIndex, $track, ArraySchema, ChangeTree, CollectionSchema, Decoder, Encoder, MapSchema, Metadata, OPERATION, Reflection, ReflectionField, ReflectionType, Schema, SetSchema, StateView, TypeContext, decode, decodeKeyValueOperation, decodeSchemaOperation, defineCustomTypes, defineTypes, deprecated, dumpChanges, encode, encodeArray as encodeKeyValueOperation, encodeSchemaOperation, getDecoderStateCallbacks, getRawChangesCallback, registerType, schema, type, view };
4871
+ export { $changes, $childType, $decoder, $deleteByIndex, $encoder, $filter, $getByIndex, $track, ArraySchema, ChangeTree, CollectionSchema, Decoder, Encoder, MapSchema, Metadata, OPERATION, Reflection, ReflectionField, ReflectionType, Schema, SetSchema, StateView, TypeContext, decode, decodeKeyValueOperation, decodeSchemaOperation, defineCustomTypes, defineTypes, deprecated, dumpChanges, encode, encodeArray as encodeKeyValueOperation, encodeSchemaOperation, entity, getDecoderStateCallbacks, getRawChangesCallback, registerType, schema, type, view };
4868
4872
  //# sourceMappingURL=index.mjs.map