diff --git a/src/ui/src/builder/useComponentActions.ts b/src/ui/src/builder/useComponentActions.ts index 3ad969607..8f87e2044 100644 --- a/src/ui/src/builder/useComponentActions.ts +++ b/src/ui/src/builder/useComponentActions.ts @@ -127,7 +127,12 @@ export function useComponentActions(wf: Core, ssbm: BuilderManager) { type: string, parentId: Component["id"], position?: number, - initProperties?: Partial>, + initProperties?: Partial< + Omit< + Component, + "id" | "type" | "parent" | "content" | "handlers" | "position" + > + >, ) { const newId = generateNewComponentId(); const definition = wf.getComponentDefinition(type); @@ -162,7 +167,12 @@ export function useComponentActions(wf: Core, ssbm: BuilderManager) { type: string, parentId: Component["id"], position?: number, - initProperties?: Partial, + initProperties?: Partial< + Omit< + Component, + "id" | "type" | "parent" | "content" | "handlers" | "position" + > + >, ): Component["id"] { const component = createComponent( type,