MCPcopy Create free account
hub / github.com/0no-co/GraphQLSP / Cursor

Class Cursor

src/cursor.ts:3–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { IPosition } from 'graphql-language-service';
2
3export class Cursor implements IPosition {
4 line: number;
5 character: number;
6
7 constructor(line: number, char: number) {
8 this.line = line;
9 this.character = char;
10 }
11
12 setLine(line: number) {
13 this.line = line;
14 }
15
16 setCharacter(character: number) {
17 this.character = character;
18 }
19
20 lessThanOrEqualTo(position: IPosition) {
21 return (
22 this.line < position.line ||
23 (this.line === position.line && this.character <= position.character)
24 );
25 }
26}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…