Skip to content

Commit 44b2970

Browse files
committed
Refactor to use @imports
1 parent b742a71 commit 44b2970

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

Diff for: lib/index.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
/**
2-
* @typedef {import('unist').Node} UnistNode
3-
* @typedef {import('unist').Parent} UnistParent
4-
*/
5-
6-
/**
7-
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
8-
* Test from `unist-util-is`.
9-
*
10-
* Note: we have remove and add `undefined`, because otherwise when generating
11-
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
12-
* which doesn’t work when publishing on npm.
2+
* @import {Test} from 'unist-util-is'
3+
* @import {Node as UnistNode, Parent as UnistParent} from 'unist'
134
*/
145

156
/**

Diff for: test.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Emphasis} Emphasis
3-
* @typedef {import('mdast').InlineCode} InlineCode
4-
* @typedef {import('unist').Node} UnistNode
2+
* @import {Emphasis, InlineCode} from 'mdast'
3+
* @import {Node as UnistNode} from 'unist'
54
*/
65

76
import assert from 'node:assert/strict'

0 commit comments

Comments
 (0)