We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@types/mdast
1 parent 9a8b284 commit 4cccf07Copy full SHA for 4cccf07
package.json
@@ -33,7 +33,7 @@
33
"index.js"
34
],
35
"dependencies": {
36
- "@types/mdast": "^3.0.0"
+ "@types/mdast": "^4.0.0"
37
},
38
"devDependencies": {
39
"@types/node": "^20.0.0",
test.js
@@ -1,4 +1,5 @@
1
/**
2
+ * @typedef {import('mdast').Root} Root
3
* @typedef {import('mdast').Heading} Heading
4
*/
5
@@ -109,7 +110,8 @@ test('headingStyle', async function (t) {
109
110
* Heading node.
111
112
function parseFirstNode(doc) {
- const tree = fromMarkdown(doc)
113
+ // To do: remove cast when `from-markdown` is released.
114
+ const tree = /** @type {Root} */ (fromMarkdown(doc))
115
const head = tree.children[0]
116
assert(head.type === 'heading')
117
return head
0 commit comments