Skip to content

Documentation / @finchart/core / index / CustomDraw

Interface: CustomDraw<P> ​

Defined in: packages/core/src/render/types.ts:273

One drawing an extension sends. Being honest that params is unknown — that type is a contract between the extension and a renderer that knows it, and core isn't a party to it. The extension narrows it on its own side (CustomDraw<GradientParams>).

Type Parameters ​

P ​

P = unknown

Properties ​

fallback? ​

readonly optional fallback?: readonly FallbackCommand[]

Defined in: packages/core/src/render/types.ts:291

What a surface that doesn't know this name replays instead. Leaving it empty draws nothing. This is the spot that keeps the promise "the command list is itself the output" — whether replaying to SVG or sending to a worker, an unknown command doesn't punch a hole in the picture.

clip can't get in here (FallbackCommand) — the boundary belongs to whoever allocated the space, and if a fallback swapped it out, one whole pane would come unbound.


name ​

readonly name: string

Defined in: packages/core/src/render/types.ts:278

What to draw. Carries a namespace ("acme/heatmap") — since there's no global registry, the name alone is what prevents collisions.


params ​

readonly params: P

Defined in: packages/core/src/render/types.ts:279