TypeScript/tests/baselines/reference/selfInCallback.types
2016-09-01 14:25:44 -07:00

31 lines
563 B
Plaintext

=== tests/cases/compiler/selfInCallback.ts ===
class C {
>C : C
public p1 = 0;
>p1 : number
>0 : 0
public callback(cb:()=>void) {cb();}
>callback : (cb: () => void) => void
>cb : () => void
>cb() : void
>cb : () => void
public doit() {
>doit : () => void
this.callback(()=>{this.p1+1});
>this.callback(()=>{this.p1+1}) : void
>this.callback : (cb: () => void) => void
>this : this
>callback : (cb: () => void) => void
>()=>{this.p1+1} : () => void
>this.p1+1 : number
>this.p1 : number
>this : this
>p1 : number
>1 : 1
}
}