Skip to content

Commit 4cccf07

Browse files
committed
Update @types/mdast
1 parent 9a8b284 commit 4cccf07

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"index.js"
3434
],
3535
"dependencies": {
36-
"@types/mdast": "^3.0.0"
36+
"@types/mdast": "^4.0.0"
3737
},
3838
"devDependencies": {
3939
"@types/node": "^20.0.0",

test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @typedef {import('mdast').Root} Root
23
* @typedef {import('mdast').Heading} Heading
34
*/
45

@@ -109,7 +110,8 @@ test('headingStyle', async function (t) {
109110
* Heading node.
110111
*/
111112
function parseFirstNode(doc) {
112-
const tree = fromMarkdown(doc)
113+
// To do: remove cast when `from-markdown` is released.
114+
const tree = /** @type {Root} */ (fromMarkdown(doc))
113115
const head = tree.children[0]
114116
assert(head.type === 'heading')
115117
return head

0 commit comments

Comments
 (0)