-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: add new parser babel-ts
to parse TypeScript syntaxes via Babel
#6400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some more thorough tests (i.e. by adding the babel-ts
parser to a few existing TypeScript test cases) to make sure that the printer can handle the Babel-TypeScript AST just as well as the ESTree-Typescript AST?
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need 2 parsers for typescript
@evilebottnawi With And we do have two parsers for |
@JounQin 👍 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@duailibe Can you approve this PR? So that we merge it... |
@JounQin I'm aware. I still disagree with the I'm trying to fix it myself, and I'll update the PR today |
Tested |
@thorn0 I think we if we find some problems we can send a PR with fix, it is not easy to find all edge cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge ⭐
docs/
directory)CHANGELOG.unreleased.md
file following the template.✨Try the playground for this PR✨
Motivation:
Babel
itself is able to parseTypeScript
, but we haven't enabled it, which makes something like babel-preset-proposal-typescript can not integrate withPrettier
perfectly, but it should be easy to support it.