-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIFixedA PR has been merged for this issueA PR has been merged for this issue
Description
let impl: I = {
a: 12,
explicitVoid2: () => this.a, // ok, this: any because it refers to some outer object (window?)
explicitVoid1() { return 12; },
explicitStructural() {
return this.a;
},
explicitInterface() {
return this.a;
},
explicitThis() {
return this.a;
},
}
Expected
var impl = {
a: 12,
explicitVoid2: function () { return _this.a; },
explicitVoid1: function () { return 12; },
explicitStructural: function () {
return this.a;
},
explicitInterface: function () {
return this.a;
},
explicitThis: function () {
return this.a;
}
};
Actual
var impl = {
a: 12,
explicitVoid2: function () { return _this.a; },
explicitVoid1: // ok, this: any because it refers to some outer object (window?)
function () { return 12; },
explicitStructural: function () {
return this.a;
},
explicitInterface: function () {
return this.a;
},
explicitThis: function () {
return this.a;
}
};
- thisTypeInFunctions
- decoratorOnClass2
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIFixedA PR has been merged for this issueA PR has been merged for this issue