Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

VARIABLES_PACKAGE

const VARIABLES_PACKAGE: IEnginePackage;

Defined in: packages/engine/src/packages/variables/VariablesPackage.ts:16

Variable read and write WITHIN one document: :name = expr to define, name to read it back.

Document-spanning variables are a separate package, solve-global-variables, because they are a different level of functionality: everything here stays inside the document being evaluated, where global :name reaches outside it. Keeping them apart is what lets a host refuse one without losing the other. See that package for the reasoning.