mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
472 B
TypeScript
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;
|
|
});
|
|
});
|
|
}
|
|
}
|