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
{{ message }}
Repository navigation
Flow cannot parse conditional expression that includes assignment and arrow #8731
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.
Activity
SamChou19815 commentedon Aug 20, 2021
I think Flow is interpreting the sequence
(b = c) : d => eto be an arrow function with parameterbof default valuec, with return typedand return valuee.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.