A framework name heuristic's pick (see name-heuristic.ts), preferring these folders.
( ref: UnresolvedRef, kinds: Set<string>, preferredDirPatterns: string[], context: ResolutionContext, )
| 417 | |
| 418 | /** A framework name heuristic's pick (see name-heuristic.ts), preferring these folders. */ |
| 419 | function resolveByNameAndKind( |
| 420 | ref: UnresolvedRef, |
| 421 | kinds: Set<string>, |
| 422 | preferredDirPatterns: string[], |
| 423 | context: ResolutionContext, |
| 424 | ): string | null { |
| 425 | const picked = pickByNameAndKind(ref, kinds, (f) => preferredDirPatterns.some((d) => f.includes(d)), context); |
| 426 | const type = picked ? context.getNodeById?.(picked) : undefined; |
| 427 | return type && !csharpTypeArityFits(type, ref, context) ? null : picked; |
| 428 | } |
no test coverage detected