MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / parseRecord

Function parseRecord

src/resolution/parameter-flow.ts:479–488  ·  view source on GitHub ↗

The record `raw` holds; null for none, or for one this can't read.

(raw: string | null)

Source from the content-addressed store, hash-verified

477
478/** The record `raw` holds; null for none, or for one this can't read. */
479function parseRecord(raw: string | null): FlowRecord | null {
480 if (!raw) return null;
481 try {
482 const { flows, written } = JSON.parse(raw) as { flows: RecordedFlow[]; written: Array<[string, Array<[string, number]>]> };
483 if (!flows.every((flow) => flow.key.includes('\0') && (flow.names === null || Array.isArray(flow.names)))) return null;
484 return { flows, written: new Map(written.map(([name, files]) => [name, new Map(files)])) };
485 } catch {
486 return null;
487 }
488}
489
490/** A language's files as a sync found them. */
491interface ChangedLanguage {

Callers 1

beforeMethod · 0.85

Calls 2

parseMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected