Allowing get calls without key

nconf allows you to call `get` without a key, to return the entire configuration object. This changes the `get` exports to allow the key to be optional.
This commit is contained in:
Dustin Barnes
2017-12-11 15:48:19 -08:00
committed by GitHub
parent 7cf51b8d3a
commit cbfb1ff40f
+2 -2
View File
@@ -11,7 +11,7 @@ export declare var stores: any;
export declare var sources: any[];
export declare function clear(key: string, callback?: ICallbackFunction): any;
export function get(key: string, callback?: ICallbackFunction): any;
export function get(key?: string, callback?: ICallbackFunction): any;
export declare function merge(key: string, value: any, callback?: ICallbackFunction): any;
export declare function set(key: string, value: any, callback?: ICallbackFunction): any;
export declare function reset(callback?: ICallbackFunction): any;
@@ -75,7 +75,7 @@ export declare class Provider {
sources: any[];
clear(key: string, callback?: ICallbackFunction): any;
get(key: string, callback?: ICallbackFunction): any;
get(key?: string, callback?: ICallbackFunction): any;
merge(key: string, value: any, callback?: ICallbackFunction): any;
set(key: string, value: any, callback?: ICallbackFunction): any;
reset(callback?: ICallbackFunction): any;