Skip to content

Commit

Permalink
Update @types/estree-jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 24, 2022
1 parent 8dded60 commit 7f37b95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/mdx/lib/plugin/recma-document.js
Expand Up @@ -224,10 +224,8 @@ export function recmaDocument(options = {}) {
handleEsm(child)
} else if (
child.type === 'ExpressionStatement' &&
// @ts-expect-error types are wrong: `JSXElement`/`JSXFragment` are
// `Expression`s.
// @ts-expect-error types are wrong: `JSXFragment` is an `Expression`.
(child.expression.type === 'JSXFragment' ||
// @ts-expect-error "
child.expression.type === 'JSXElement')
) {
content = true
Expand Down Expand Up @@ -523,7 +521,6 @@ export function recmaDocument(options = {}) {
]
}

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

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

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

// Unwrap a fragment of a single element.
if (
argument &&
// @ts-expect-error: fine.
Expand Down
1 change: 0 additions & 1 deletion packages/mdx/lib/plugin/recma-jsx-rewrite.js
Expand Up @@ -77,7 +77,6 @@ export function recmaJsxRewrite(options = {}) {
enter(_node) {
const node = /** @type {Node} */ (_node)
const newScope = /** @type {Scope|undefined} */ (
// @ts-expect-error: periscopic doesn’t support JSX.
scopeInfo.map.get(node)
)

Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/package.json
Expand Up @@ -46,7 +46,7 @@
"index.js"
],
"dependencies": {
"@types/estree-jsx": "^0.0.1",
"@types/estree-jsx": "^1.0.0",
"@types/mdx": "^2.0.0",
"astring": "^1.6.0",
"estree-util-build-jsx": "^2.0.0",
Expand Down

0 comments on commit 7f37b95

Please sign in to comment.