The class a route's component names, by its import (or this file) — or a lazy import's.
(encoded: string, fromFile: string, context: ResolutionContext)
| 422 | |
| 423 | /** The class a route's component names, by its import (or this file) — or a lazy import's. */ |
| 424 | function routeComponent(encoded: string, fromFile: string, context: ResolutionContext): Node | null { |
| 425 | const lazy = LAZY_COMPONENT_REF.exec(encoded); |
| 426 | if (lazy) return lazyComponent(lazy[1]!, lazy[2] === 'default' ? null : lazy[2]!, fromFile, context); |
| 427 | const file = declaringFile(encoded, fromFile, context); |
| 428 | return file ? (nodesNamed(context, file, encoded).find((n) => n.kind === 'class' && n.name === encoded) ?? null) : null; |
| 429 | } |
| 430 | |
| 431 | // ============================================================================= |
| 432 | // The cross-file pass: mounts and constant paths |
no test coverage detected