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

Function constantValue

src/resolution/frameworks/angular-router.ts:586–589  ·  view source on GitHub ↗

A constant path's value: `internalRoutes.account.path` → `account`.

(expr: string, fromFile: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

584
585/** A constant path's value: `internalRoutes.account.path` → `account`. */
586function constantValue(expr: string, fromFile: string, context: ResolutionContext): string | null {
587 const text = constantText(expr, fromFile, context);
588 return text === null ? null : staticString(text);
589}
590
591/** The file declaring `name` for code in `fromFile`: its import, else the file itself. */
592function declaringFile(name: string, fromFile: string, context: ResolutionContext): string | null {

Callers 1

resolvedSegmentsFunction · 0.70

Calls 2

constantTextFunction · 0.85
staticStringFunction · 0.85

Tested by

no test coverage detected