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)
| 2077 | |
| 2078 | /** Path parts as text: a constant read from where it is declared, or shown as `{expr}` when it cannot be. */ |
| 2079 | function 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 | |
| 2083 | function allowsJsx(filePath: string): boolean { |
| 2084 | return !/\.(?:ts|mts|cts)$/.test(filePath); |
no test coverage detected