File tree 3 files changed +13
-15
lines changed
3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * @typedef {import('mdast').Root } Root
3
- * @typedef {import('mdast').Content } Content
4
- * @typedef {import('mdast').HTML } HTML
5
- * @typedef {import('mdast-util-mdx-expression').MDXFlowExpression } MDXFlowExpression
6
- * @typedef {import('mdast-util-mdx-expression').MDXTextExpression } MDXTextExpression
2
+ * @typedef {import('mdast').Html } Html
3
+ * @typedef {import('mdast').Nodes } Nodes
4
+ * @typedef {import('mdast-util-mdx-expression').MdxFlowExpression } MdxFlowExpression
5
+ * @typedef {import('mdast-util-mdx-expression').MdxTextExpression } MdxTextExpression
7
6
*/
8
7
9
8
/**
10
- * @typedef {Root | Content } Node
11
9
*
12
10
* @typedef Mdx1CommentNode
13
11
* @property {'comment' } type
31
29
* Value after name.
32
30
* @property {MarkerParameters } parameters
33
31
* Parsed attributes.
34
- * @property {HTML | Mdx1CommentNode | MDXFlowExpression | MDXTextExpression } node
32
+ * @property {Html | Mdx1CommentNode | MdxFlowExpression | MdxTextExpression } node
35
33
* Reference to given node.
36
34
*/
37
35
@@ -152,7 +150,7 @@ function parseParameters(value) {
152
150
*
153
151
* @param {unknown } value
154
152
* Thing.
155
- * @returns {value is Node }
153
+ * @returns {value is Nodes }
156
154
* It’s a node!
157
155
*/
158
156
function isNode ( value ) {
Original file line number Diff line number Diff line change 33
33
" index.js"
34
34
],
35
35
"dependencies" : {
36
- "@types/mdast" : " ^3 .0.0" ,
37
- "mdast-util-mdx-expression" : " ^1.1 .0"
36
+ "@types/mdast" : " ^4 .0.0" ,
37
+ "mdast-util-mdx-expression" : " ^2.0 .0"
38
38
},
39
39
"devDependencies" : {
40
40
"@types/node" : " ^20.0.0" ,
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @typedef {import('mdast').Literal } Literal
3
3
* @typedef {import('mdast').Paragraph } Paragraph
4
- * @typedef {import('mdast').HTML } HTML
5
- * @typedef {import('mdast-util-mdx-expression').MDXFlowExpression } MDXFlowExpression
6
- * @typedef {import('mdast-util-mdx-expression').MDXTextExpression } MDXTextExpression
4
+ * @typedef {import('mdast').Html } Html
5
+ * @typedef {import('mdast-util-mdx-expression').MdxFlowExpression } MdxFlowExpression
6
+ * @typedef {import('mdast-util-mdx-expression').MdxTextExpression } MdxTextExpression
7
7
*/
8
8
9
9
import assert from 'node:assert/strict'
@@ -26,7 +26,7 @@ test('commentMaker', () => {
26
26
27
27
assert . equal ( commentMarker ( paragraph ) , null , 'should work without html node' )
28
28
29
- /** @type {HTML } */
29
+ /** @type {Html } */
30
30
let html = { type : 'html' , value : '<div></div>' }
31
31
32
32
assert . equal ( commentMarker ( html ) , null , 'should work without comment' )
@@ -326,7 +326,7 @@ test('comment node', () => {
326
326
} )
327
327
328
328
test ( 'MDX@2 expressions' , ( ) => {
329
- /** @type {MDXFlowExpression|MDXTextExpression } */
329
+ /** @type {MdxFlowExpression | MdxTextExpression } */
330
330
let node = {
331
331
type : 'mdxFlowExpression' ,
332
332
value : '/* lint disable heading-style */'
You can’t perform that action at this time.
0 commit comments