1
1
/**
2
+ * @typedef {import('mdast-util-from-markdown').CompileContext } CompileContext
2
3
* @typedef {import('mdast-util-from-markdown').Extension } FromMarkdownExtension
3
4
* @typedef {import('mdast-util-from-markdown').Handle } FromMarkdownHandle
4
5
* @typedef {import('mdast-util-to-markdown').Options } ToMarkdownExtension
@@ -39,19 +40,28 @@ export const mdxExpressionToMarkdown = {
39
40
]
40
41
}
41
42
42
- /** @type {FromMarkdownHandle } */
43
+ /**
44
+ * @this {CompileContext}
45
+ * @type {FromMarkdownHandle }
46
+ */
43
47
function enterMdxFlowExpression ( token ) {
44
48
this . enter ( { type : 'mdxFlowExpression' , value : '' } , token )
45
49
this . buffer ( )
46
50
}
47
51
48
- /** @type {FromMarkdownHandle } */
52
+ /**
53
+ * @this {CompileContext}
54
+ * @type {FromMarkdownHandle }
55
+ */
49
56
function enterMdxTextExpression ( token ) {
50
57
this . enter ( { type : 'mdxTextExpression' , value : '' } , token )
51
58
this . buffer ( )
52
59
}
53
60
54
- /** @type {FromMarkdownHandle } */
61
+ /**
62
+ * @this {CompileContext}
63
+ * @type {FromMarkdownHandle }
64
+ */
55
65
function exitMdxExpression ( token ) {
56
66
const value = this . resume ( )
57
67
/** @type {Program|undefined } */
@@ -67,7 +77,10 @@ function exitMdxExpression(token) {
67
77
}
68
78
}
69
79
70
- /** @type {FromMarkdownHandle } */
80
+ /**
81
+ * @this {CompileContext}
82
+ * @type {FromMarkdownHandle }
83
+ */
71
84
function exitMdxExpressionData ( token ) {
72
85
this . config . enter . data . call ( this , token )
73
86
this . config . exit . data . call ( this , token )
0 commit comments