Files
PBandDev-comfyui-node-organ…/src/utils.ts
T
PBandDev 7afb5b351b feat: ship v2 organizer rewrite (#5)
* Add comfy skill

* feat: squash v2 branch
2026-03-23 16:57:00 -05:00

26 lines
589 B
TypeScript

export interface CanvasItem {
readonly id: number | string;
readonly pos: ArrayLike<number>;
readonly size?: ArrayLike<number>;
readonly title?: string;
readonly type?: string | null;
readonly constructor?: { readonly name?: string };
selected?: boolean;
}
export interface GroupItem extends CanvasItem {
readonly title: string;
}
export function isGroup(item: CanvasItem): item is GroupItem {
if (typeof item.title !== "string") {
return false;
}
if (item.constructor?.name === "LGraphGroup") {
return true;
}
return typeof item.type !== "string";
}