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
Typescript allows you to specify overloads for functions. Ideally wrappers should maintain types for overloaded functions, however currently wrappers do not preserve overloaded function types.
In the above, the overloaded type of overloaded is not preserved. Instead, only the last defined overload prevails. In the playground link modify the order of the overloads to notice this.
Overview
Typescript allows you to specify overloads for functions. Ideally wrappers should maintain types for overloaded functions, however currently wrappers do not preserve overloaded function types.
In the above, the overloaded type of
overloaded
is not preserved. Instead, only the last defined overload prevails. In the playground link modify the order of the overloads to notice this.Playground Link
Links
The above issue was discovered on Twitter.
It is also related to the following open issues on Typescript:
The text was updated successfully, but these errors were encountered: