File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3
3
* @typedef {import('mdast').ListItem } ListItem
4
4
* @typedef {import('mdast').Paragraph } Paragraph
5
5
* @typedef {import('mdast').BlockContent } BlockContent
6
+ * @typedef {import('mdast-util-from-markdown').CompileContext } CompileContext
6
7
* @typedef {import('mdast-util-from-markdown').Extension } FromMarkdownExtension
7
8
* @typedef {import('mdast-util-from-markdown').Handle } FromMarkdownHandle
8
9
* @typedef {import('mdast-util-to-markdown').Options } ToMarkdownExtension
@@ -27,14 +28,20 @@ export const gfmTaskListItemToMarkdown = {
27
28
handlers : { listItem : listItemWithTaskListItem }
28
29
}
29
30
30
- /** @type {FromMarkdownHandle } */
31
+ /**
32
+ * @this {CompileContext}
33
+ * @type {FromMarkdownHandle }
34
+ */
31
35
function exitCheck ( token ) {
32
36
const node = /** @type {ListItem } */ ( this . stack [ this . stack . length - 2 ] )
33
37
// We’re always in a paragraph, in a list item.
34
38
node . checked = token . type === 'taskListCheckValueChecked'
35
39
}
36
40
37
- /** @type {FromMarkdownHandle } */
41
+ /**
42
+ * @this {CompileContext}
43
+ * @type {FromMarkdownHandle }
44
+ */
38
45
function exitParagraphWithTaskListItem ( token ) {
39
46
const parent = /** @type {Parent } */ ( this . stack [ this . stack . length - 2 ] )
40
47
const node = /** @type {Paragraph } */ ( this . stack [ this . stack . length - 1 ] )
You can’t perform that action at this time.
0 commit comments