Skip to content

Commit 1f19951

Browse files
committed
Update @types/hast, utilities
1 parent 6e5522a commit 1f19951

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

lib/index.js

-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
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-
91
import {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.
2313
export const scriptSupporting = convertElement(['script', 'template'])

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
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",

0 commit comments

Comments
 (0)