The declarations named `name` directly in the namespace `scope` of `file` (its top level when empty), types first.
(file: string, scope: string[], name: string, context: ResolutionContext)
| 3135 | |
| 3136 | /** The declarations named `name` directly in the namespace `scope` of `file` (its top level when empty), types first. */ |
| 3137 | function declarationsIn(file: string, scope: string[], name: string, context: ResolutionContext): Node[] { |
| 3138 | const blocks = namespaceBlocks(file, context); |
| 3139 | const want = scope.join('.'); |
| 3140 | return (context.getNodesInFileNamed?.(file, name) ?? context.getNodesInFile(file).filter((n) => n.name === name)) |
| 3141 | .filter((n) => n.qualifiedName === name && MEMBER_DECLARATION_KINDS.has(n.kind) && (innermostBlock(n, blocks)?.path ?? '') === want) |
| 3142 | .sort(typesFirst); |
| 3143 | } |
| 3144 | |
| 3145 | /** Whether `file` declares the namespace `path`, itself or as the prefix of a longer one (`namespace A.B` declares `A`). */ |
| 3146 | function hasNamespace(file: string, path: string, context: ResolutionContext): boolean { |
no test coverage detected