From 8b15a7c17dd961840e56a23e6798a794fc6f1d29 Mon Sep 17 00:00:00 2001 From: BluJ Date: Mon, 13 Feb 2023 12:48:27 -0700 Subject: [PATCH] chore: Let the config use the withValue as an alias --- config/config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/config.ts b/config/config.ts index bdfccd5..242dd3a 100644 --- a/config/config.ts +++ b/config/config.ts @@ -21,6 +21,12 @@ export class Config extends IBuilder { } return new Config(answer); } + withValue(key: K, value: Value) { + return new Config({ + ...this.a, + [key]: value.build(), + } as A & { [key in K]: B }); + } addValue(key: K, value: Value) { return new Config({ ...this.a,