MCPcopy Create free account
hub / github.com/compilets/compilets / isNodeJsDeclaration

Function isNodeJsDeclaration

src/parser-utils.ts:200–204  ·  view source on GitHub ↗
(decl: ts.Declaration)

Source from the content-addressed store, hash-verified

198 * Return whether the declaration comes from Node.js.
199 */
200export function isNodeJsDeclaration(decl: ts.Declaration): boolean {
201 const sourceFile = decl.getSourceFile();
202 return sourceFile.isDeclarationFile &&
203 sourceFile.fileName.includes('/node_modules/@types/node/');
204}
205
206/**
207 * Return whether it is a top-level variable declaration.

Callers

nothing calls this directly

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected