From 3bdd1575b5241d6e96babb62f2f49fe88177af87 Mon Sep 17 00:00:00 2001 From: BluJ Date: Fri, 15 Jul 2022 10:51:08 -0600 Subject: [PATCH] chore: Forgot about nullable types and defaults --- types.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types.ts b/types.ts index 76c625c..17f690b 100644 --- a/types.ts +++ b/types.ts @@ -139,6 +139,10 @@ export type ConfigSpec = { export type WithDefault = T & { default: Default; }; +export type WithNullableDefault = T & { + default?: Default; +}; + export type WithDescription = T & { description?: string; @@ -209,11 +213,11 @@ export type ValueSpecAny = | Tag<"boolean", WithDescription>> | Tag< "string", - WithDescription, DefaultString>> + WithDescription, DefaultString>> > | Tag< "number", - WithDescription, number>> + WithDescription, number>> > | Tag< "enum",