Skip to content

Commit 64f9ab1

Browse files
committed
Update for TS 4.9
1 parent 9da3339 commit 64f9ab1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @typedef {import('mdast').ListItem} ListItem
44
* @typedef {import('mdast').Paragraph} Paragraph
55
* @typedef {import('mdast').BlockContent} BlockContent
6+
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
67
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
78
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
89
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
@@ -27,14 +28,20 @@ export const gfmTaskListItemToMarkdown = {
2728
handlers: {listItem: listItemWithTaskListItem}
2829
}
2930

30-
/** @type {FromMarkdownHandle} */
31+
/**
32+
* @this {CompileContext}
33+
* @type {FromMarkdownHandle}
34+
*/
3135
function exitCheck(token) {
3236
const node = /** @type {ListItem} */ (this.stack[this.stack.length - 2])
3337
// We’re always in a paragraph, in a list item.
3438
node.checked = token.type === 'taskListCheckValueChecked'
3539
}
3640

37-
/** @type {FromMarkdownHandle} */
41+
/**
42+
* @this {CompileContext}
43+
* @type {FromMarkdownHandle}
44+
*/
3845
function exitParagraphWithTaskListItem(token) {
3946
const parent = /** @type {Parent} */ (this.stack[this.stack.length - 2])
4047
const node = /** @type {Paragraph} */ (this.stack[this.stack.length - 1])

0 commit comments

Comments
 (0)