TypeScript/tests/baselines/reference/globalThisCapture.js

18 lines
411 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [globalThisCapture.ts]
// Add a lambda to ensure global 'this' capture is triggered
(()=>this.window);
var parts = [];
// Ensure that the generated code is correct
parts[0];
//// [globalThisCapture.js]
var _this = this;
// Add a lambda to ensure global 'this' capture is triggered
(function () { return _this.window; });
2014-07-13 01:04:16 +02:00
var parts = [];
// Ensure that the generated code is correct
2014-07-13 01:04:16 +02:00
parts[0];