@colyseus/schema 5.0.13 → 5.0.14
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/Reflection.d.ts +36 -34
- package/build/index.cjs +5 -4
- package/build/index.cjs.map +1 -1
- package/build/index.js +5 -4
- package/build/index.mjs +5 -4
- package/build/index.mjs.map +1 -1
- package/build/types/HelperTypes.d.ts +3 -5
- package/build/types/builder.d.ts +7 -6
- package/package.json +2 -2
- package/src/types/HelperTypes.ts +16 -13
- package/src/types/builder.ts +7 -6
package/build/Reflection.d.ts
CHANGED
|
@@ -71,12 +71,12 @@ export declare const ReflectionField: import("./annotations.js").SchemaWithExten
|
|
|
71
71
|
childPrimitive: FieldBuilder<string, false, false>;
|
|
72
72
|
/** Set only on `t.quantized()` fields (`.optional()` — no auto-instantiated
|
|
73
73
|
* default; its absence is the "not quantized" signal on decode). */
|
|
74
|
-
quantized: FieldBuilder<{
|
|
75
|
-
min
|
|
76
|
-
max
|
|
77
|
-
bits
|
|
78
|
-
mode
|
|
79
|
-
} & Schema<any> & Schema<unknown>, false, true>;
|
|
74
|
+
quantized: FieldBuilder<{
|
|
75
|
+
min: number;
|
|
76
|
+
max: number;
|
|
77
|
+
bits: number;
|
|
78
|
+
mode: number;
|
|
79
|
+
} & {} & Schema<any> & Schema<unknown>, false, true>;
|
|
80
80
|
}, import("./index.js").BuilderInitProps<{
|
|
81
81
|
name: FieldBuilder<string, false, false>;
|
|
82
82
|
type: FieldBuilder<string, false, false>;
|
|
@@ -86,43 +86,45 @@ export declare const ReflectionField: import("./annotations.js").SchemaWithExten
|
|
|
86
86
|
childPrimitive: FieldBuilder<string, false, false>;
|
|
87
87
|
/** Set only on `t.quantized()` fields (`.optional()` — no auto-instantiated
|
|
88
88
|
* default; its absence is the "not quantized" signal on decode). */
|
|
89
|
-
quantized: FieldBuilder<{
|
|
90
|
-
min
|
|
91
|
-
max
|
|
92
|
-
bits
|
|
93
|
-
mode
|
|
94
|
-
} & Schema<any> & Schema<unknown>, false, true>;
|
|
89
|
+
quantized: FieldBuilder<{
|
|
90
|
+
min: number;
|
|
91
|
+
max: number;
|
|
92
|
+
bits: number;
|
|
93
|
+
mode: number;
|
|
94
|
+
} & {} & Schema<any> & Schema<unknown>, false, true>;
|
|
95
95
|
}>, typeof Schema>;
|
|
96
96
|
export type ReflectionField = SchemaType<typeof ReflectionField>;
|
|
97
97
|
export declare const ReflectionType: import("./annotations.js").SchemaWithExtendsConstructor<{
|
|
98
98
|
id: FieldBuilder<number, false, false>;
|
|
99
99
|
extendsId: FieldBuilder<number, false, false>;
|
|
100
|
-
fields: FieldBuilder<ArraySchema<{
|
|
101
|
-
name
|
|
102
|
-
type
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
fields: FieldBuilder<ArraySchema<{
|
|
101
|
+
name: string;
|
|
102
|
+
type: string;
|
|
103
|
+
referencedType: number;
|
|
104
|
+
childPrimitive: string;
|
|
105
|
+
} & {
|
|
106
|
+
quantized?: {
|
|
107
|
+
min: number;
|
|
108
|
+
max: number;
|
|
109
|
+
bits: number;
|
|
110
|
+
mode: number;
|
|
111
|
+
} & {} & Schema<any> & Schema<unknown>;
|
|
111
112
|
} & Schema<any> & Schema<unknown>>, true, false>;
|
|
112
113
|
}, import("./index.js").BuilderInitProps<{
|
|
113
114
|
id: FieldBuilder<number, false, false>;
|
|
114
115
|
extendsId: FieldBuilder<number, false, false>;
|
|
115
|
-
fields: FieldBuilder<ArraySchema<{
|
|
116
|
-
name
|
|
117
|
-
type
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
fields: FieldBuilder<ArraySchema<{
|
|
117
|
+
name: string;
|
|
118
|
+
type: string;
|
|
119
|
+
referencedType: number;
|
|
120
|
+
childPrimitive: string;
|
|
121
|
+
} & {
|
|
122
|
+
quantized?: {
|
|
123
|
+
min: number;
|
|
124
|
+
max: number;
|
|
125
|
+
bits: number;
|
|
126
|
+
mode: number;
|
|
127
|
+
} & {} & Schema<any> & Schema<unknown>;
|
|
126
128
|
} & Schema<any> & Schema<unknown>>, true, false>;
|
|
127
129
|
}>, typeof Schema>;
|
|
128
130
|
export type ReflectionType = SchemaType<typeof ReflectionType>;
|
package/build/index.cjs
CHANGED
|
@@ -6222,10 +6222,11 @@ registerType("stream", { constructor: StreamSchema });
|
|
|
6222
6222
|
* Schema ref whose `initialize` takes zero args.
|
|
6223
6223
|
* - `IsOptional` is a compile-time brand for `.optional()`. Both
|
|
6224
6224
|
* `HasDefault` and `IsOptional` make the field omittable in
|
|
6225
|
-
* `BuilderInitProps<T
|
|
6226
|
-
* `undefined extends V`)
|
|
6227
|
-
*
|
|
6228
|
-
*
|
|
6225
|
+
* `BuilderInitProps<T>`; `IsOptional` alone marks the instance property
|
|
6226
|
+
* `?:`. A separate brand (rather than reading `undefined extends V`)
|
|
6227
|
+
* keeps both correct for consumers compiling with
|
|
6228
|
+
* `strictNullChecks: false`, where `undefined extends V` is true for
|
|
6229
|
+
* every V.
|
|
6229
6230
|
*
|
|
6230
6231
|
* schema() reads the internal configuration via `toDefinition()` and wires
|
|
6231
6232
|
* up metadata through the existing pipeline.
|