Socket
Socket
Sign inDemoInstall

@types/yup

Package Overview
Dependencies
0
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.29.11 to 0.29.12

102

yup/index.d.ts

@@ -89,3 +89,3 @@ // Type definitions for yup 0.29

// tslint:disable-next-line:no-unnecessary-generics
new <T = {} | null | undefined, C = object>(options?: { type?: string; [key: string]: any }): MixedSchema<T, C>;
new <T = {} | null | undefined, C = object>(options?: { type?: string | undefined; [key: string]: any }): MixedSchema<T, C>;
}

@@ -137,3 +137,3 @@

| StringLocale['matches']
| { message?: StringLocale['matches']; excludeEmptyString?: boolean },
| { message?: StringLocale['matches'] | undefined; excludeEmptyString?: boolean | undefined },
): StringSchema<T, C>;

@@ -451,3 +451,3 @@ email(message?: StringLocale['email']): StringSchema<T, C>;

resolve: (value: any) => any;
createError: (params?: { path?: string; message?: string; params?: object }) => ValidationError;
createError: (params?: { path?: string | undefined; message?: string | undefined; params?: object | undefined }) => ValidationError;
}

@@ -459,19 +459,19 @@

*/
strict?: boolean;
strict?: boolean | undefined;
/**
* Return from validation methods on the first error rather than after all validations run. Default - true
*/
abortEarly?: boolean;
abortEarly?: boolean | undefined;
/**
* Remove unspecified keys from objects. Default - false
*/
stripUnknown?: boolean;
stripUnknown?: boolean | undefined;
/**
* When false validations will not descend into nested schema (relevant for objects or arrays). Default - true
*/
recursive?: boolean;
recursive?: boolean | undefined;
/**
* Any context needed for validating schema conditions (see: when())
*/
context?: C;
context?: C | undefined;
}

@@ -490,3 +490,3 @@

*/
name?: string;
name?: string | undefined;

@@ -501,3 +501,3 @@ /**

*/
message?: TestOptionsMessage<P>;
message?: TestOptionsMessage<P> | undefined;

@@ -507,3 +507,3 @@ /**

*/
params?: P;
params?: P | undefined;

@@ -513,7 +513,7 @@ /**

*/
exclusive?: boolean;
exclusive?: boolean | undefined;
}
interface NonExclusiveTestOptions<P extends Record<string, any>, C> extends BaseTestOptions<P, C> {
exclusive?: false;
exclusive?: false | undefined;
}

@@ -549,3 +549,3 @@

extends Pick<SchemaDescription, Exclude<keyof SchemaDescription, 'fields'>> {
innerType?: SchemaFieldDescription;
innerType?: SchemaFieldDescription | undefined;
}

@@ -586,3 +586,3 @@

inner: ValidationError[];
params?: object;
params?: object | undefined;

@@ -634,56 +634,56 @@ static isError(err: any): err is ValidationError;

