MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasExportDeclaration

Function hasExportDeclaration

src/extraction/languages/typescript.ts:135–140  ·  view source on GitHub ↗

A statement in `block` that exports by name or by assignment, not by declaring.

(block: SyntaxNode)

Source from the content-addressed store, hash-verified

133
134/** A statement in `block` that exports by name or by assignment, not by declaring. */
135function hasExportDeclaration(block: SyntaxNode): boolean {
136 for (const statement of namedChildrenOf(block)) {
137 if (statement?.type === 'export_statement' && !getChildByField(statement, 'declaration')) return true;
138 }
139 return false;
140}
141
142/** A TypeScript declaration file: `.d.ts`, `.d.mts`, `.d.cts`. */
143const DECLARATION_FILE = /\.d\.[cm]?ts$/i;

Callers 1

isAmbientExportFunction · 0.85

Calls 2

namedChildrenOfFunction · 0.90
getChildByFieldFunction · 0.90

Tested by

no test coverage detected