From 5033df197c7c29db73cb7faa658a09a694f77e53 Mon Sep 17 00:00:00 2001 From: BluJ Date: Fri, 12 May 2023 14:37:38 -0600 Subject: [PATCH] chore: quick fix on the config --- lib/config/builder/config.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/config/builder/config.ts b/lib/config/builder/config.ts index e9cd9fd..0f5c46e 100644 --- a/lib/config/builder/config.ts +++ b/lib/config/builder/config.ts @@ -83,7 +83,11 @@ export const addNodesSpec = Config.of({ hostname: hostname, port: port }); ``` */ -export class Config, Store, Vault> { +export class Config< + Type extends Record, + Store = never, + Vault = never, +> { private constructor( private readonly spec: { [K in keyof Type]: @@ -107,8 +111,8 @@ export class Config, Store, Vault> { string, Value | Value >, - Store, - Vault, + Store = never, + Vault = never, >(spec: Spec) { const validatorObj = {} as { [K in keyof Spec]: Parser