We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Spec for 1.6, p. 3.6.1 says:
Omitting a constraint or specifying type any as the constraint corresponds to specifying the empty object type {}.
This phrase is not clear, because the following code works:
function foo<A>() { return 2; } var x = foo<void>();
and the following code doesn't
function foo<A extends {}>() { return 2; } var x = foo<void>();
Could you please clarify what is meant by the word "corresponds" then?
The text was updated successfully, but these errors were encountered:
We should remove that statement from the spec and instead say that
{}
We can probably also remove the notion of a _base constraint_ as it isn't actually used anymore.
Sorry, something went wrong.
ahejlsberg
No branches or pull requests
Spec for 1.6, p. 3.6.1 says:
This phrase is not clear, because the following code works:
and the following code doesn't
Could you please clarify what is meant by the word "corresponds" then?
The text was updated successfully, but these errors were encountered: