From d260933384888f872db4b8be5abe7868b7f96489 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 21 Sep 2022 15:56:34 -0400 Subject: [PATCH] *Update LoadOptions --- src/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index d0c7472..0a1828d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,11 +20,11 @@ export interface Options { } export interface LoadOptions { - hash?: string; - query?: string; - env?: object; - argv?: string[]; - config?: string; + hash?: string | boolean; + query?: string | boolean; + env?: object | boolean; + argv?: string[] | boolean; + config?: string | boolean; } /** @@ -99,19 +99,19 @@ export default class Config { public load(options: LoadOptions) { if (options.hash) { - this.parseHash(options.hash); + this.parseHash(options.hash as string); } if (options.query) { - this.parseQuery(options.query); + this.parseQuery(options.query as string); } if (options.env) { - this.parseEnv(options.env); + this.parseEnv(options.env as object); } if (options.argv) { - this.parseArg(options.argv); + this.parseArg(options.argv as string[]); } this.prefix = this.getPrefix();