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
5
6
* @typedef {import('mdast-util-to-markdown').Handle } ToMarkdownHandle
6
7
* @typedef {import('estree-jsx').Program } Program
7
8
* @typedef {import('./complex-types.js').MdxjsEsm } MdxjsEsm
8
9
*
9
- * @typedef {MdxjsEsm } MDXJSEsm - Deprecated name, prefer `MdxjsEsm`
10
+ * @typedef {MdxjsEsm } MDXJSEsm
11
+ * Deprecated name, prefer `MdxjsEsm`.
10
12
*/
11
13
12
14
/** @type {FromMarkdownExtension } */
@@ -18,13 +20,19 @@ export const mdxjsEsmFromMarkdown = {
18
20
/** @type {ToMarkdownExtension } */
19
21
export const mdxjsEsmToMarkdown = { handlers : { mdxjsEsm : handleMdxjsEsm } }
20
22
21
- /** @type {FromMarkdownHandle } */
23
+ /**
24
+ * @this {CompileContext}
25
+ * @type {FromMarkdownHandle }
26
+ */
22
27
function enterMdxjsEsm ( token ) {
23
28
this . enter ( { type : 'mdxjsEsm' , value : '' } , token )
24
29
this . buffer ( ) // Capture EOLs
25
30
}
26
31
27
- /** @type {FromMarkdownHandle } */
32
+ /**
33
+ * @this {CompileContext}
34
+ * @type {FromMarkdownHandle }
35
+ */
28
36
function exitMdxjsEsm ( token ) {
29
37
const value = this . resume ( )
30
38
const node = /** @type {MdxjsEsm } */ ( this . exit ( token ) )
@@ -39,7 +47,10 @@ function exitMdxjsEsm(token) {
39
47
}
40
48
}
41
49
42
- /** @type {FromMarkdownHandle } */
50
+ /**
51
+ * @this {CompileContext}
52
+ * @type {FromMarkdownHandle }
53
+ */
43
54
function exitMdxjsEsmData ( token ) {
44
55
this . config . enter . data . call ( this , token )
45
56
this . config . exit . data . call ( this , token )
0 commit comments