-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expected 0-2 type arguments, but got 1 #28053
Comments
To be clear, the issue is with the error message and not the error itself, correct? |
Right. |
@andy-ms As per #19220, the error should give the next lowest and highest arity. What if the arity is not between a pair? Consider: new Map<any, any, any>(); We get Also the expected behavior is incorrect when the given arity does not equal 1. Example:
|
I don't think that would work with localization -- we can't have As for |
@andy-ms OK, I opened a PR. |
Thanks @pesca! |
TypeScript Version: 3.2.0-dev.20181020
Code
(as of #28052)
Expected behavior:
Actual behavior:
Expected 0-2 type arguments, but got 1.
Related Issues: #19220
The text was updated successfully, but these errors were encountered: