diff --git a/nconf/nconf-tests.ts b/nconf/nconf-tests.ts index dd33514c23..db105dfefe 100644 --- a/nconf/nconf-tests.ts +++ b/nconf/nconf-tests.ts @@ -57,6 +57,7 @@ nconf.init(opts); p = nconf.overrides(); p = nconf.overrides(opts); nconf.remove(str); +bool = nconf.required(strArr); store = nconf.create(str, opts); str = nconf.key(value, value); @@ -118,6 +119,7 @@ p = p.defaults(opts); p.init(opts); p = p.overrides(opts); p.remove(str); +bool = p.required(strArr); store = p.create(str, opts); // - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nconf/nconf.d.ts b/nconf/nconf.d.ts index 005d129199..6a42dc0100 100644 --- a/nconf/nconf.d.ts +++ b/nconf/nconf.d.ts @@ -32,6 +32,7 @@ declare module "nconf" { export function init(options?: IOptions): void; export function overrides(options?: IOptions): Provider; export function remove(name: string): void; + export function required(keys: string[]): boolean; export function create(name: string, options: IOptions): IStore; export function key(...values: any[]): string; @@ -95,6 +96,7 @@ declare module "nconf" { init(options?: IOptions): void; overrides(options?: IOptions): Provider; remove(name: string): void; + required(keys: string[]): boolean; create(name: string, options: IOptions): IStore; }