Skip to content

Commit 74208b7

Browse files
committed
Refactor to use @imports
1 parent 7a9e97e commit 74208b7

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

lib/index.js

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
/**
2-
* @typedef {import('hast').Comment} HastComment
3-
* @typedef {import('hast').Doctype} HastDoctype
4-
* @typedef {import('hast').Element} HastElement
5-
* @typedef {import('hast').Nodes} HastNodes
6-
* @typedef {import('hast').Root} HastRoot
7-
* @typedef {import('hast').Text} HastText
8-
*
9-
* @typedef {import('property-information').Schema} Schema
10-
*
11-
* @typedef {import('xast').Attributes} XastAttributes
12-
* @typedef {import('xast').Comment} XastComment
13-
* @typedef {import('xast').Doctype} XastDoctype
14-
* @typedef {import('xast').Element} XastElement
15-
* @typedef {import('xast').ElementContent} XastElementContent
16-
* @typedef {import('xast').Nodes} XastNodes
17-
* @typedef {import('xast').Root} XastRoot
18-
* @typedef {import('xast').RootContent} XastRootContent
19-
* @typedef {import('xast').Text} XastText
2+
* @import {
3+
* Comment as HastComment,
4+
* Doctype as HastDoctype,
5+
* Element as HastElement,
6+
* Nodes as HastNodes,
7+
* Root as HastRoot,
8+
* Text as HastText
9+
* } from 'hast'
10+
* @import {Schema} from 'property-information'
11+
* @import {
12+
* Attributes as XastAttributes,
13+
* Comment as XastComment,
14+
* Doctype as XastDoctype,
15+
* ElementContent as XastElementContent,
16+
* Element as XastElement,
17+
* Nodes as XastNodes,
18+
* RootContent as XastRootContent,
19+
* Root as XastRoot,
20+
* Text as XastText
21+
* } from 'xast'
2022
*/
2123

2224
/**

test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('mdast-util-to-hast')}
2+
* @import {} from 'mdast-util-to-hast'
33
*/
44

55
import assert from 'node:assert/strict'

0 commit comments

Comments
 (0)