Skip to content

This site describes solve-engine 2.44.0, the version npm installs.

LineRerun

Defined in: packages/engine/src/vm/VM.ts:662

A re-run of the lines above a target, opened by LineExecutionContext.rerunLines.

Each run is a fresh pass over the same lines with a different set of inputs, so a sweep of many values opens one session and runs it once per value. A name the run overrides keeps its override on every line: a line that would set it (deposit = 100000) leaves it at the override instead, so the override is what every line below reads.

close(): void;

Defined in: packages/engine/src/vm/VM.ts:677

Release the scratch engine. Call it once, in a finally.

void


run(overrides): Value;

Defined in: packages/engine/src/vm/VM.ts:669

Re-run the lines with overrides in force and return the target line’s answer: its Value, or an error Value when it has none (the line is prose or a heading, it holds several inline answers, it failed, or it waits on live data a re-run cannot fetch).

ParameterType
overridesReadonlyMap<string, Value>

Value


uses(name): boolean;

Defined in: packages/engine/src/vm/VM.ts:675

Whether any line in the span, other than the line asking, mentions name. Overriding a name no line mentions cannot change the answer, and is almost always a misspelling, so the forms that override refuse it.

ParameterType
namestring

boolean