mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
752 B
TypeScript
41 lines
752 B
TypeScript
//// [tests/cases/compiler/functionMergedWithModule.ts] ////
|
|
|
|
//// [functionMergedWithModule.ts]
|
|
function foo(title: string) {
|
|
var x = 10;
|
|
}
|
|
|
|
namespace foo.Bar {
|
|
export function f() {
|
|
}
|
|
}
|
|
|
|
namespace foo.Baz {
|
|
export function g() {
|
|
Bar.f();
|
|
}
|
|
}
|
|
|
|
//// [functionMergedWithModule.js]
|
|
"use strict";
|
|
function foo(title) {
|
|
var x = 10;
|
|
}
|
|
(function (foo) {
|
|
var Bar;
|
|
(function (Bar) {
|
|
function f() {
|
|
}
|
|
Bar.f = f;
|
|
})(Bar = foo.Bar || (foo.Bar = {}));
|
|
})(foo || (foo = {}));
|
|
(function (foo) {
|
|
var Baz;
|
|
(function (Baz) {
|
|
function g() {
|
|
foo.Bar.f();
|
|
}
|
|
Baz.g = g;
|
|
})(Baz = foo.Baz || (foo.Baz = {}));
|
|
})(foo || (foo = {}));
|