isInstance
function isInstance(u): u is Instance<"Audio" | "Line" | "Path" | "Rect" | "Circle" | "Ellipse" | "Text" | "Group" | "Hud" | "Image" | "Camera">;
Function: isInstance()
function isInstance(u): u is Instance<"Audio" | "Line" | "Path" | "Rect" | "Circle" | "Ellipse" | "Text" | "Group" | "Hud" | "Image" | "Camera">;Defined in: packages/motion/src/Instance.ts:75
Whether u is an Instance.
Parameters
| Parameter | Type |
|---|---|
u | unknown |
Returns
u is Instance<"Audio" | "Line" | "Path" | "Rect" | "Circle" | "Ellipse" | "Text" | "Group" | "Hud" | "Image" | "Camera">
Remarks
The dispatch behind every dual animator: moveTo(circle, …) and
circle.pipe(moveTo(…)) are told apart by testing the first argument
with this, rather than by counting arguments — trailing optional
parameters make arity ambiguous.