Skip to content

Commit 7f37b95

Browse files
committedJul 24, 2022
Update @types/estree-jsx
1 parent 8dded60 commit 7f37b95

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed
 

‎packages/mdx/lib/plugin/recma-document.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,8 @@ export function recmaDocument(options = {}) {
224224
handleEsm(child)
225225
} else if (
226226
child.type === 'ExpressionStatement' &&
227-
// @ts-expect-error types are wrong: `JSXElement`/`JSXFragment` are
228-
// `Expression`s.
227+
// @ts-expect-error types are wrong: `JSXFragment` is an `Expression`.
229228
(child.expression.type === 'JSXFragment' ||
230-
// @ts-expect-error "
231229
child.expression.type === 'JSXElement')
232230
) {
233231
content = true
@@ -523,7 +521,6 @@ export function recmaDocument(options = {}) {
523521
]
524522
}
525523

526-
// @ts-expect-error: JSXElements are expressions.
527524
let result = /** @type {Expression} */ (element)
528525

529526
if (!hasInternalLayout) {
@@ -542,6 +539,7 @@ export function recmaDocument(options = {}) {
542539

543540
let argument = content || {type: 'Literal', value: null}
544541

542+
// Unwrap a fragment of a single element.
545543
if (
546544
argument &&
547545
// @ts-expect-error: fine.

‎packages/mdx/lib/plugin/recma-jsx-rewrite.js

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export function recmaJsxRewrite(options = {}) {
7777
enter(_node) {
7878
const node = /** @type {Node} */ (_node)
7979
const newScope = /** @type {Scope|undefined} */ (
80-
// @ts-expect-error: periscopic doesn’t support JSX.
8180
scopeInfo.map.get(node)
8281
)
8382

‎packages/mdx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"index.js"
4747
],
4848
"dependencies": {
49-
"@types/estree-jsx": "^0.0.1",
49+
"@types/estree-jsx": "^1.0.0",
5050
"@types/mdx": "^2.0.0",
5151
"astring": "^1.6.0",
5252
"estree-util-build-jsx": "^2.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.