Whether `file` declares the namespace `path`, itself or as the prefix of a longer one (`namespace A.B` declares `A`).
(file: string, path: string, context: ResolutionContext)
| 3493 | |
| 3494 | /** Whether `file` declares the namespace `path`, itself or as the prefix of a longer one (`namespace A.B` declares `A`). */ |
| 3495 | function hasNamespace(file: string, path: string, context: ResolutionContext): boolean { |
| 3496 | return namespaceBlocks(file, context).some((b) => b.path === path || b.path.startsWith(`${path}.`)); |
| 3497 | } |
| 3498 | |
| 3499 | /** The innermost namespace block a node starts in. */ |
| 3500 | function innermostBlock(node: Pick<Node, 'startLine' | 'startColumn'>, blocks: readonly NamespaceBlock[]): NamespaceBlock | undefined { |
no test coverage detected