From 0ee97f610d625b47f56be7a491f97612f543757f Mon Sep 17 00:00:00 2001 From: BluJ Date: Wed, 3 May 2023 13:42:20 -0600 Subject: [PATCH] chore: Fix the required --- lib/config/builder/value.ts | 4 ++-- lib/config/constants.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/config/builder/value.ts b/lib/config/builder/value.ts index 6d725de..7994781 100644 --- a/lib/config/builder/value.ts +++ b/lib/config/builder/value.ts @@ -640,7 +640,7 @@ export class Value { }, aVariants: Variants | Variants, ) => { - return new Value( + return new Value, WrapperData>( async (options) => ({ type: "union" as const, description: null, @@ -651,7 +651,7 @@ export class Value { disabled: (await getDisabledFn(options)) || [], immutable: false, }), - aVariants.validator.optional(), + asRequiredParser(aVariants.validator, a), ) } } diff --git a/lib/config/constants.ts b/lib/config/constants.ts index b2e4002..c098b12 100644 --- a/lib/config/constants.ts +++ b/lib/config/constants.ts @@ -59,3 +59,4 @@ export const smtpConfig = Value.filteredUnion(async ({ effects, utils }) => { }, }), ) +type test = typeof smtpConfig.validator._TYPE