MCPcopy Create free account
hub / github.com/facebook/pyrefly / parsePosition

Function parsePosition

lsp/src/codeLens.ts:44–54  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

42}
43
44function parsePosition(value: unknown): CodeLensPosition | undefined {
45 const position = asObject(value);
46 if (!position) {
47 return undefined;
48 }
49 const line = position.line;
50 const character = position.character;
51 return typeof line === 'number' && typeof character === 'number'
52 ? {line, character}
53 : undefined;
54}
55
56function parseRunMainArgs(args: unknown): RunMainArgs | undefined {
57 const parsed = asObject(args);

Callers 1

parseRunTestArgsFunction · 0.85

Calls 1

asObjectFunction · 0.85

Tested by

no test coverage detected