-
-
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
Support for Flow's Optional Indexed Access type #10788
Conversation
a839e34
to
9b8dee5
Compare
Failure doesn't look related. |
@@ -0,0 +1 @@ | |||
run_spec(__dirname, ["flow"], { trailingComma: "all" }); |
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.
babel-flow
doesn't support it, correct?
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.
Maybe Babel 7.14.0 supports it, but we haven't updated yet
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.
If that's true, better update babel first.
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.
Babel 7.14.0 does support it (https://github.com/babel/babel/releases/tag/v7.14.0), didn't realize it had released (happened just today)
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.
However probably just update to 7.14, tests will be failed. Because almost error messages thrown by babel/parser are updated.
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'll create PR to update babel/parser
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'm not doing anything now, I can try.
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.
Sorry I've created #10802
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 was busy... suddenly
c0b0ac8
to
29e229e
Compare
29e229e
to
2897faa
Compare
If there are issues with the Babel upgrade, we can merge this PR and just add |
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.
We can support indexed access type syntax by babel-flow
after #10802 is merged. So this PR looks good to me.
@fisker I'll merge this for now, if you have another review points please let me know. |
Description
This adds support for Flow's "Optional Indexed Access Types" (e.g
type T = Obj?.[K]
), a follow on to the support for "Indexed Access Types" added in #10594Checklist
changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