Skip to content

Commit

Permalink
Fix TSC generating broken .d.ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 26, 2023
1 parent 6e0fa13 commit f84ec01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Parent} Parent
* @typedef {import('unist-util-is').Test} Test
*
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
* Test from `unist-util-is`.
*
* Note: we have remove and add `undefined`, because otherwise when generating
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
* which doesn’t work when publishing on npm.
*/

/**
Expand Down

0 comments on commit f84ec01

Please sign in to comment.