From 5aaf2e8873402f33306767b01ffc33c600e7be12 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:16:37 +1100 Subject: [PATCH] fix(ui): fix typing of FIELD_VALUE_FALLBACK_MAP --- .../util/schema/buildFieldInputInstance.ts | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/invokeai/frontend/web/src/features/nodes/util/schema/buildFieldInputInstance.ts b/invokeai/frontend/web/src/features/nodes/util/schema/buildFieldInputInstance.ts index 2e06652d4b..c783d00706 100644 --- a/invokeai/frontend/web/src/features/nodes/util/schema/buildFieldInputInstance.ts +++ b/invokeai/frontend/web/src/features/nodes/util/schema/buildFieldInputInstance.ts @@ -1,28 +1,31 @@ import { get } from 'lodash-es'; -import { FieldInputInstance, FieldInputTemplate } from '../../types/field'; +import { + FieldInputInstance, + FieldInputTemplate, + FieldValue, + StatefulFieldType, +} from '../../types/field'; -const FIELD_VALUE_FALLBACK_MAP = { - EnumField: '', - BoardField: undefined, - BooleanField: false, - ClipField: undefined, - ColorField: { r: 0, g: 0, b: 0, a: 1 }, - FloatField: 0, - ImageField: undefined, - IntegerField: 0, - IPAdapterModelField: undefined, - LoRAModelField: undefined, - MainModelField: undefined, - ONNXModelField: undefined, - SchedulerField: 'euler', - SDXLMainModelField: undefined, - SDXLRefinerModelField: undefined, - StringField: '', - T2IAdapterModelField: undefined, - T2IAdapterPolymorphic: undefined, - VAEModelField: undefined, - ControlNetModelField: undefined, -}; +const FIELD_VALUE_FALLBACK_MAP: Record = + { + EnumField: '', + BoardField: undefined, + BooleanField: false, + ColorField: { r: 0, g: 0, b: 0, a: 1 }, + FloatField: 0, + ImageField: undefined, + IntegerField: 0, + IPAdapterModelField: undefined, + LoRAModelField: undefined, + MainModelField: undefined, + SchedulerField: 'euler', + SDXLMainModelField: undefined, + SDXLRefinerModelField: undefined, + StringField: '', + T2IAdapterModelField: undefined, + VAEModelField: undefined, + ControlNetModelField: undefined, + }; export const buildFieldInputInstance = ( id: string,