Skip to content

Commit 8509af4

Browse files
committed
Fix some type errors
1 parent 0cde012 commit 8509af4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
55
* @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform
66
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
7+
* @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName
78
* @typedef {import('mdast-util-to-markdown/lib/types.js').Options} ToMarkdownExtension
89
* @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction
910
* @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject
@@ -14,7 +15,9 @@ import {ccount} from 'ccount'
1415
import {findAndReplace} from 'mdast-util-find-and-replace'
1516
import {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'
1617

18+
/** @type {ConstructName} */
1719
const inConstruct = 'phrasing'
20+
/** @type {Array<ConstructName>} */
1821
const notInConstruct = ['autolink', 'link', 'image', 'label']
1922

2023
/** @type {FromMarkdownExtension} */
@@ -42,23 +45,20 @@ export const gfmAutolinkLiteralToMarkdown = {
4245
before: '[+\\-.\\w]',
4346
after: '[\\-.\\w]',
4447
inConstruct,
45-
// @ts-expect-error: to do: use map.
4648
notInConstruct
4749
},
4850
{
4951
character: '.',
5052
before: '[Ww]',
5153
after: '[\\-.\\w]',
5254
inConstruct,
53-
// @ts-expect-error: to do: use map.
5455
notInConstruct
5556
},
5657
{
5758
character: ':',
5859
before: '[ps]',
5960
after: '\\/',
6061
inConstruct,
61-
// @ts-expect-error: to do: use map.
6262
notInConstruct
6363
}
6464
]

0 commit comments

Comments
 (0)