TypeScript Version: 2.0.0 (I suppose beta, though tsc -v just reports 2.0.0)
Code
function test(e: HTMLElement): void {
e.onclick = (this: HTMLElement, event) => { }; // error TS1005: ')' expected.
// error TS1005: ';' expected.
// error TS1128: Declaration or statement expected.
e.onclick = function(this: HTMLElement, event) { }; // error TS7006: Parameter 'event' implicitly has an 'any' type
}
Expected behavior:
1st: no parsing error.
2nd: event: MouseEvent inference, as for e.onclick = function(event) { };
Actual behavior:
TypeScript Version: 2.0.0 (I suppose beta, though tsc -v just reports 2.0.0)
Code
Expected behavior:
1st: no parsing error.
2nd: event: MouseEvent inference, as for
e.onclick = function(event) { };Actual behavior: