@sinclair/typebox
Advanced tools
Comparing version 0.24.1 to 0.24.2
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.24.1", | ||
"version": "0.24.2", | ||
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -269,4 +269,7 @@ export declare const Kind: unique symbol; | ||
} | ||
export interface UnsafeOptions extends SchemaOptions { | ||
[Kind]?: string; | ||
} | ||
export interface TUnsafe<T> extends TSchema { | ||
[Kind]: 'Unknown'; | ||
[Kind]: string; | ||
static: T; | ||
@@ -351,3 +354,3 @@ } | ||
/** Creates a user defined schema that infers as type T */ | ||
Unsafe<T>(options?: SchemaOptions): TUnsafe<T>; | ||
Unsafe<T>(options?: UnsafeOptions): TUnsafe<T>; | ||
/** Creates a void type */ | ||
@@ -354,0 +357,0 @@ Void(options?: SchemaOptions): TVoid; |
@@ -296,3 +296,3 @@ "use strict"; | ||
Unsafe(options = {}) { | ||
return this.Create({ ...options, [exports.Kind]: 'Unknown' }); | ||
return this.Create({ ...options, [exports.Kind]: options[exports.Kind] || 'Unsafe' }); | ||
} | ||
@@ -299,0 +299,0 @@ /** Creates a void type */ |
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
164258
2448