diff --git a/src/env/env.manager.ts b/src/env/env.manager.ts index 1a1940e..d82e112 100644 --- a/src/env/env.manager.ts +++ b/src/env/env.manager.ts @@ -47,14 +47,14 @@ export class EnvManager ext return this.cache.get(key) as EnvPicker; } - public pickOrThrow(key: K): EnvPicker { + public pickOrThrow(key: K): EnvPicker> { const value = this.source[key]; if (value === null || value === undefined || value.trim() === '') { throw new Error(`key: ${key.toString()} is empty`); } - return this.pick(key) as EnvPicker; + return this.pick(key) as EnvPicker>; } public pickFor(envRecord: AtLeastOne>): EnvPicker { @@ -67,7 +67,7 @@ export class EnvManager ext return this.pick(key) as EnvPicker; } - public pickForOrThrow(envRecord: AtLeastOne>): EnvPicker { + public pickForOrThrow(envRecord: AtLeastOne>): EnvPicker> { const key = this.getKeyOrThrow(envRecord); return this.pickOrThrow(key as K);