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)
| 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 { |
| 3147 | return namespaceBlocks(file, context).some((b) => b.path === path || b.path.startsWith(`${path}.`)); |
| 3148 | } |
| 3149 | |
| 3150 | /** The innermost namespace block a node starts in. */ |
| 3151 | function innermostBlock(node: Pick<Node, 'startLine' | 'startColumn'>, blocks: readonly NamespaceBlock[]): NamespaceBlock | undefined { |
no test coverage detected