yup: Add resolve type to TestContext

This commit is contained in:
Zak Angelle
2018-11-30 12:59:39 -06:00
parent ec2d721961
commit 96d4557ecd
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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;
}
+2
View File
@@ -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;