push
github
1320 of 1468 branches covered (89.92%)
Branch coverage included in aggregate %.
104 of 2237 new or added lines in 31 files covered. (4.65%)
5289 of 8941 relevant lines covered (59.15%)
31.8 hits per line
NEW
|
export abstract class ConfigBase<C extends Record<string, any>> { |
× |
NEW
|
protected value: Required<C>;
|
× |
NEW
|
|
× |
NEW
|
protected defaultConfig() {
|
× |
NEW
|
return {} as Required<C>;
|
× |
NEW
|
} |
× |
NEW
|
|
× |
NEW
|
constructor() { |
× |
NEW
|
this.value = this.defaultConfig(); |
× |
NEW
|
} |
× |
NEW
|
|
× |
NEW
|
public mergeConfig = (userCfg: C): Required<C> => {
|
× |
NEW
|
this.value = {
|
× |
|
/* c8 ignore next */
|
2✔ |
|
...this.defaultConfig(),
|
2✔ |
NEW
|
...userCfg, |
× |
NEW
|
}; |
× |
NEW
|
return this.value; |
× |
NEW
|
}; |
× |
NEW
|
|
× |
NEW
|
get() { |
× |
NEW
|
return this.value; |
× |
NEW
|
} |
× |
NEW
|
} |
× |