@types/yup
Advanced tools
Comparing version 0.24.6 to 0.24.7
@@ -57,3 +57,3 @@ // Type definitions for yup 0.24 | ||
when(keys: string | any[], builder: WhenOptions<this>): this; | ||
test(name: string, message: string, test: (value?: any) => boolean | Promise<boolean>, callbackStyleAsync?: boolean): this; | ||
test(name: string, message: string, test: (this: TestContext, value?: any) => boolean | Promise<boolean>, callbackStyleAsync?: boolean): this; | ||
test(options: TestOptions): this; | ||
@@ -165,2 +165,10 @@ transform(fn: TransformFunction<this>): this; | ||
export interface TestContext { | ||
path: string; | ||
options: ValidateOptions; | ||
parent: any; | ||
schema: Schema<any>; | ||
createError: (params: { path: string, message: string }) => ValidationError; | ||
} | ||
export interface ValidateOptions { | ||
@@ -198,3 +206,3 @@ /** | ||
*/ | ||
test: (value: any) => boolean | Promise<boolean>; | ||
test: (this: TestContext, value: any) => boolean | Promise<boolean>; | ||
@@ -201,0 +209,0 @@ /** |
{ | ||
"name": "@types/yup", | ||
"version": "0.24.6", | ||
"version": "0.24.7", | ||
"description": "TypeScript definitions for yup", | ||
@@ -35,4 +35,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "6d4703be906f6bea70ab63e129576d8c3309fbc91c4b0dd52eb5cfbc6ad461e5", | ||
"typesPublisherContentHash": "5f1895f30bef16b7c1ca398a767ac2bf03f3a51384bab8460e089e4c24262b91", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 05 Jun 2018 00:03:07 GMT | ||
* Last updated: Wed, 20 Jun 2018 00:10:19 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
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
11912
237