mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 20:37:14 +08:00
Merge pull request #7062 from ahto/nconf-allow-more-defaults
allow arbitrary key names when setting defaults
This commit is contained in:
@@ -48,6 +48,8 @@ p = nconf.use(str, opts);
|
||||
p = nconf.defaults();
|
||||
p = nconf.defaults(opts);
|
||||
|
||||
p = nconf.defaults({foo: 'bar'});
|
||||
|
||||
nconf.init();
|
||||
nconf.init(opts);
|
||||
|
||||
|
||||
7
nconf/nconf.d.ts
vendored
7
nconf/nconf.d.ts
vendored
@@ -48,11 +48,12 @@ declare module "nconf" {
|
||||
parse: (str: string) => any;
|
||||
}
|
||||
|
||||
export interface IOptions {
|
||||
type?: string;
|
||||
export interface IOptions {
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
export interface IFileOptions extends IOptions {
|
||||
export interface IFileOptions {
|
||||
type?: string;
|
||||
file?: string;
|
||||
dir?: string;
|
||||
search?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user