mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
357 B
TypeScript
16 lines
357 B
TypeScript
//// [tests/cases/compiler/extendGlobalThis2.ts] ////
|
|
|
|
//// [extendGlobalThis2.ts]
|
|
namespace globalThis {
|
|
export function foo() { console.log("x"); }
|
|
}
|
|
|
|
|
|
//// [extendGlobalThis2.js]
|
|
"use strict";
|
|
var globalThis;
|
|
(function (globalThis) {
|
|
function foo() { console.log("x"); }
|
|
globalThis.foo = foo;
|
|
})(globalThis || (globalThis = {}));
|