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

Function pathValues

src/resolution/frameworks/react.ts:2079–2081  ·  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

2077
2078/** Path parts as text: a constant read from where it is declared, or shown as `{expr}` when it cannot be. */
2079function pathValues(parts: readonly RoutePart[], fromFile: string, context: ResolutionContext): string[] {
2080 return parts.map((p) => p.lit ?? (p.expr ? constantPathValue(p.expr, fromFile, context) : null) ?? `{${p.expr}}`);
2081}
2082
2083function allowsJsx(filePath: string): boolean {
2084 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