Merge pull request #8114 from Felerius/nconf-enhancements

Fix nconf method unavailable while chaining
This commit is contained in:
Horiuchi_H
2016-02-18 18:03:21 +09:00
2 changed files with 5 additions and 3 deletions

View File

@@ -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({

7
nconf/nconf.d.ts vendored
View File

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