(config: PartialConfig)
| 19 | } |
| 20 | |
| 21 | function mergeWithDefaultConfig(config: PartialConfig): ConfigSchema { |
| 22 | const defaultConfig = getDefaultConfig(); |
| 23 | const mergedConfig = {} as ConfigSchema; |
| 24 | for (const key of typedKeys(defaultConfig)) { |
| 25 | const newValue = config[key] ?? (defaultConfig[key] as ConfigValue); |
| 26 | //@ts-expect-error cant be bothered to deal with this |
| 27 | mergedConfig[key] = newValue; |
| 28 | } |
| 29 | return mergedConfig; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * remove all values from the config which are not valid |
no test coverage detected