TypeScript/tests/baselines/reference/selfInCallback.types
2015-09-21 14:30:23 -07:00

31 lines
573 B
Plaintext

=== tests/cases/compiler/selfInCallback.ts ===
class C {
>C : C
public p1 = 0;
>p1 : number
>0 : number
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 : number
}
}