Skip to content

Documentation / @finchart/core / index / styleVars

Function: styleVars() ​

styleVars(spec): string[]

Defined in: packages/core/src/render/style-spec.ts:272

Every variable this spec owns (sorted). Used by manifest tests and third-party extensions.

A contract error if it isn't a spec — a bad value blows up with an error that would otherwise leak our internal implementation (the in operator) straight into the console.

Why this throws instead of falling back: this is an authoring-time door, not a draw path that runs every frame. Returning an empty array for a bad spec would let a manifest test quietly pass as "zero variables."

Parameters ​

spec ​

unknown

Returns ​

string[]