chnage nullable to required

This commit is contained in:
Matt Hill
2023-03-30 12:02:39 -06:00
parent ae22958556
commit 0aab08585d

View File

@@ -38,25 +38,25 @@ export type ValueSpecOf<T extends ValueType> = T extends "string"
export interface ValueSpecString extends ListValueSpecString, WithStandalone { export interface ValueSpecString extends ListValueSpecString, WithStandalone {
type: "string"; type: "string";
required: boolean;
default: DefaultString | null; default: DefaultString | null;
nullable: boolean;
} }
export interface ValueSpecTextarea extends WithStandalone { export interface ValueSpecTextarea extends WithStandalone {
type: "textarea"; type: "textarea";
placeholder: string | null; placeholder: string | null;
nullable: boolean; required: boolean;
} }
export interface ValueSpecNumber extends ListValueSpecNumber, WithStandalone { export interface ValueSpecNumber extends ListValueSpecNumber, WithStandalone {
type: "number"; type: "number";
nullable: boolean; required: boolean;
default: number | null; default: number | null;
} }
export interface ValueSpecSelect extends SelectBase, WithStandalone { export interface ValueSpecSelect extends SelectBase, WithStandalone {
type: "select"; type: "select";
nullable: boolean; required: boolean;
default: string | null; default: string | null;
} }
@@ -74,15 +74,15 @@ export interface ValueSpecBoolean extends WithStandalone {
export interface ValueSpecUnion extends WithStandalone { export interface ValueSpecUnion extends WithStandalone {
type: "union"; type: "union";
nullable: boolean;
default: string | null;
variants: Record<string, { name: string; spec: InputSpec }>; variants: Record<string, { name: string; spec: InputSpec }>;
required: boolean;
default: string | null;
} }
export interface ValueSpecFile extends WithStandalone { export interface ValueSpecFile extends WithStandalone {
type: "file"; type: "file";
nullable: boolean;
extensions: string[]; extensions: string[];
required: boolean;
} }
export interface ValueSpecObject extends WithStandalone { export interface ValueSpecObject extends WithStandalone {
@@ -141,8 +141,8 @@ export function isValueSpecListOf<S extends ListValueSpecType>(
export interface ListValueSpecString { export interface ListValueSpecString {
pattern: string | null; pattern: string | null;
patternDescription: string | null; patternDescription: string | null;
masked: boolean; masked: boolean; // default = false
inputmode: 'text' | 'email' | 'tel' | 'url' inputmode: 'text' | 'email' | 'tel' | 'url' // default = 'text'
placeholder: string | null; placeholder: string | null;
} }