From 33f3569c9528e917b5fbc24922c4b17eac251f58 Mon Sep 17 00:00:00 2001 From: David Stangl Date: Tue, 16 Feb 2016 08:26:53 +0100 Subject: [PATCH] Fix nconf method unavailable while chaining --- nconf/nconf-tests.ts | 1 + nconf/nconf.d.ts | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nconf/nconf-tests.ts b/nconf/nconf-tests.ts index 3bd043b18c..dd33514c23 100644 --- a/nconf/nconf-tests.ts +++ b/nconf/nconf-tests.ts @@ -97,6 +97,7 @@ p = p.argv(opts); p = p.env(); p = p.env(opts); p = p.file(str); +p = p.file(str, str); p = p.file(str, fopts); p = p.file(fopts); p = p.file({ diff --git a/nconf/nconf.d.ts b/nconf/nconf.d.ts index 7ea86ce242..cca3efdb13 100644 --- a/nconf/nconf.d.ts +++ b/nconf/nconf.d.ts @@ -25,7 +25,7 @@ declare module "nconf" { export function argv(options?: IOptions): Provider; export function env(options?: IOptions): Provider; export function file(name: string, options?: IFileOptions): Provider; - export function file(key: string, name: string): Provider; + export function file(name: string, filename: string): Provider; export function file(options: IFileOptions): Provider; export function use(name: string, options?: IOptions): Provider; export function defaults(options?: IOptions): Provider; @@ -49,8 +49,8 @@ declare module "nconf" { parse: (str: string) => any; } - export interface IOptions { - [index: string]: any; + export interface IOptions { + [index: string]: any; } export interface IFileOptions { @@ -87,6 +87,7 @@ declare module "nconf" { argv(options?: IOptions): Provider; env(options?: IOptions): Provider; file(name: string, options?: IFileOptions): Provider; + file(name: string, filename: string): Provider; file(options: IFileOptions): Provider; use(name: string, options?: IOptions): Provider;