Skip to content

Commit 991a87a

Browse files
committed
Refactor to use @imports
1 parent 8864490 commit 991a87a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/index.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
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').RootContent} HastRootContent
8-
* @typedef {import('hast').Text} HastText
2+
* @import {
3+
* Comment as HastComment,
4+
* Doctype as HastDoctype,
5+
* Element as HastElement,
6+
* Nodes as HastNodes,
7+
* RootContent as HastRootContent,
8+
* Root as HastRoot,
9+
* Text as HastText,
10+
* } from 'hast'
911
*/
1012

1113
/**

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('../lib/index.js').HastNodes} HastNodes
2+
* @import {Nodes as HastNodes} from 'hast'
33
*/
44

55
/* eslint-env browser */

0 commit comments

Comments
 (0)