Skip to content

Commit

Permalink
docs: update comment on shorthand ambient modules name
Browse files Browse the repository at this point in the history
  • Loading branch information
velut committed Jan 16, 2024
1 parent 08f3a91 commit da92487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/is-shorthand-ambient-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { Node, type ModuleDeclaration } from "ts-morph";
export const isShorthandAmbientModule = (
node: Node,
): node is ModuleDeclaration =>
// Shorthand ambient modules have no body (e.g., `declare module 'foo';`).
// Shorthand ambient modules have no body (e.g., `declare module 'foo';`)
// and their name includes the quotes (e.g., name === "'foo'").
Node.isModuleDeclaration(node) && !node.hasBody();

0 comments on commit da92487

Please sign in to comment.