-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
TypeScript Version:
1.7.5
Code
type cb = (a:number, b:number) => number;
function foo(callback: cb): void {
callback(1,2);
}
foo(function(a, b){return 1;}); // this is OK.
foo(function(a){return 1;}); // this should fail.
foo(function(){return 1;}); // this should fail.Expected behavior:
First call should compile. The rest shouldn't.
Actual behavior:
All calls compile cleanly.
Additional note
This is what happens, for example, with Array.prototype.sort
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code