Files
tsgo/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInMethod.js

43 lines
940 B
TypeScript

//// [tests/cases/compiler/collisionThisExpressionAndLocalVarInMethod.ts] ////
//// [collisionThisExpressionAndLocalVarInMethod.ts]
class a {
method1() {
return {
doStuff: (callback) => () => {
var _this = 2;
return callback(this);
}
}
}
method2() {
var _this = 2;
return {
doStuff: (callback) => () => {
return callback(this);
}
}
}
}
//// [collisionThisExpressionAndLocalVarInMethod.js]
"use strict";
class a {
method1() {
return {
doStuff: (callback) => () => {
var _this = 2;
return callback(this);
}
};
}
method2() {
var _this = 2;
return {
doStuff: (callback) => () => {
return callback(this);
}
};
}
}