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 tried asking around and didn't find answers about this behavior other than the flow-typed rxjs typings that describe this defect.
As of 0.31, variadic functions' type signatures aren't selected correctly and the earliest entries will end up being used. This meaning that if I have a typing for the same function for two or three arguments, if the two-arg definition is above the three-arg definition, it will be picked even when using three.
It seems like you can get around this by reversing your definition ordering, but I'm guessing that probably opens a whole 'nother can of worms (if not, it's still not great).
Edit2: Oh, yes, looks like I was really wrong about this, it just matches on the first one The tooltip is wrong, it really does seem to match the correct signature but only if the ordering is reverse from highest number of args going down:
Is this to be expected and solvable in another way, or is this actually a defect?
Uh oh!
There was an error while loading. Please reload this page.
I tried asking around and didn't find answers about this behavior other than the flow-typed rxjs typings that describe this defect.
As of 0.31, variadic functions' type signatures aren't selected correctly and the earliest entries will end up being used. This meaning that if I have a typing for the same function for two or three arguments, if the two-arg definition is above the three-arg definition, it will be picked even when using three.
It seems like you can get around this by reversing your definition ordering, but I'm guessing that probably opens a whole 'nother can of worms (if not, it's still not great).
Edit2:
Oh, yes, looks like I was really wrong about this, it just matches on the first oneThe tooltip is wrong, it really does seem to match the correct signature but only if the ordering is reverse from highest number of args going down:Is this to be expected and solvable in another way, or is this actually a defect?
Repo with more details: https://github.com/justinwoo/flow-type-select-ordering
The text was updated successfully, but these errors were encountered: