* What `filePath` declares at its top level under `name`: a type alias, an * interface, a class, an enum, a function, a component or a value. A * declaration nested in another (`EmojiMenu::renderMenuItem`) carries its * owner in its qualified name; an import is no declaration.
(name: string, filePath: string, context: ResolutionContext)
| 2397 | * owner in its qualified name; an import is no declaration. |
| 2398 | */ |
| 2399 | function ownDeclarations(name: string, filePath: string, context: ResolutionContext): Node[] { |
| 2400 | return (context.getNodesInFileNamed?.(filePath, name) ?? context.getNodesInFile(filePath).filter((n) => n.name === name)) |
| 2401 | .filter((n) => n.qualifiedName === name && n.kind !== 'import' && n.kind !== 'export' && n.kind !== 'file'); |
| 2402 | } |
| 2403 | |
| 2404 | /** |
| 2405 | * Whether a reference is written where TypeScript reads a type: what a class |
no test coverage detected