export interface MixedLocale {
default?: TestOptionsMessage;
required?: TestOptionsMessage;
oneOf?: TestOptionsMessage<{ values: any }>;
notOneOf?: TestOptionsMessage<{ values: any }>;
notType?: LocaleValue;
defined?: TestOptionsMessage;
default?: TestOptionsMessage | undefined;
required?: TestOptionsMessage | undefined;
oneOf?: TestOptionsMessage<{ values: any }> | undefined;
notOneOf?: TestOptionsMessage<{ values: any }> | undefined;
notType?: LocaleValue | undefined;
defined?: TestOptionsMessage | undefined;
}
export interface StringLocale {
length?: TestOptionsMessage<{ length: number }>;
min?: TestOptionsMessage<{ min: number }>;
max?: TestOptionsMessage<{ max: number }>;
matches?: TestOptionsMessage<{ regex: RegExp }>;
email?: TestOptionsMessage<{ regex: RegExp }>;
url?: TestOptionsMessage<{ regex: RegExp }>;
uuid?: TestOptionsMessage<{ regex: RegExp }>;
trim?: TestOptionsMessage;
lowercase?: TestOptionsMessage;
uppercase?: TestOptionsMessage;
length?: TestOptionsMessage<{ length: number }> | undefined;
min?: TestOptionsMessage<{ min: number }> | undefined;
max?: TestOptionsMessage<{ max: number }> | undefined;
matches?: TestOptionsMessage<{ regex: RegExp }> | undefined;
email?: TestOptionsMessage<{ regex: RegExp }> | undefined;
url?: TestOptionsMessage<{ regex: RegExp }> | undefined;
uuid?: TestOptionsMessage<{ regex: RegExp }> | undefined;
trim?: TestOptionsMessage | undefined;
lowercase?: TestOptionsMessage | undefined;
uppercase?: TestOptionsMessage | undefined;
}
export interface NumberLocale {
min?: TestOptionsMessage<{ min: number }>;
max?: TestOptionsMessage<{ max: number }>;
lessThan?: TestOptionsMessage<{ less: number }>;
moreThan?: TestOptionsMessage<{ more: number }>;
notEqual?: TestOptionsMessage<{ notEqual: number }>;
positive?: TestOptionsMessage<{ more: number }>;
negative?: TestOptionsMessage<{ less: number }>;
integer?: TestOptionsMessage;
min?: TestOptionsMessage<{ min: number }> | undefined;
max?: TestOptionsMessage<{ max: number }> | undefined;
lessThan?: TestOptionsMessage<{ less: number }> | undefined;
moreThan?: TestOptionsMessage<{ more: number }> | undefined;
notEqual?: TestOptionsMessage<{ notEqual: number }> | undefined;
positive?: TestOptionsMessage<{ more: number }> | undefined;
negative?: TestOptionsMessage<{ less: number }> | undefined;
integer?: TestOptionsMessage | undefined;
}
export interface DateLocale {
min?: TestOptionsMessage<{ min: Date | string }>;
max?: TestOptionsMessage<{ max: Date | string }>;
min?: TestOptionsMessage<{ min: Date | string }> | undefined;
max?: TestOptionsMessage<{ max: Date | string }> | undefined;
}
export interface ObjectLocale {
noUnknown?: TestOptionsMessage<{ unknown: string }>;
noUnknown?: TestOptionsMessage<{ unknown: string }> | undefined;
}
export interface ArrayLocale {
min?: TestOptionsMessage<{ min: number }>;
max?: TestOptionsMessage<{ max: number }>;
min?: TestOptionsMessage<{ min: number }> | undefined;
max?: TestOptionsMessage<{ max: number }> | undefined;
}
export interface LocaleObject {
mixed?: MixedLocale;
string?: StringLocale;
number?: NumberLocale;
date?: DateLocale;
boolean?: {};
object?: ObjectLocale;
array?: ArrayLocale;
mixed?: MixedLocale | undefined;
string?: StringLocale | undefined;
number?: NumberLocale | undefined;
date?: DateLocale | undefined;
boolean?: {} | undefined;
object?: ObjectLocale | undefined;
array?: ArrayLocale | undefined;
}

@@ -690,0 +690,0 @@

{
"name": "@types/yup",
"version": "0.29.11",
"version": "0.29.12",
"description": "TypeScript definitions for yup",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yup",
"license": "MIT",

@@ -92,4 +93,4 @@ "contributors": [

"dependencies": {},
"typesPublisherContentHash": "d2bf15042d2d564e638bedae917e57d92c57a801c40dab6ea74c44da09c4cb68",
"typesPublisherContentHash": "8474997c94adc9b19289b0c0715b5f117e2f0178cb582d121c7173d2783f36d1",
"typeScriptVersion": "3.6"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 16 Dec 2020 15:11:37 GMT
* Last updated: Fri, 02 Jul 2021 16:32:14 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc