(file: string, context: ResolutionContext)
| 376 | } |
| 377 | |
| 378 | function componentInFile(file: string, context: ResolutionContext): Node | null { |
| 379 | const nodes = context.getNodesInFile(file); |
| 380 | return nodes.find((n) => n.kind === 'component') ?? nodes.find((n) => n.kind === 'function' && /^[A-Z]/.test(n.name)) ?? null; |
| 381 | } |
| 382 | |
| 383 | const COMPONENT_EXTENSIONS = ['', '.vue', '.tsx', '.jsx', '.ts', '.js', '/index.vue', '/index.tsx', '/index.ts', '/index.js']; |
| 384 |
no test coverage detected