mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
445 B
TypeScript
20 lines
445 B
TypeScript
//// [tests/cases/compiler/globalThisCapture.ts] ////
|
|
|
|
//// [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]
|
|
"use strict";
|
|
// Add a lambda to ensure global 'this' capture is triggered
|
|
(() => this.window);
|
|
var parts = [];
|
|
// Ensure that the generated code is correct
|
|
parts[0];
|