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