Files
ComfyUI_frontend/src/typeGuards.ts
2025-02-23 13:06:03 -05:00

9 lines
283 B
TypeScript

import { IColorable } from "@/interfaces"
/**
* Checks if an object is an instance of {@link IColorable}.
*/
export const isColorable = (obj: unknown): obj is IColorable => {
return typeof obj === "object" && obj !== null && "setColorOption" in obj && "getColorOption" in obj
}