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

20 lines
502 B
Plaintext

=== 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[], Symbol(parts, Decl(globalThisCapture.ts, 3, 3))
>[] : undefined[]
// Ensure that the generated code is correct
parts[0];
>parts[0] : any
>parts : any[], Symbol(parts, Decl(globalThisCapture.ts, 3, 3))
>0 : number