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

Type refinement doesn't work with optional chaining #6613

Closed
Hypnosphi opened this issue Jul 19, 2018 · 11 comments
Closed

Type refinement doesn't work with optional chaining #6613

Hypnosphi opened this issue Jul 19, 2018 · 11 comments

Comments

@Hypnosphi
Copy link
Contributor

https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVAXAngBwKZgCCYAvGAN5RxwD8AXGAM4YBOAlgHYDmAvulAFcOAYwxs4HMFA4AKAIYMahAJQNi5VGDBsoYeTQB0VOMoqatYFngwCWkuQG5zfLVZt2KxhgHIAJnig5ARgMbx4nPiA

@TrySound
Copy link
Contributor

Hi @jbrown215, is this issue in team task list or it's not relevant yet?

@jbrown215
Copy link
Contributor

jbrown215 commented Dec 17, 2018

Not on our radar yet (afaik)

@TrySound
Copy link
Contributor

Okay, thanks

@lxe
Copy link

lxe commented Jun 10, 2019

Bumping for visibility?

@tebuevd
Copy link

tebuevd commented Aug 29, 2019

V8 supports it now: https://v8.dev/features/optional-chaining

@mrtnzlml
Copy link
Contributor

Similar issue/inconsistency described here: #8106 (comment)

@danny-does-stuff
Copy link

Here's a simplified example (IMO). Is this something that the Flow team would like some help on? I would love for this feature to be added to flow!

@dsainati1
Copy link
Contributor

@mvitousek is currently working on this

@gajus
Copy link

gajus commented Dec 21, 2019

Was this ever implemented?

@mvitousek
Copy link
Contributor

It was implemented as of v0.114! If you check out the try-flow examples in this issue you'll see that they pass now.

@TSMMark
Copy link

TSMMark commented Dec 21, 2019

Confirmed, works in 0.114.0. Big improvement, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests