MCPcopy
hub / github.com/graphql/graphiql / Position

Class Position

packages/cm6-graphql/src/helpers.ts:19–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19export class Position implements IPosition {
20 constructor(
21 public line: number,
22 public character: number,
23 ) {}
24
25 setLine(line: number) {
26 this.line = line;
27 }
28
29 setCharacter(character: number) {
30 this.character = character;
31 }
32
33 lessThanOrEqualTo(position: IPosition) {
34 return (
35 this.line < position.line ||
36 (this.line === position.line && this.character <= position.character)
37 );
38 }
39}
40
41const isMac = () => navigator.userAgent.includes('Mac');
42export const isMetaKeyPressed = (e: MouseEvent) =>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected