TypeScript/tests/baselines/reference/thisInLambda.types
Vladimir Matveev f06423bffc Revert "add part of test baselines"
This reverts commit 502b2ba321.
2016-03-09 17:08:26 -08:00

52 lines
1 KiB
Plaintext

=== tests/cases/compiler/thisInLambda.ts ===
class Foo {
>Foo : Foo
x = "hello";
>x : string
>"hello" : string
bar() {
>bar : () => void
this.x; // 'this' is type 'Foo'
>this.x : string
>this : this
>x : string
var f = () => this.x; // 'this' should be type 'Foo' as well
>f : () => string
>() => this.x : () => string
>this.x : string
>this : this
>x : string
}
}
function myFn(a:any) { }
>myFn : (a: any) => void
>a : any
class myCls {
>myCls : myCls
constructor () {
myFn(() => {
>myFn(() => { myFn(() => { var x = this; }); }) : void
>myFn : (a: any) => void
>() => { myFn(() => { var x = this; }); } : () => void
myFn(() => {
>myFn(() => { var x = this; }) : void
>myFn : (a: any) => void
>() => { var x = this; } : () => void
var x = this;
>x : this
>this : this
});
});
}
}