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 don't think it can be improved, without hardcoding a lot of things just for this case. Then there is also the similar problem with the Map.hasMap.get pair, and so on. We decided that it's better to accept the limitation and make the typing more sound, rather than keeping it unsound and hoping that one day we can come up with something that make most of the existing code still type check
Proposal
In 0.239.x a change was made
Which is great but I was wondering if it could be made a little bit smarter because it leads to checks and $FlowFixMe's that shouldn't be needed.
Use case
Example:
const a = someString.split(",").pop()
Here we know for certain that a is a string because split() will return a non-empty array of strings.
Example 2:
We have made sure that the array is not empty but Flow still insists that a could be undefined.
The text was updated successfully, but these errors were encountered: