Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Parsing error '!' with typescript + react presets #13456

Closed
1 task
Connormiha opened this issue Jun 12, 2021 · 2 comments
Closed
1 task

[Bug]: Parsing error '!' with typescript + react presets #13456

Connormiha opened this issue Jun 12, 2021 · 2 comments
Labels
i: duplicate outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Connormiha
Copy link

Connormiha commented Jun 12, 2021

馃捇

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

maxHeight! < 1

Configuration file name

No response

Configuration

No response

Current and expected behavior

Should transform to

maxHeight < 1;

Omit typescript's !

Environment

Babel v7.14.5
@babel/preset-typescript: 7.14.5 => 7.14.5
@babel/preset-react: 7.14.5 => 7.14.5
Node 14

Possible solution

No response

Additional context

https://babeljs.io/repl#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=LYQwHgEgpglg5gCwC4EIAEAeNBGIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Ctypescript&prettier=false&targets=&version=7.14.5&externalPlugins=

This bug reproduces only with react + typescript presets.

@babel-bot
Copy link
Collaborator

Hey @Connormiha! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@fedeci
Copy link
Member

fedeci commented Jun 12, 2021

Duplicate of #13445.
It has been fixed in #13449.

@fedeci fedeci closed this as completed Jun 12, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: duplicate outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants