diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/util.ts b/invokeai/frontend/web/src/features/controlLayers/konva/util.ts index adc8504bf1..003448929c 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/util.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/util.ts @@ -1,4 +1,4 @@ -import type { Coordinate, Rect } from 'features/controlLayers/store/types'; +import type { CanvasEntityIdentifier, Coordinate, Rect } from 'features/controlLayers/store/types'; import type Konva from 'konva'; import type { KonvaEventObject } from 'konva/lib/Node'; import type { Vector2d } from 'konva/lib/types'; @@ -335,7 +335,7 @@ export function loadImage(src: string): Promise { */ export const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 10); -export function getPrefixedId(prefix: string): string { +export function getPrefixedId(prefix: CanvasEntityIdentifier['type'] | (string & Record)): string { return `${prefix}:${nanoid()}`; }