-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Add optional chaining and nullish coalescing operators support #7438
Add optional chaining and nullish coalescing operators support #7438
Conversation
We should wait until babel/babel#10269 lands and is released. |
Agreed @existentialism. It's also important to note that TypeScript users will need to wait until TypeScript 3.7 lands, as TypeScript 3.6 is feature-complete. Which is sad, as I want to use it now - but great that the TS team is on top of this. |
How does one go about updating a project created with CRA2 with typescript to include the optional chaining and nullish operator? |
@yasso1am, please see the comment right before yours. We're waiting on this still from the TS team. |
@mrmckeb TS team progress is a blocker to merge and release this change? |
@renatoagds Could you please fix merge conflict issues to keep this PR ready to merge? :) |
@montogeek as soon babel/babel#10269 get released I'll update here. |
Keen to see this land |
@renatoagds babel 7.6.0 came out an hour ago with this change |
Excited for this!! 🎉 |
19d375f
to
db0ea68
Compare
I think it is now ready to be shipped |
We will ship once TypeScript includes support. |
This shouldn't wait for TS support, yes, CRA supports TS, but it shouldn't be a blocker for the JavaScript ecosystem. Please release it. |
@montogeek I kinda agree, but there might arise issues where standalone JS files work fine, but once a TS file imports a JS file with unsupported syntax things might go wrong. |
Does TS actually import / parse .js files? I thought it just used .d.ts files next to them? |
Yes it does, it can infer some basic shapes of classes/objects and even parse and use jsdoc type annotations. |
This is when I wish people lock the thread. Everyone from the CRA knows what to do about this and when. And from now on, Only people complaining or pointing on obvious things (like it is ready from Babel, just read the thread please) will creating unnecessary notifications. |
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.
A reminder that we'll want to bump the plugin versions including @typescript-eslint/* before releasing this
Even though the TypeScript 3.7 beta is now available this still won't work properly. |
We are now waiting on Prettier support, which is tracked here: |
Thanks @renatoagds! I'll add tests in a follow-up PR. |
Since
optional-chaining
andnullish coalescing
has been moved to Stage 3, we're now able to add them to CRA.Closes #7431