allow arbitrary key names when setting defaults

This commit is contained in:
Ahto Jussila
2015-12-05 17:55:44 +02:00
parent e5a27ea95e
commit f913f681ac
2 changed files with 6 additions and 3 deletions
+2
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);
+4 -3
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;