mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
yup: Add resolve type to TestContext
This commit is contained in:
Vendored
+1
@@ -206,6 +206,7 @@ export interface TestContext {
|
||||
options: ValidateOptions;
|
||||
parent: any;
|
||||
schema: Schema<any>;
|
||||
resolve: (value: any) => any;
|
||||
createError: (params: { path: string; message: string }) => ValidationError;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,6 +174,8 @@ const testContext = function(this: TestContext) {
|
||||
this.parent;
|
||||
// $ExpectType Schema<any>
|
||||
this.schema;
|
||||
// $ExpectType (value: any) => any
|
||||
this.resolve;
|
||||
// $ExpectType ValidationError
|
||||
this.createError({ path: "1", message: "1" });
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user