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

Function tablesAt

src/resolution/frameworks/react.ts:2095–2098  ·  view source on GitHub ↗

The literals `sites` in `file` stand for: each literal written there, and the tables each function named returns.

(sites: TableSite[], file: string, context: ResolutionContext, depth: number)

Source from the content-addressed store, hash-verified

2093
2094/** The literals `sites` in `file` stand for: each literal written there, and the tables each function named returns. */
2095function tablesAt(sites: TableSite[], file: string, context: ResolutionContext, depth: number): TableLiteral[] {
2096 return sites.flatMap((site) =>
2097 typeof site === 'number' ? [{ file, at: site }] : depth > 3 ? [] : tableNamed(site, file, context, depth + 1));
2098}
2099
2100/** The literals `file` exports as `exported`: `export default [ … ]`, `export default AppRoutes`, `export const routes = [ … ]`, re-exports followed. */
2101function exportedTable(file: string, exported: string, call: boolean, context: ResolutionContext, depth: number): TableLiteral[] {

Callers 2

tableNamedFunction · 0.85
exportedTableFunction · 0.85

Calls 1

tableNamedFunction · 0.85

Tested by

no test coverage detected