TypeScript/tests/baselines/reference/globalThisCapture.types

20 lines
404 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/globalThisCapture.ts ===
// Add a lambda to ensure global 'this' capture is triggered
(()=>this.window);
>(()=>this.window) : () => any
>()=>this.window : () => any
>this.window : any
>this : any
>window : any
var parts = [];
>parts : any[]
2014-08-15 23:33:16 +02:00
>[] : undefined[]
// Ensure that the generated code is correct
parts[0];
>parts[0] : any
>parts : any[]
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00