Skip to content

Commit caf7d6a

Browse files
committed
Refactor to use @imports
1 parent 1f2dbba commit caf7d6a

File tree

3 files changed

+36
-37
lines changed

3 files changed

+36
-37
lines changed

dev/index.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1+
export type {Encoding, Token, Value} from 'micromark-util-types'
12
export type {
23
CompileContext,
3-
Encoding,
44
Extension,
55
Handle,
66
OnEnterError,
77
OnExitError,
88
Options,
9-
Token,
10-
Transform,
11-
Value
9+
Transform
1210
} from './lib/index.js'
1311

1412
export {fromMarkdown} from './lib/index.js'

dev/lib/index.js

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
/**
2-
* @typedef {import('mdast').Break} Break
3-
* @typedef {import('mdast').Blockquote} Blockquote
4-
* @typedef {import('mdast').Code} Code
5-
* @typedef {import('mdast').Definition} Definition
6-
* @typedef {import('mdast').Emphasis} Emphasis
7-
* @typedef {import('mdast').Heading} Heading
8-
* @typedef {import('mdast').Html} Html
9-
* @typedef {import('mdast').Image} Image
10-
* @typedef {import('mdast').InlineCode} InlineCode
11-
* @typedef {import('mdast').Link} Link
12-
* @typedef {import('mdast').List} List
13-
* @typedef {import('mdast').ListItem} ListItem
14-
* @typedef {import('mdast').Nodes} Nodes
15-
* @typedef {import('mdast').Paragraph} Paragraph
16-
* @typedef {import('mdast').Parent} Parent
17-
* @typedef {import('mdast').PhrasingContent} PhrasingContent
18-
* @typedef {import('mdast').ReferenceType} ReferenceType
19-
* @typedef {import('mdast').Root} Root
20-
* @typedef {import('mdast').Strong} Strong
21-
* @typedef {import('mdast').Text} Text
22-
* @typedef {import('mdast').ThematicBreak} ThematicBreak
23-
*
24-
* @typedef {import('micromark-util-types').Encoding} Encoding
25-
* @typedef {import('micromark-util-types').Event} Event
26-
* @typedef {import('micromark-util-types').ParseOptions} ParseOptions
27-
* @typedef {import('micromark-util-types').Token} Token
28-
* @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
29-
* @typedef {import('micromark-util-types').Value} Value
30-
*
31-
* @typedef {import('unist').Point} Point
32-
*
33-
* @typedef {import('../index.js').CompileData} CompileData
2+
* @import {
3+
* Break,
4+
* Blockquote,
5+
* Code,
6+
* Definition,
7+
* Emphasis,
8+
* Heading,
9+
* Html,
10+
* Image,
11+
* InlineCode,
12+
* Link,
13+
* ListItem,
14+
* List,
15+
* Nodes,
16+
* Paragraph,
17+
* Parent,
18+
* PhrasingContent,
19+
* ReferenceType,
20+
* Root,
21+
* Strong,
22+
* Text,
23+
* ThematicBreak
24+
* } from 'mdast'
25+
* @import {
26+
* Encoding,
27+
* Event,
28+
* ParseOptions,
29+
* TokenizeContext,
30+
* Token,
31+
* Value
32+
* } from 'micromark-util-types'
33+
* @import {Point} from 'unist'
34+
* @import {CompileData} from 'mdast-util-from-markdown'
3435
*/
3536

3637
/**

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('mdast').Root} Root
2+
* @import {Root} from 'mdast'
33
*/
44

55
import assert from 'node:assert/strict'

0 commit comments

Comments
 (0)