TypeScript/tests/baselines/reference/emitArrowFunctionThisCapturing.types

49 lines
1.3 KiB
Plaintext
Raw Normal View History

2015-01-07 20:54:22 +01:00
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts ===
var f1 = () => {
2015-04-13 23:01:57 +02:00
>f1 : () => void, Symbol(f1, Decl(emitArrowFunctionThisCapturing.ts, 0, 3))
2015-01-07 20:54:22 +01:00
>() => { this.age = 10} : () => void
this.age = 10
>this.age = 10 : number
>this.age : any
>this : any
>age : any
2015-04-13 21:36:11 +02:00
>10 : number
2015-01-07 20:54:22 +01:00
};
var f2 = (x: string) => {
2015-04-13 23:01:57 +02:00
>f2 : (x: string) => void, Symbol(f2, Decl(emitArrowFunctionThisCapturing.ts, 4, 3))
2015-01-07 20:54:22 +01:00
>(x: string) => { this.name = x} : (x: string) => void
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(emitArrowFunctionThisCapturing.ts, 4, 10))
2015-01-07 20:54:22 +01:00
this.name = x
>this.name = x : string
>this.name : any
>this : any
>name : any
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(emitArrowFunctionThisCapturing.ts, 4, 10))
2015-01-07 20:54:22 +01:00
}
function foo(func: () => boolean) { }
2015-04-13 23:01:57 +02:00
>foo : (func: () => boolean) => void, Symbol(foo, Decl(emitArrowFunctionThisCapturing.ts, 6, 1))
>func : () => boolean, Symbol(func, Decl(emitArrowFunctionThisCapturing.ts, 8, 13))
2015-01-07 20:54:22 +01:00
foo(() => {
>foo(() => { this.age = 100; return true;}) : void
2015-04-13 23:01:57 +02:00
>foo : (func: () => boolean) => void, Symbol(foo, Decl(emitArrowFunctionThisCapturing.ts, 6, 1))
2015-01-07 20:54:22 +01:00
>() => { this.age = 100; return true;} : () => boolean
this.age = 100;
>this.age = 100 : number
>this.age : any
>this : any
>age : any
2015-04-13 21:36:11 +02:00
>100 : number
2015-01-07 20:54:22 +01:00
return true;
2015-04-13 21:36:11 +02:00
>true : boolean
2015-01-07 20:54:22 +01:00
});