From cbfb1ff40fd9100002437a512553d7c9630b6eae Mon Sep 17 00:00:00 2001 From: Dustin Barnes Date: Mon, 11 Dec 2017 15:48:19 -0800 Subject: [PATCH] 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. --- types/nconf/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/nconf/index.d.ts b/types/nconf/index.d.ts index f03eb88b39..71a0d497ab 100644 --- a/types/nconf/index.d.ts +++ b/types/nconf/index.d.ts @@ -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;