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

29 lines
472 B
TypeScript

//// [tests/cases/compiler/badThisBinding.ts] ////
//// [badThisBinding.ts]
declare function foo(a:any): any;
declare function bar(a:any): any;
class Greeter {
constructor() {
foo(() => {
bar(() => {
var x = this;
});
});
}
}
//// [badThisBinding.js]
"use strict";
class Greeter {
constructor() {
foo(() => {
bar(() => {
var x = this;
});
});
}
}