Skip to content

Commit

Permalink
feat: add additional functions to Lazy class (#1148)
Browse files Browse the repository at this point in the history
* Add additional functions to Lazy class

* Remove Lazy.isType

May not work due to lack of options argument - see PR #1148.
  • Loading branch information
chasecaleb authored Dec 7, 2020
1 parent a87e35f commit ecad1a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Lazy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ class Lazy<T extends AnySchema, TContext = ContextOf<T>>
describe() {
return null as any;
}

isValid(value: any, options?: ValidateOptions<TContext>) {
return this._resolve(value, options).isValid(value, options);
}
isValidSync(value: any, options?: ValidateOptions<TContext>) {
return this._resolve(value, options).isValidSync(value, options);
}
}

export default Lazy;

0 comments on commit ecad1a3

Please sign in to comment.