Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yup

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yup - npm Package Compare versions

Comparing version 0.32.6 to 0.32.7

11

CHANGELOG.md

@@ -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 @@

7

es/index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc