TypeScript/tests/baselines/reference/emitArrowFunctionThisCapturingES6.types
2015-04-13 14:29:37 -07:00

49 lines
1.3 KiB
Plaintext

=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts ===
var f1 = () => {
>f1 : () => void, Symbol(f1, Decl(emitArrowFunctionThisCapturingES6.ts, 0, 3))
>() => { this.age = 10} : () => void
this.age = 10
>this.age = 10 : number
>this.age : any
>this : any
>age : any
>10 : number
};
var f2 = (x: string) => {
>f2 : (x: string) => void, Symbol(f2, Decl(emitArrowFunctionThisCapturingES6.ts, 4, 3))
>(x: string) => { this.name = x} : (x: string) => void
>x : string, Symbol(x, Decl(emitArrowFunctionThisCapturingES6.ts, 4, 10))
this.name = x
>this.name = x : string
>this.name : any
>this : any
>name : any
>x : string, Symbol(x, Decl(emitArrowFunctionThisCapturingES6.ts, 4, 10))
}
function foo(func: () => boolean){ }
>foo : (func: () => boolean) => void, Symbol(foo, Decl(emitArrowFunctionThisCapturingES6.ts, 6, 1))
>func : () => boolean, Symbol(func, Decl(emitArrowFunctionThisCapturingES6.ts, 8, 13))
foo(() => {
>foo(() => { this.age = 100; return true;}) : void
>foo : (func: () => boolean) => void, Symbol(foo, Decl(emitArrowFunctionThisCapturingES6.ts, 6, 1))
>() => { this.age = 100; return true;} : () => boolean
this.age = 100;
>this.age = 100 : number
>this.age : any
>this : any
>age : any
>100 : number
return true;
>true : boolean
});