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)
| 3236 | |
| 3237 | /** The declarations named `name` directly in the namespace `scope` of `file` (its top level when empty), types first. */ |
| 3238 | function declarationsIn(file: string, scope: string[], name: string, context: ResolutionContext): Node[] { |
| 3239 | const blocks = namespaceBlocks(file, context); |
| 3240 | const want = scope.join('.'); |
| 3241 | return (context.getNodesInFileNamed?.(file, name) ?? context.getNodesInFile(file).filter((n) => n.name === name)) |
| 3242 | .filter((n) => n.qualifiedName === name && MEMBER_DECLARATION_KINDS.has(n.kind) && (innermostBlock(n, blocks)?.path ?? '') === want) |
| 3243 | .sort(typesFirst); |
| 3244 | } |
| 3245 | |
| 3246 | /** Whether `file` declares the namespace `path`, itself or as the prefix of a longer one (`namespace A.B` declares `A`). */ |
| 3247 | function hasNamespace(file: string, path: string, context: ResolutionContext): boolean { |
no test coverage detected