File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments