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

Function extract

__tests__/ts-interface-extends.test.ts:75–85  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

73 });
74
75 function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult {
76 if (backend === 'wasm') {
77 process.env.CODEGRAPH_KERNEL = '0';
78 return extractFromSource(file, source, language);
79 }
80 delete process.env.CODEGRAPH_KERNEL;
81 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
82 const result = tryKernelExtract(file, source, language);
83 expect(result, `kernel extraction of ${file}`).not.toBeNull();
84 return result!;
85 }
86
87 /** `<from> <kind> <name>@<line>:<column>` for every supertype reference. */
88 const supertypeRefs = (result: ExtractionResult): string[] => {

Callers 1

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected