Skip to content

Commit 1bbdcf1

Browse files
committed
schema({}): make sure to expose SchemaWithExtendsConstructor and SchemaWithExtends types for proper type inference
1 parent d82a04e commit 1bbdcf1

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
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.68",
3+
"version": "3.0.69",
44
"description": "Binary state serializer with delta encoding for games",
55
"bin": {
66
"schema-codegen": "bin/schema-codegen",

src/index.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,25 @@ export {
3939

4040
// Annotations, Metadata and TypeContext
4141
export { Metadata } from "./Metadata";
42-
export { type, deprecated, defineTypes, view, schema, entity, type SchemaWithExtends, type SchemaType } from "./annotations";
43-
export { TypeContext } from "./types/TypeContext";
4442

45-
// Annotation types
46-
export type { DefinitionType, PrimitiveType, Definition, } from "./annotations";
43+
// Schema definition types
44+
export {
45+
type,
46+
deprecated,
47+
defineTypes,
48+
view,
49+
schema,
50+
entity,
51+
type DefinitionType,
52+
type PrimitiveType,
53+
type Definition,
54+
// Raw schema() return types
55+
type SchemaWithExtendsConstructor,
56+
type SchemaWithExtends,
57+
type SchemaType,
58+
} from "./annotations";
59+
60+
export { TypeContext } from "./types/TypeContext";
4761

4862
// Helper types for type inference
4963
export type { InferValueType, InferSchemaInstanceType, AssignableProps } from "./types/HelperTypes";

0 commit comments

Comments
 (0)