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.

CompletionItem

Defined in: packages/engine/src/language/LanguageService.ts:26

A single completion candidate, the entire output contract of getCompletions().

category: TokenCategory;

Defined in: packages/engine/src/language/LanguageService.ts:29

Reuses the highlighting taxonomy, one adapter can serve both features.


optional detail?: string;

Defined in: packages/engine/src/language/LanguageService.ts:31

e.g. a unit’s measure (“length”), or the category name for keywords/functions.


label: string;

Defined in: packages/engine/src/language/LanguageService.ts:27


optional replaceLength?: number;

Defined in: packages/engine/src/language/LanguageService.ts:38

How many characters before the cursor the label replaces, present only when that is more than the word under the cursor: a phrase matched across the words already typed (net pres offering net present value of) sets it to the length of net pres. Absent, the label replaces the last word.