@sinclair/typebox 0.30.0-dev-7 → 0.30.0
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/package.json +1 -1
- package/readme.md +1 -1
- package/typebox.d.ts +4 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -110,7 +110,7 @@ License MIT
|
|
|
110
110
|
- [Types](#typesystem-types)
|
|
111
111
|
- [Formats](#typesystem-formats)
|
|
112
112
|
- [Policies](#typesystem-policies)
|
|
113
|
-
- [Transform](#
|
|
113
|
+
- [Transform](#transform)
|
|
114
114
|
- [Ecosystem](#ecosystem)
|
|
115
115
|
- [Benchmark](#benchmark)
|
|
116
116
|
- [Compile](#benchmark-compile)
|
package/typebox.d.ts
CHANGED
|
@@ -230,7 +230,10 @@ export type TKeyOfIndices<T extends TSchema[]> = AssertRest<TKeyOfIndicesArray<T
|
|
|
230
230
|
} : []>;
|
|
231
231
|
export type TKeyOf<T extends TSchema = TSchema> = (T extends TRecursive<infer S> ? TKeyOfProperties<S> : T extends TIntersect ? TKeyOfProperties<T> : T extends TUnion ? TKeyOfProperties<T> : T extends TObject ? TKeyOfProperties<T> : T extends TTuple<infer K> ? TKeyOfIndices<K> : T extends TArray ? [TNumber] : T extends TRecord<infer K> ? [K] : [
|
|
232
232
|
]) extends infer R ? UnionType<AssertRest<R>> : never;
|
|
233
|
-
export type TLiteralValue =
|
|
233
|
+
export type TLiteralValue = boolean | number | string;
|
|
234
|
+
export type TLiteralBoolean = TLiteral<boolean>;
|
|
235
|
+
export type TLiteralNumber = TLiteral<number>;
|
|
236
|
+
export type TLiteralString = TLiteral<string>;
|
|
234
237
|
export interface TLiteral<T extends TLiteralValue = TLiteralValue> extends TSchema {
|
|
235
238
|
[Kind]: 'Literal';
|
|
236
239
|
static: T;
|