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

Function hasExportDeclaration

src/extraction/languages/typescript.ts:262–267  ·  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

260
261/** A statement in `block` that exports by name or by assignment, not by declaring. */
262function hasExportDeclaration(block: SyntaxNode): boolean {
263 for (const statement of namedChildrenOf(block)) {
264 if (statement?.type === 'export_statement' && !getChildByField(statement, 'declaration')) return true;
265 }
266 return false;
267}
268
269/** A TypeScript declaration file: `.d.ts`, `.d.mts`, `.d.cts`. */
270const 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