-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
SpecIssues related to the TypeScript language specificationIssues related to the TypeScript language specification
Milestone
Description
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?
Metadata
Metadata
Assignees
Labels
SpecIssues related to the TypeScript language specificationIssues related to the TypeScript language specification