You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think Flow is interpreting the sequence (b = c) : d => e to be an arrow function with parameter b of default value c, with return type d and return value e.
It considers the entire sequence as the first branch of the ternary expression, so it expects a : to start the second branch.
Actually TypeScript seems to have the same problem.
Flow version: 0.157.0
Expected behavior
Succeeds in parsing the following code
Actual behavior
Failed to parse the above code
Additional Info
@babel/parser
can parse the above code since 7.15.3 (ref: babel/babel#13655 )The text was updated successfully, but these errors were encountered: