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.

LineShiftResult

type LineShiftResult =
| {
deleted: readonly DeletedLineReference[];
edits: readonly TextEdit[];
ok: true;
}
| {
code: "LINE_SHIFT_OUT_OF_RANGE" | "LINE_SHIFT_NO_ENGINE";
message: string;
ok: false;
};

Defined in: packages/engine/src/language/DocumentReferences.ts:179

The edits that keep line N references on their lines, or the named reason the change was refused.

{
deleted: readonly DeletedLineReference[];
edits: readonly TextEdit[];
ok: true;
}
readonly deleted: readonly DeletedLineReference[];

The references among edits that now read line deleted, so a host can say so.

readonly edits: readonly TextEdit[];

Every edit, in document order, none overlapping.

readonly ok: true;

{
code: "LINE_SHIFT_OUT_OF_RANGE" | "LINE_SHIFT_NO_ENGINE";
message: string;
ok: false;
}