chore: Let the config use the withValue as an alias

This commit is contained in:
BluJ
2023-02-13 12:48:27 -07:00
parent f245700be5
commit 8b15a7c17d

View File

@@ -21,6 +21,12 @@ export class Config<A extends ConfigSpec> extends IBuilder<A> {
}
return new Config(answer);
}
withValue<K extends string, B extends ValueSpecAny>(key: K, value: Value<B>) {
return new Config({
...this.a,
[key]: value.build(),
} as A & { [key in K]: B });
}
addValue<K extends string, B extends ValueSpecAny>(key: K, value: Value<B>) {
return new Config({
...this.a,