mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
329 B
TypeScript
26 lines
329 B
TypeScript
//// [tests/cases/compiler/global.ts] ////
|
|
|
|
//// [global.ts]
|
|
namespace M {
|
|
export function f(y:number) {
|
|
return x+y;
|
|
}
|
|
}
|
|
|
|
var x=10;
|
|
M.f(3);
|
|
|
|
|
|
|
|
//// [global.js]
|
|
"use strict";
|
|
var M;
|
|
(function (M) {
|
|
function f(y) {
|
|
return x + y;
|
|
}
|
|
M.f = f;
|
|
})(M || (M = {}));
|
|
var x = 10;
|
|
M.f(3);
|