File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
Expand file tree Collapse file tree 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-
91import { convertElement } from 'hast-util-is-element'
102
113/**
124 * Check if a node is a script-supporting element.
135 *
14- * @type {AssertScriptOrTemplate }
156 * @param value
167 * Thing to check (typically `Node`).
178 * @returns
189 * Whether `value` is a script-supporting element.
1910 *
2011 * The elements `script` and `template` are script-supporting.
2112 */
22- // @ts -expect-error Sure, the assertion matches.
2313export const scriptSupporting = convertElement ( [ 'script' , 'template' ] )
Original file line number Diff line number Diff line change 3434 " index.js"
3535 ],
3636 "dependencies" : {
37- "@types/hast" : " ^2.0.0" ,
38- "hast-util-is-element" : " ^2.0.0"
37+ "hast-util-is-element" : " ^3.0.0"
3938 },
4039 "devDependencies" : {
4140 "@types/node" : " ^20.0.0" ,
You can’t perform that action at this time.
0 commit comments