Convert formats to an interface type (#14920)

This will allow plugins like nconf-yaml to use declaration merging to add other file formats
This commit is contained in:
yoneal 2017-03-10 14:55:17 +08:00 committed by Mohamed Hegazy
parent 7349795a80
commit 6dd1b35059

5
nconf/index.d.ts vendored
View File

@ -40,10 +40,11 @@ export declare function path(key: any): any[];
export declare function loadFiles(files: any, callback?: ICallbackFunction): void;
export declare function loadFilesSync(files: any, callback?: ICallbackFunction): void;
export declare var formats: {
export interface IFormats {
json: IFormat;
ini: IFormat;
};
}
export declare var formats: IFormats;
export interface IFormat {
stringify: (obj: any, replacer: any, spacing?: any) => string;