Skip to content

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

ParsingResult

Defined in: packages/engine/src/types/ParsingResult.ts:102

Everything produced by parsing a document.

Errors are collected rather than thrown. One bad line must not cost the results of every other line, so failures are reported alongside the lines that did evaluate.

checks?: {
failed: number;
passed: number;
};

Defined in: packages/engine/src/types/ParsingResult.ts:121

How many check lines passed and failed, present only when the document has any (#506). A failed check is also an error line above; this is the count a host reads to flag a broken template without parsing messages.

failed: number;
passed: number;

diagnostics?: DiagnosticReportJSON;

Defined in: packages/engine/src/types/ParsingResult.ts:115

Stage-by-stage trace, present only when diagnostics were requested.


errors: string[];

Defined in: packages/engine/src/types/ParsingResult.ts:113

One Line N: message entry for each failure in the document, in line order: a line or inline solve that threw (its error), and one whose result is an error value. Both document passes list the same failures. The lines themselves are still present above.


lines: ParsedLine[];

Defined in: packages/engine/src/types/ParsingResult.ts:104

Every line in document order, including ones with nothing to evaluate.


totalLines: number;

Defined in: packages/engine/src/types/ParsingResult.ts:106

Line count, so a caller need not measure lines.