From 6dd1b35059cd06fff67abd999fd50cb244eedc2f Mon Sep 17 00:00:00 2001 From: yoneal Date: Fri, 10 Mar 2017 14:55:17 +0800 Subject: [PATCH] Convert formats to an interface type (#14920) This will allow plugins like nconf-yaml to use declaration merging to add other file formats --- nconf/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nconf/index.d.ts b/nconf/index.d.ts index 3a9a06edb4..ff72f3e568 100644 --- a/nconf/index.d.ts +++ b/nconf/index.d.ts @@ -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;