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