diff --git a/nconf/nconf-tests.ts b/nconf/nconf-tests.ts index 7037abfb6..673c05dca 100644 --- a/nconf/nconf-tests.ts +++ b/nconf/nconf-tests.ts @@ -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); diff --git a/nconf/nconf.d.ts b/nconf/nconf.d.ts index ee59591fd..8453bfca8 100644 --- a/nconf/nconf.d.ts +++ b/nconf/nconf.d.ts @@ -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;