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