File tree 2 files changed +1
-12
lines changed
2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change 1
- /**
2
- * @typedef {import('hast').Element } Element
3
- */
4
-
5
- /**
6
- * @typedef {import('hast-util-is-element').AssertPredicate<Element & {tagName: 'script' | 'template'}> } AssertScriptOrTemplate
7
- */
8
-
9
1
import { convertElement } from 'hast-util-is-element'
10
2
11
3
/**
12
4
* Check if a node is a script-supporting element.
13
5
*
14
- * @type {AssertScriptOrTemplate }
15
6
* @param value
16
7
* Thing to check (typically `Node`).
17
8
* @returns
18
9
* Whether `value` is a script-supporting element.
19
10
*
20
11
* The elements `script` and `template` are script-supporting.
21
12
*/
22
- // @ts -expect-error Sure, the assertion matches.
23
13
export const scriptSupporting = convertElement ( [ 'script' , 'template' ] )
Original file line number Diff line number Diff line change 34
34
" index.js"
35
35
],
36
36
"dependencies" : {
37
- "@types/hast" : " ^2.0.0" ,
38
- "hast-util-is-element" : " ^2.0.0"
37
+ "hast-util-is-element" : " ^3.0.0"
39
38
},
40
39
"devDependencies" : {
41
40
"@types/node" : " ^20.0.0" ,
You can’t perform that action at this time.
0 commit comments