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
According doc's example we have next error message: "Argument of type 'passedArgumentType' is not assignable to parameter of type 'expectedArgumentType'"
The message will be more informative if whole list of overloads will be displayed.
I would expect next message: "Argument of type '""' is not assignable to parameter of list of types 'number' or '{suit: string; card: number; }[]'"
In this case developer can see all list of available types for overloads what will reduce the search of all supported types.
Please let me know is my proposual correct and can it be implemented?
The text was updated successfully, but these errors were encountered:
There can be potentially dozens of overloads and it'd be unreasonable to explain why all of them failed. See existing issues for requests that we detect which overload you were "trying" to call.
Can you explain why is it unreasonable? Usually count of overloads in not so many (2-3 is common practice). I'm not sure that adding one or two more lines with inforamation about supported types will increase error message text to extra large size.
Separately checked it on Java - all supported overloads are displayed.
Obviously knowing the errors for the first two overloads out of five tells me literally nothing about my problem if I'm aiming for a different overload. Visual Studio with C# I believe does (or did at one time) show you the error for each overload as you scrolled through them.
In Overloads section in https://www.typescriptlang.org/docs/handbook/functions.html mentioned that overload is supported, but that about notification in case if arguments is wrong?
According doc's example we have next error message: "Argument of type 'passedArgumentType' is not assignable to parameter of type 'expectedArgumentType'"
The message will be more informative if whole list of overloads will be displayed.
I would expect next message: "Argument of type '""' is not assignable to parameter of list of types 'number' or '{suit: string; card: number; }[]'"
In this case developer can see all list of available types for overloads what will reduce the search of all supported types.
Please let me know is my proposual correct and can it be implemented?
The text was updated successfully, but these errors were encountered: