mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
864 B
TypeScript
46 lines
864 B
TypeScript
//// [tests/cases/compiler/exportImportAndClodule.ts] ////
|
|
|
|
//// [exportImportAndClodule.ts]
|
|
namespace K {
|
|
export class L {
|
|
constructor(public name: string) { }
|
|
}
|
|
export namespace L {
|
|
export var y = 12;
|
|
export interface Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
}
|
|
}
|
|
namespace M {
|
|
export import D = K.L;
|
|
}
|
|
var o: { name: string };
|
|
var o = new M.D('Hello');
|
|
var p: { x: number; y: number; }
|
|
var p: M.D.Point;
|
|
|
|
//// [exportImportAndClodule.js]
|
|
"use strict";
|
|
var K;
|
|
(function (K) {
|
|
class L {
|
|
constructor(name) {
|
|
this.name = name;
|
|
}
|
|
}
|
|
K.L = L;
|
|
(function (L) {
|
|
L.y = 12;
|
|
})(L = K.L || (K.L = {}));
|
|
})(K || (K = {}));
|
|
var M;
|
|
(function (M) {
|
|
M.D = K.L;
|
|
})(M || (M = {}));
|
|
var o;
|
|
var o = new M.D('Hello');
|
|
var p;
|
|
var p;
|