Comparing version 0.32.6 to 0.32.7
@@ -0,1 +1,12 @@ | ||
## [0.32.7](https://github.com/jquense/yup/compare/v0.32.6...v0.32.7) (2020-12-10) | ||
### Bug Fixes | ||
* **types:** SchemaOf doesn't produce a union of base schema ([1e2028d](https://github.com/jquense/yup/commit/1e2028d)) | ||
## [0.32.6](https://github.com/jquense/yup/compare/v0.32.5...v0.32.6) (2020-12-08) | ||
@@ -2,0 +13,0 @@ |
@@ -19,5 +19,6 @@ import MixedSchema, { create as mixedCreate } from './mixed'; | ||
declare function addMethod<T extends new (...args: any) => AnySchema>(schemaType: T, name: string, fn: (this: InstanceType<T>, ...args: any[]) => InstanceType<T>): void; | ||
declare type SchemaOf<T> = T extends AnyObject ? ObjectSchema<{ | ||
[k in keyof T]: SchemaOf<T[k]>; | ||
}> : T extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T>, AnyObject, T>; | ||
declare type ObjectSchemaOf<T extends AnyObject> = ObjectSchema<{ | ||
[k in keyof T]-?: T[k] extends AnyObject ? ObjectSchemaOf<T[k]> : T[k] extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T[k]>, AnyObject, T[k]>; | ||
}>; | ||
declare type SchemaOf<T> = T extends AnyObject ? ObjectSchemaOf<T> : T extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T>, AnyObject, T>; | ||
export declare type AnyObjectSchema = ObjectSchema<any, any, any, any>; | ||
@@ -24,0 +25,0 @@ export type { SchemaOf, TypeOf, Asserts, Asserts as InferType, AnySchema }; |
@@ -19,5 +19,6 @@ import MixedSchema, { create as mixedCreate } from './mixed'; | ||
declare function addMethod<T extends new (...args: any) => AnySchema>(schemaType: T, name: string, fn: (this: InstanceType<T>, ...args: any[]) => InstanceType<T>): void; | ||
declare type SchemaOf<T> = T extends AnyObject ? ObjectSchema<{ | ||
[k in keyof T]: SchemaOf<T[k]>; | ||
}> : T extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T>, AnyObject, T>; | ||
declare type ObjectSchemaOf<T extends AnyObject> = ObjectSchema<{ | ||
[k in keyof T]-?: T[k] extends AnyObject ? ObjectSchemaOf<T[k]> : T[k] extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T[k]>, AnyObject, T[k]>; | ||
}>; | ||
declare type SchemaOf<T> = T extends AnyObject ? ObjectSchemaOf<T> : T extends Array<infer E> ? ArraySchema<SchemaOf<E>> : BaseSchema<Maybe<T>, AnyObject, T>; | ||
export declare type AnyObjectSchema = ObjectSchema<any, any, any, any>; | ||
@@ -24,0 +25,0 @@ export type { SchemaOf, TypeOf, Asserts, Asserts as InferType, AnySchema }; |
{ | ||
"name": "yup", | ||
"version": "0.32.6", | ||
"version": "0.32.7", | ||
"description": "Dead simple Object schema validation", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
310611
5977