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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babylon typescript error: cast + assignment #7521

Closed
cruzdanilo opened this issue Mar 7, 2018 · 2 comments
Closed

babylon typescript error: cast + assignment #7521

cruzdanilo opened this issue Mar 7, 2018 · 2 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@cruzdanilo
Copy link

Input Code

let a: string = 'a';
(<any>a) = null;

Babel/Babylon Configuration (.babelrc, package.json, cli command)

{
  sourceType: 'module',
  plugins: [
    'typescript',
  ],
}

Expected Behavior

no error

Current Behavior

 ERR ../main.ts Transformation error
SyntaxError: Invalid left-hand side in assignment expression (2:2)

Possible Solution

?

Context

i need to parse typescript to codemod it using jscodeshift and ast-types. it is already working, except for this error.

Your Environment

software version(s)
Babel -
Babylon 7.0.0-beta.40
node 9.5.0
npm 5.7.1
Operating System macOS 10.12.6
@babel-bot
Copy link
Collaborator

Hey @cruzdanilo! 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.

@loganfsmyth
Copy link
Member

Duplicate #7175

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 6, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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