mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
chore: Let the config use the withValue as an alias
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user