mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 20:24:47 +00:00
chore: Forgot about nullable types and defaults
This commit is contained in:
8
types.ts
8
types.ts
@@ -139,6 +139,10 @@ export type ConfigSpec = {
|
|||||||
export type WithDefault<T, Default> = T & {
|
export type WithDefault<T, Default> = T & {
|
||||||
default: Default;
|
default: Default;
|
||||||
};
|
};
|
||||||
|
export type WithNullableDefault<T, Default> = T & {
|
||||||
|
default?: Default;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export type WithDescription<T> = T & {
|
export type WithDescription<T> = T & {
|
||||||
description?: string;
|
description?: string;
|
||||||
@@ -209,11 +213,11 @@ export type ValueSpecAny =
|
|||||||
| Tag<"boolean", WithDescription<WithDefault<ValueSpecBoolean, boolean>>>
|
| Tag<"boolean", WithDescription<WithDefault<ValueSpecBoolean, boolean>>>
|
||||||
| Tag<
|
| Tag<
|
||||||
"string",
|
"string",
|
||||||
WithDescription<WithDefault<WithNullable<ValueSpecString>, DefaultString>>
|
WithDescription<WithNullableDefault<WithNullable<ValueSpecString>, DefaultString>>
|
||||||
>
|
>
|
||||||
| Tag<
|
| Tag<
|
||||||
"number",
|
"number",
|
||||||
WithDescription<WithDefault<WithNullable<ValueSpecNumber>, number>>
|
WithDescription<WithNullableDefault<WithNullable<ValueSpecNumber>, number>>
|
||||||
>
|
>
|
||||||
| Tag<
|
| Tag<
|
||||||
"enum",
|
"enum",
|
||||||
|
|||||||
Reference in New Issue
Block a user