| 194 | * Framework-specific resolver |
| 195 | */ |
| 196 | export interface FrameworkResolver { |
| 197 | /** Framework name */ |
| 198 | name: string; |
| 199 | /** Languages this framework applies to. If omitted, applies to all languages. */ |
| 200 | languages?: Language[]; |
| 201 | /** Detect if project uses this framework (project-level, called once at startup) */ |
| 202 | detect(context: ResolutionContext): boolean; |
| 203 | /** Resolve a reference using framework-specific patterns */ |
| 204 | resolve(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null; |
| 205 | /** |
| 206 | * Opt a reference NAME through the resolver's name-exists pre-filter, even when |
| 207 | * no node is named that. Needed for dynamic dispatch where the call target is |
| 208 | * an attribute/descriptor, not a declared symbol (e.g. Django's |
| 209 | * `self._iterable_class(...)`, React effect callbacks). Returning true lets the |
| 210 | * ref reach `resolve()` instead of being dropped for having no name match. |
| 211 | */ |
| 212 | claimsReference?(name: string): boolean; |
| 213 | /** |
| 214 | * Extract framework-specific nodes and references from a file. |
| 215 | * |
| 216 | * Returns route nodes, middleware nodes, etc., plus unresolved references |
| 217 | * that link those nodes to handlers (view classes, controller methods, |
| 218 | * included modules). Unresolved references flow into the normal resolution |
| 219 | * pipeline; the framework's own `resolve()` is one of the strategies tried. |
| 220 | */ |
| 221 | extract?(filePath: string, content: string): FrameworkExtractionResult; |
| 222 | /** |
| 223 | * Cross-file finalization pass, called once after all per-file extraction |
| 224 | * completes (and again on every incremental sync). Used by frameworks where |
| 225 | * a symbol's final representation depends on a sibling file the per-file |
| 226 | * `extract()` never saw — e.g. NestJS's `RouterModule.register([...])` |
| 227 | * sets route prefixes for controllers declared elsewhere. |
| 228 | * |
| 229 | * Implementations return route/etc. nodes with mutated fields (typically |
| 230 | * `name`); the orchestrator persists each via `updateNode`. The node `id` |
| 231 | * MUST be preserved so existing edges (route → handler, etc.) stay intact; |
| 232 | * `qualifiedName` SHOULD be preserved so the pass stays idempotent — a |
| 233 | * second run can recover the original in-file form from `qualifiedName`. |
| 234 | */ |
| 235 | postExtract?(context: ResolutionContext): Node[]; |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Import mapping from a file |
no outgoing calls
no test coverage detected