effect-motion
API Referenceeffect-motionNamespacesInstanceFunctions

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

ParameterType
uunknown

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.

On this page