MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / selectionToPlainObject

Function selectionToPlainObject

src/testUtil/toPlainObject.ts:28–35  ·  view source on GitHub ↗
(
  selection: Selection
)

Source from the content-addressed store, hash-verified

26}
27
28export function selectionToPlainObject(
29 selection: Selection
30): SelectionPlainObject {
31 return {
32 anchor: positionToPlainObject(selection.anchor),
33 active: positionToPlainObject(selection.active),
34 };
35}
36
37export function positionToPlainObject(position: Position): PositionPlainObject {
38 return { line: position.line, character: position.character };

Callers 1

takeSnapshotFunction · 0.90

Calls 1

positionToPlainObjectFunction · 0.85

Tested by

no test coverage detected