From 894084db5b9b6cc585bac38aa6d1b049ba4e76ce Mon Sep 17 00:00:00 2001 From: BluJ Date: Mon, 13 Feb 2023 10:10:28 -0700 Subject: [PATCH] chore: Add a with value --- config/config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/config.ts b/config/config.ts index ae89c38..6b0a060 100644 --- a/config/config.ts +++ b/config/config.ts @@ -5,6 +5,11 @@ export class Config extends IBuilder { static empty() { return new Config({}); } + static withValue(key: K, value: Value) { + return new Config({ + [key]: value.build(), + } as { [key in K]: B }); + } static of }>(spec: B) { // deno-lint-ignore no-explicit-any