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

Function pathValues

src/resolution/frameworks/react.ts:2057–2059  ·  view source on GitHub ↗

Path parts as text: a constant read from where it is declared, or shown as `{expr}` when it cannot be.

(parts: readonly RoutePart[], fromFile: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

2055
2056/** Path parts as text: a constant read from where it is declared, or shown as `{expr}` when it cannot be. */
2057function pathValues(parts: readonly RoutePart[], fromFile: string, context: ResolutionContext): string[] {
2058 return parts.map((p) => p.lit ?? (p.expr ? constantPathValue(p.expr, fromFile, context) : null) ?? `{${p.expr}}`);
2059}
2060
2061function allowsJsx(filePath: string): boolean {
2062 return !/\.(?:ts|mts|cts)$/.test(filePath);

Callers 1

tableRoutesFunction · 0.85

Calls 2

constantPathValueFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected