File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11/**
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
47 */
58
69import { convertElement } from 'hast-util-is-element'
710
811/**
912 * Check if a node is a script-supporting element.
13+ *
1014 * @type {AssertScriptOrTemplate }
15+ * @param value
16+ * Thing to check (typically `Node`).
17+ * @returns
18+ * Whether `value` is a script-supporting element.
1119 */
1220// @ts -expect-error Sure, the assertion matches.
1321export const scriptSupporting = convertElement ( [ 'script' , 'template' ] )
You can’t perform that action at this time.
0 commit comments