UNPKG

@jsdocs-io/extractor

Version:

The API extractor for npm packages powering jsdocs.io

7 lines (6 loc) 292 B
import { Node } from "ts-morph"; export function isShorthandAmbientModule(node) { // Shorthand ambient modules have no body (e.g., `declare module 'foo';`) // and their name includes the quotes (e.g., name === "'foo'"). return Node.isModuleDeclaration(node) && !node.hasBody(); }