mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-24 22:17:06 +08:00
Added missing nconf.required(keys) and Provider.required(keys) methods.
This commit is contained in:
@@ -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);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
2
nconf/nconf.d.ts
vendored
2
nconf/nconf.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user