Merge pull request #7062 from ahto/nconf-allow-more-defaults

allow arbitrary key names when setting defaults
This commit is contained in:
Masahiro Wakame
2015-12-10 21:26:13 +09:00
2 changed files with 6 additions and 3 deletions

View File

@@ -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
View File

@@ -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;