@types/yup
Advanced tools
Comparing version 0.24.3 to 0.24.4
// Type definitions for yup 0.24 | ||
// Project: https://github.com/jquense/yup | ||
// Definitions by: Dominik Hardtke <https://github.com/dhardtke>, Vladyslav Tserman <https://github.com/vtserman>, Moreton Bay Regional Council <https://github.com/MoretonBayRC> | ||
// Definitions by: Dominik Hardtke <https://github.com/dhardtke>, | ||
// Vladyslav Tserman <https://github.com/vtserman>, | ||
// Moreton Bay Regional Council <https://github.com/MoretonBayRC>, | ||
// Sindre Seppola <https://github.com/sseppola> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -37,4 +40,4 @@ // TypeScript Version: 2.2 | ||
concat(schema: this): this; | ||
validate(value: T, options?: ValidateOptions): Promise<ValidationError|T>; | ||
validateSync(value: T, options?: ValidateOptions): ValidationError|T; | ||
validate(value: T, options?: ValidateOptions): Promise<ValidationError | T>; | ||
validateSync(value: T, options?: ValidateOptions): ValidationError | T; | ||
isValid(value: T, options?: any): Promise<boolean>; | ||
@@ -61,4 +64,4 @@ isValidSync(value: T, options?: any): boolean; | ||
export interface MixedSchemaConstructor { | ||
(): MixedSchema; | ||
new(options?: { type?: string, [key: string]: any }): MixedSchema; | ||
(): MixedSchema; | ||
new(options?: { type?: string, [key: string]: any }): MixedSchema; | ||
} | ||
@@ -78,3 +81,3 @@ | ||
max(limit: number | Ref, message?: string): StringSchema; | ||
matches(regex: RegExp, message?: string): StringSchema; | ||
matches(regex: RegExp, messageOrOptions?: string | { message?: string; excludeEmptyString?: boolean }): StringSchema; | ||
email(message?: string): StringSchema; | ||
@@ -139,3 +142,3 @@ url(message?: string): StringSchema; | ||
<T>(fields?: { [field in keyof T]: Schema<T[field]> }): ObjectSchema<T>; | ||
new (): ObjectSchema<{}>; | ||
new(): ObjectSchema<{}>; | ||
} | ||
@@ -162,4 +165,4 @@ | ||
export type WhenOptions<T> = WhenOptionsBuilder<T> | ||
| { is: boolean | ((value: any) => boolean), then: any, otherwise: any } | ||
| object; | ||
| { is: boolean | ((value: any) => boolean), then: any, otherwise: any } | ||
| object; | ||
@@ -253,10 +256,10 @@ export interface ValidateOptions { | ||
export interface LocaleObject { | ||
mixed?: { [key in keyof MixedSchema]?: string }; | ||
string?: { [key in keyof StringSchema]?: string }; | ||
number?: { [key in keyof NumberSchema]?: string }; | ||
boolean?: { [key in keyof BooleanSchema]?: string }; | ||
bool?: { [key in keyof BooleanSchema]?: string }; | ||
date?: { [key in keyof DateSchema]?: string }; | ||
array?: { [key in keyof ArraySchema<any>]?: string }; | ||
object?: { [key in keyof ObjectSchema<any>]?: string }; | ||
mixed?: { [key in keyof MixedSchema]?: string }; | ||
string?: { [key in keyof StringSchema]?: string }; | ||
number?: { [key in keyof NumberSchema]?: string }; | ||
boolean?: { [key in keyof BooleanSchema]?: string }; | ||
bool?: { [key in keyof BooleanSchema]?: string }; | ||
date?: { [key in keyof DateSchema]?: string }; | ||
array?: { [key in keyof ArraySchema<any>]?: string }; | ||
object?: { [key in keyof ObjectSchema<any>]?: string }; | ||
} |
@@ -0,0 +0,0 @@ import { |
{ | ||
"name": "@types/yup", | ||
"version": "0.24.3", | ||
"version": "0.24.4", | ||
"description": "TypeScript definitions for yup", | ||
@@ -21,2 +21,7 @@ "license": "MIT", | ||
"githubUsername": "MoretonBayRC" | ||
}, | ||
{ | ||
"name": "Sindre Seppola", | ||
"url": "https://github.com/sseppola", | ||
"githubUsername": "sseppola" | ||
} | ||
@@ -27,8 +32,8 @@ ], | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "934434d6e8d45b0fb0721ece3dc1e8d0ea9a3fb83122c42ceeb5bde6d07e5e10", | ||
"typesPublisherContentHash": "c48e6af48d353f766a5278cc252373154c0eae6904ef8b19208ee7e16dfdfe15", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yup | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/yup | ||
Additional Details | ||
* Last updated: Tue, 03 Apr 2018 20:57:59 GMT | ||
* Last updated: Thu, 10 May 2018 20:18:20 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Dominik Hardtke <https://github.com/dhardtke>, Vladyslav Tserman <https://github.com/vtserman>, Moreton Bay Regional Council <https://github.com/MoretonBayRC>. | ||
These definitions were written by Dominik Hardtke <https://github.com/dhardtke>, Vladyslav Tserman <https://github.com/vtserman>, Moreton Bay Regional Council <https://github.com/MoretonBayRC>, Sindre Seppola <https://github.com/sseppola>. |
Sorry, the diff of this file is not supported yet
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
11712
230