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