Skip to content

Commit

Permalink
More cleaning up of Config()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoBrusa committed Dec 16, 2022
1 parent 7448a3b commit f0e2e93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/modular-scripts/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const configResult: null | { config: Partial<Config> } = explorer.search(
* - the value stated in the config file if provided
* - the default value if neither environment variable nor the config file are provided
*/
export function getConfig<T extends keyof ConfigDefs>(key: T): Config[T] {
export function getConfig<T extends keyof Config>(key: T): Config[T] {
const configValue = configResult ? configResult.config[key] : undefined;
return defs[key].override ?? configValue ?? defs[key].default;
}

0 comments on commit f0e2e93

Please sign in to comment.