Skip to content

Commit

Permalink
fix: add originalValue to TestContext type (#1527)
Browse files Browse the repository at this point in the history
This is listed as a valid property on `testContext` [per the docs](https://github.com/jquense/yup#mixedtestname-string-message-string--function-test-function-schema), and also exists on [the community types for yup](https://github.com/abnersajr/DefinitelyTyped/blob/a186d99d0c3a92424691a82130374a1b9145c7cd/types/yup/index.d.ts#L446), but it is missing in the official types.
  • Loading branch information
Moeface authored Dec 28, 2021
1 parent 037ae07 commit fcc5ae7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util/createValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type CreateErrorOptions = {
export type TestContext<TContext = {}> = {
path: string;
options: ValidateOptions<TContext>;
originalValue: any;
parent: any;
schema: any; // TODO: Schema<any>;
resolve: <T>(value: T | Reference<T>) => T;
Expand Down

0 comments on commit fcc5ae7

Please sign in to comment.