Documentation / @finchart/core / index / PluginApi
Interface: PluginApi
Defined in: packages/core/src/primitives/plugin.ts:28
What a plugin returns.
dispose must be safe to call more than once — the chart's destroy() cleans up everything it installed, but the user may have already cleaned it up by hand.
disposed is part of the contract for three reasons: (1) the chart releases dead APIs (otherwise a closure piles up on every toggle), (2) a plugin can block calls after its own cleanup, and (3) lifecycle state becomes observable from outside.
Don't implement this directly — use teardown/pluginApi instead. In particular, don't merge it with a spread ({ ...teardown(fn), add }). Spreading copies the accessor's value at that instant, so disposed freezes at false forever.
Extended by
Properties
disposed
readonlydisposed:boolean
Defined in: packages/core/src/primitives/plugin.ts:30
Methods
dispose()
dispose():
void
Defined in: packages/core/src/primitives/plugin.ts:29
Returns
void