-
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: 2.0.3
Code
interface UIElement {
addClickListener(onclick: (this: UIElement, e: Event) => void): void;
prop: number;
}
let uiElement: UIElement;
uiElement.addClickListener(() => {
var k = this.prop;
});Expected behavior:
No error
Actual behavior:
tsc.exe --noImplicitThis blah.ts
blah.ts(8,10): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
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