-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
TypeScript: Support parsing 'unique' type operator #7239
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6644/ |
Q: Is it |
We parse |
Is it worth setting |
There's no such property in the TypeScript implementation, so I don't think it's worth adding yet. |
I guess we technically would want a test to see that it's stripped out but AST structure is the same so it's covered. |
microsoft/TypeScript#15473 added the
unique
keyword to the language. This adds support in babylon to parse it. There were no necessary changes to the generator, which already handles any keyword, or to the plugin, which erases all types without needing to look at their contents.@rbuckton and @DanielRosenwasser for review.
See also eslint/typescript-eslint-parser#433, which does the same thing in their parser. @azz @JamesHenry