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
Spread arguments length check doesn't work with function overloads #23637
Thanks for the quick reply! Adding a new overload solved the problem for me.
Would you consider The implementation signature is not considered part of the overloads for the method intended or bug? It feels counter intuitive that I have to explicitly declare a new overload even though I have an implementation already.
Having the exposed overloads separate from the implementation allows to expose nice and cleanly typed overloads while having an ugly internal implementation signature that just exists to match all the “official” function signatures.
So definitely a feature IMO
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
mhegazy commentedon Apr 24, 2018
The implementation signature is not considered part of the overloads for the method. in other words,
foohas one overload that takes no arguments.if you want to call the function with with variable number of arguments add a new overload:
bowenni commentedon Apr 24, 2018
Thanks for the quick reply! Adding a new overload solved the problem for me.
Would you consider
The implementation signature is not considered part of the overloads for the methodintended or bug? It feels counter intuitive that I have to explicitly declare a new overload even though I have an implementation already.AlCalzone commentedon Apr 25, 2018
Having the exposed overloads separate from the implementation allows to expose nice and cleanly typed overloads while having an ugly internal implementation signature that just exists to match all the “official” function signatures.
So definitely a feature IMO
typescript-bot commentedon May 9, 2018
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.