Skip to content

Commit ecfcea9

Browse files
authored
fix: Correct TS for IEnvAwareBuilder.addEnvironment() (#65)
Fixes addEnvironment() is incorrectly typed #64.
1 parent 174c789 commit ecfcea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wj-config.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export interface IEnvAwareBuilder<TEnvironments extends string, T extends Record
292292
* prefix is always removed after processing. To avoid exposing non-application data as configuration, a prefix
293293
* is always used. If none is specified, the default prefix is OPT_.
294294
*/
295-
addEnvironment<TDic extends Record<string, ConfigurationValue>, TPrefix extends string = 'OPT_'>(env: Record<string, ConfigurationValue> | (() => Promise<Record<string, ConfigurationValue>>), prefix?: string): IEnvAwareBuilder<TEnvironments, MergeResult<T, InflateDictionary<TDic, '__', TPrefix>>>;
295+
addEnvironment<TDic extends Record<string, ConfigurationValue>, TPrefix extends string = 'OPT_'>(env: TDic | (() => Promise<TDic>), prefix?: TPrefix): IEnvAwareBuilder<TEnvironments, MergeResult<T, InflateDictionary<TDic, '__', TPrefix>>>;
296296
/**
297297
* Adds a fetch operation to the collection of data sources that will be used to build the configuration object.
298298
* @param url URL to fetch.

0 commit comments

Comments
 (0)