From dc4cde25114bd8ce2ecc19654fd26caf8a5b014e Mon Sep 17 00:00:00 2001 From: Caleb Chase Date: Fri, 4 Dec 2020 15:48:29 -0600 Subject: [PATCH 1/2] Add additional functions to Lazy class --- src/Lazy.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Lazy.ts b/src/Lazy.ts index 8aaad37ae..d44ed7656 100644 --- a/src/Lazy.ts +++ b/src/Lazy.ts @@ -82,6 +82,16 @@ class Lazy> describe() { return null as any; } + + isValid(value: any, options?: ValidateOptions) { + return this._resolve(value, options).isValid(value, options); + } + isValidSync(value: any, options?: ValidateOptions) { + return this._resolve(value, options).isValidSync(value, options); + } + isType(value: any) { + return this._resolve(value).isType(value); + } } export default Lazy; From f0da81d80a4f41124ff4342e9cf56b5611922fc7 Mon Sep 17 00:00:00 2001 From: Caleb Chase Date: Mon, 7 Dec 2020 09:33:03 -0600 Subject: [PATCH 2/2] Remove Lazy.isType May not work due to lack of options argument - see PR #1148. --- src/Lazy.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Lazy.ts b/src/Lazy.ts index d44ed7656..f49cb741f 100644 --- a/src/Lazy.ts +++ b/src/Lazy.ts @@ -89,9 +89,6 @@ class Lazy> isValidSync(value: any, options?: ValidateOptions) { return this._resolve(value, options).isValidSync(value, options); } - isType(value: any) { - return this._resolve(value).isType(value); - } } export default Lazy;