@sinclair/typebox
Advanced tools
Comparing version 0.21.1 to 0.21.2
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.21.1", | ||
"version": "0.21.2", | ||
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -23,3 +23,6 @@ "keywords": [ | ||
"example": "hammer task example", | ||
"test": "hammer task spec" | ||
"spec": "hammer task spec", | ||
"spec:types": "hammer task spec_types", | ||
"spec:schemas": "hammer task spec_schemas", | ||
"test": "npm run spec" | ||
}, | ||
@@ -35,4 +38,5 @@ "devDependencies": { | ||
"mocha": "^9.1.2", | ||
"tsd": "^0.19.0", | ||
"typescript": "^4.5.2" | ||
} | ||
} |
@@ -193,2 +193,6 @@ export declare const ReadonlyOptionalModifier: unique symbol; | ||
export declare type UnionToIntersect<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; | ||
export declare type IntersectEvaluate<T extends readonly TSchema[]> = { | ||
[K in keyof T]: Static<T[K]>; | ||
}; | ||
export declare type IntersectReduce<I extends unknown, T extends readonly any[]> = T extends [infer A, ...infer B] ? IntersectReduce<I & A, B> : I; | ||
export declare type ReadonlyOptionalPropertyKeys<T extends TProperties> = { | ||
@@ -213,5 +217,6 @@ [K in keyof T]: T[K] extends TReadonlyOptional<TSchema> ? K : never; | ||
}; | ||
export declare type StaticRecord<K extends TRecordKey, T extends TSchema> = K extends TString ? Record<string, Static<T>> : K extends TNumber ? Record<number, Static<T>> : K extends TKeyOf<any> ? Record<K['_infer'], Static<T>> : K extends TUnion<any> ? Record<K['_infer'], Static<T>> : never; | ||
export declare type StaticEnum<T> = T extends TEnumKey<infer U>[] ? U : never; | ||
export declare type StaticKeyOf<T extends TKey[]> = T extends Array<infer K> ? K : never; | ||
export declare type StaticIntersect<T extends readonly TSchema[]> = UnionToIntersect<StaticUnion<T>>; | ||
export declare type StaticIntersect<T extends readonly TSchema[]> = IntersectReduce<unknown, IntersectEvaluate<T>>; | ||
export declare type StaticUnion<T extends readonly TSchema[]> = { | ||
@@ -224,3 +229,2 @@ [K in keyof T]: Static<T[K]>; | ||
export declare type StaticObject<T extends TProperties> = StaticProperties<StaticProperties<T>>; | ||
export declare type StaticRecord<K extends TRecordKey, T extends TSchema> = K extends TString ? Record<string, Static<T>> : K extends TNumber ? Record<number, Static<T>> : K extends TKeyOf<any> ? Record<K['_infer'], Static<T>> : K extends TUnion<any> ? Record<K['_infer'], Static<T>> : never; | ||
export declare type StaticArray<T extends TSchema> = Array<Static<T>>; | ||
@@ -227,0 +231,0 @@ export declare type StaticLiteral<T extends TValue> = T; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89921
612
10