@sinclair/typebox
Advanced tools
Comparing version 0.16.6 to 0.16.7
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.16.6", | ||
"version": "0.16.7", | ||
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -175,5 +175,2 @@ export declare const ReadonlyOptionalModifier: unique symbol; | ||
export declare type IntersectObjectArray<T> = T extends Array<TObject<infer U>> ? UnionToIntersect<U> : TProperties; | ||
export declare type ReduceModifiers<T extends object> = { | ||
[K in keyof T]: T[K]; | ||
}; | ||
export declare type ObjectPropertyKeys<T> = T extends TObject<infer U> ? PropertyKeys<U> : never; | ||
@@ -191,3 +188,6 @@ export declare type PropertyKeys<T extends TProperties> = keyof T; | ||
export declare type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>; | ||
export declare type StaticProperties<T extends TProperties> = { | ||
export declare type ReduceModifiers<T extends object> = { | ||
[K in keyof T]: T[K]; | ||
}; | ||
export declare type StaticModifiers<T extends TProperties> = { | ||
readonly [K in ReadonlyOptionalPropertyKeys<T>]?: Static<T[K]>; | ||
@@ -208,3 +208,3 @@ } & { | ||
}; | ||
export declare type StaticObject<T extends TProperties> = StaticProperties<T>; | ||
export declare type StaticObject<T extends TProperties> = ReduceModifiers<StaticModifiers<T>>; | ||
export declare type StaticDict<T extends TSchema> = { | ||
@@ -223,3 +223,3 @@ [key: string]: Static<T>; | ||
export declare type StaticPromise<T extends TSchema> = Promise<Static<T>>; | ||
export declare type Static<T> = T extends TKeyOf<infer U> ? StaticKeyOf<U> : T extends TUnion<infer U> ? StaticUnion<U> : T extends TTuple<infer U> ? StaticTuple<U> : T extends TObject<infer U> ? ReduceModifiers<StaticObject<U>> : T extends TDict<infer U> ? StaticDict<U> : T extends TArray<infer U> ? StaticArray<U> : T extends TEnum<infer U> ? StaticEnum<U> : T extends TLiteral<infer U> ? StaticLiteral<U> : T extends TString ? string : T extends TNumber ? number : T extends TInteger ? number : T extends TBoolean ? boolean : T extends TNull ? null : T extends TUnknown ? unknown : T extends TAny ? any : T extends TConstructor<infer U, infer R> ? StaticConstructor<U, R> : T extends TFunction<infer U, infer R> ? StaticFunction<U, R> : T extends TPromise<infer U> ? StaticPromise<U> : T extends TUndefined ? undefined : T extends TVoid ? void : never; | ||
export declare type Static<T> = T extends TKeyOf<infer U> ? StaticKeyOf<U> : T extends TUnion<infer U> ? StaticUnion<U> : T extends TTuple<infer U> ? StaticTuple<U> : T extends TObject<infer U> ? StaticObject<U> : T extends TDict<infer U> ? StaticDict<U> : T extends TArray<infer U> ? StaticArray<U> : T extends TEnum<infer U> ? StaticEnum<U> : T extends TLiteral<infer U> ? StaticLiteral<U> : T extends TString ? string : T extends TNumber ? number : T extends TInteger ? number : T extends TBoolean ? boolean : T extends TNull ? null : T extends TUnknown ? unknown : T extends TAny ? any : T extends TConstructor<infer U, infer R> ? StaticConstructor<U, R> : T extends TFunction<infer U, infer R> ? StaticFunction<U, R> : T extends TPromise<infer U> ? StaticPromise<U> : T extends TUndefined ? undefined : T extends TVoid ? void : never; | ||
export declare class TypeBuilder { | ||
@@ -226,0 +226,0 @@ /** `STANDARD` Modifies a schema object property to be `readonly` and `optional`. */ |
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
76699