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
Expected behavior:
There should be no issue with the call in func3. Actual behavior:
error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'.
Type 'string' is not assignable to type 'number'.
This seems to be in direct contradiction to what the TS GitHub wiki says about function overloading, and the impact of the shape of the implementation function on the allowed types of the function:
The text was updated successfully, but these errors were encountered:
TypeScript Version: both 2.1.4 and nightly (2.2.0-dev.20161219)
Code
Expected behavior:
There should be no issue with the call in
func3
.Actual behavior:
This seems to be in direct contradiction to what the TS GitHub wiki says about function overloading, and the impact of the shape of the implementation function on the allowed types of the function:

The text was updated successfully, but these errors were encountered: