Skip to content

Commit 27270d3

Browse files
committed
Refactor to use @imports
1 parent 4d9581a commit 27270d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+87
-147
lines changed

lib/configure.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/**
2-
* @typedef {import('./types.js').Options} Options
3-
* @typedef {import('./types.js').State} State
2+
* @import {Options, State} from './types.js'
43
*/
54

65
const own = {}.hasOwnProperty

lib/handle/blockquote.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Blockquote} Blockquote
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').Map} Map
6-
* @typedef {import('../types.js').State} State
2+
* @import {Blockquote, Parents} from 'mdast'
3+
* @import {Info, Map, State} from 'mdast-util-to-markdown'
74
*/
85

96
/**

lib/handle/break.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Break} Break
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Break, Parents} from 'mdast'
3+
* @import {Info, State} from 'mdast-util-to-markdown'
64
*/
75

86
import {patternInScope} from '../util/pattern-in-scope.js'

lib/handle/code.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Code} Code
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').Map} Map
6-
* @typedef {import('../types.js').State} State
2+
* @import {Info, Map, State} from 'mdast-util-to-markdown'
3+
* @import {Code, Parents} from 'mdast'
74
*/
85

96
import {longestStreak} from 'longest-streak'

lib/handle/definition.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Definition} Definition
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Info, State} from 'mdast-util-to-markdown'
3+
* @import {Definition, Parents} from 'mdast'
64
*/
75

86
import {checkQuote} from '../util/check-quote.js'

lib/handle/emphasis.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Emphasis} Emphasis
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Info, State} from 'mdast-util-to-markdown'
3+
* @import {Emphasis, Parents} from 'mdast'
64
*/
75

86
import {checkEmphasis} from '../util/check-emphasis.js'

lib/handle/heading.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Heading} Heading
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Info, State} from 'mdast-util-to-markdown'
3+
* @import {Heading, Parents} from 'mdast'
64
*/
75

86
import {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'

lib/handle/html.js

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

55
html.peek = htmlPeek

lib/handle/image-reference.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').ImageReference} ImageReference
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Info, State} from 'mdast-util-to-markdown'
3+
* @import {ImageReference, Parents} from 'mdast'
64
*/
75

86
imageReference.peek = imageReferencePeek

lib/handle/image.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
2-
* @typedef {import('mdast').Image} Image
3-
* @typedef {import('mdast').Parents} Parents
4-
* @typedef {import('../types.js').Info} Info
5-
* @typedef {import('../types.js').State} State
2+
* @import {Info, State} from 'mdast-util-to-markdown'
3+
* @import {Image, Parents} from 'mdast'
64
*/
75

86
import {checkQuote} from '../util/check-quote.js'

0 commit comments

Comments
 (0)