diff --git a/client/src/api/configTemplates.ts b/client/src/api/configTemplates.ts index 51b21382c505..16c4369c4589 100644 --- a/client/src/api/configTemplates.ts +++ b/client/src/api/configTemplates.ts @@ -10,7 +10,7 @@ export type TemplateVariable = | components["schemas"]["TemplateVariablePathComponent"] | components["schemas"]["TemplateVariableBoolean"]; export type TemplateSecret = components["schemas"]["TemplateSecret"]; -export type VariableValueType = (string | boolean | number) | undefined; +export type VariableValueType = string | boolean | number; export type VariableData = { [key: string]: VariableValueType }; export type SecretData = { [key: string]: string }; diff --git a/client/src/components/ConfigTemplates/formUtil.ts b/client/src/components/ConfigTemplates/formUtil.ts index e211cb301729..2fa06a8abb2a 100644 --- a/client/src/components/ConfigTemplates/formUtil.ts +++ b/client/src/components/ConfigTemplates/formUtil.ts @@ -39,7 +39,7 @@ export function metadataFormEntryDescription(what: string): FormEntry { }; } -export function templateVariableFormEntry(variable: TemplateVariable, variableValue: VariableValueType): FormEntry { +export function templateVariableFormEntry(variable: TemplateVariable, variableValue?: VariableValueType): FormEntry { const common_fields = { name: variable.name, label: variable.label ?? variable.name, @@ -166,7 +166,7 @@ export function createFormDataToPayload(template: TemplateSummary, formData: any return payload; } -export function formDataTypedGet(variableDefinition: TemplateVariable, formData: any): VariableValueType { +export function formDataTypedGet(variableDefinition: TemplateVariable, formData: any): VariableValueType | undefined { // galaxy form library doesn't type values traditionally, so add a typed // access to the data if coming back as string. Though it does seem to be // typed properly - this might not be needed anymore?