2014-07-13 01:04:16 +02:00
|
|
|
//// [nameCollision.ts]
|
|
|
|
module A {
|
|
|
|
// these 2 statements force an underscore before the 'A'
|
|
|
|
// in the generated function call.
|
|
|
|
var A = 12;
|
|
|
|
var _A = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
module B {
|
|
|
|
var A = 12;
|
|
|
|
}
|
|
|
|
|
|
|
|
module B {
|
|
|
|
// re-opened module with colliding name
|
|
|
|
// this should add an underscore.
|
|
|
|
class B {
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module X {
|
|
|
|
var X = 13;
|
|
|
|
export module Y {
|
|
|
|
var Y = 13;
|
|
|
|
export module Z {
|
|
|
|
var X = 12;
|
|
|
|
var Y = 12;
|
|
|
|
var Z = 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Y.Y {
|
|
|
|
export enum Y {
|
|
|
|
Red, Blue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// no collision, since interface doesn't
|
|
|
|
// generate code.
|
|
|
|
module D {
|
|
|
|
export interface D {
|
|
|
|
id: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export var E = 'hello';
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [nameCollision.js]
|
|
|
|
var A;
|
2015-02-11 00:03:28 +01:00
|
|
|
(function (_A_1) {
|
2014-08-12 00:54:12 +02:00
|
|
|
// these 2 statements force an underscore before the 'A'
|
|
|
|
// in the generated function call.
|
2014-07-13 01:04:16 +02:00
|
|
|
var A = 12;
|
|
|
|
var _A = '';
|
|
|
|
})(A || (A = {}));
|
|
|
|
var B;
|
|
|
|
(function (B) {
|
|
|
|
var A = 12;
|
|
|
|
})(B || (B = {}));
|
|
|
|
var B;
|
2014-07-19 02:04:06 +02:00
|
|
|
(function (_B) {
|
2014-08-14 15:42:18 +02:00
|
|
|
// re-opened module with colliding name
|
|
|
|
// this should add an underscore.
|
2014-07-13 01:04:16 +02:00
|
|
|
var B = (function () {
|
|
|
|
function B() {
|
|
|
|
}
|
|
|
|
return B;
|
|
|
|
})();
|
|
|
|
})(B || (B = {}));
|
|
|
|
var X;
|
2014-07-19 02:04:06 +02:00
|
|
|
(function (_X) {
|
2014-07-13 01:04:16 +02:00
|
|
|
var X = 13;
|
2014-09-07 02:40:19 +02:00
|
|
|
var Y;
|
2014-07-19 02:04:06 +02:00
|
|
|
(function (_Y) {
|
2014-07-13 01:04:16 +02:00
|
|
|
var Y = 13;
|
2014-09-07 02:40:19 +02:00
|
|
|
var Z;
|
2014-07-19 02:04:06 +02:00
|
|
|
(function (_Z) {
|
2014-07-13 01:04:16 +02:00
|
|
|
var X = 12;
|
|
|
|
var Y = 12;
|
|
|
|
var Z = 12;
|
2014-09-07 02:40:19 +02:00
|
|
|
})(Z = _Y.Z || (_Y.Z = {}));
|
|
|
|
})(Y = _X.Y || (_X.Y = {}));
|
2014-07-13 01:04:16 +02:00
|
|
|
})(X || (X = {}));
|
|
|
|
var Y;
|
2015-02-11 00:03:28 +01:00
|
|
|
(function (_Y_1) {
|
2014-09-07 02:40:19 +02:00
|
|
|
var Y;
|
2015-02-11 00:03:28 +01:00
|
|
|
(function (_Y_2) {
|
2014-07-13 01:04:16 +02:00
|
|
|
(function (Y) {
|
|
|
|
Y[Y["Red"] = 0] = "Red";
|
|
|
|
Y[Y["Blue"] = 1] = "Blue";
|
2015-02-11 00:03:28 +01:00
|
|
|
})(_Y_2.Y || (_Y_2.Y = {}));
|
|
|
|
var Y = _Y_2.Y;
|
|
|
|
})(Y = _Y_1.Y || (_Y_1.Y = {}));
|
2014-07-13 01:04:16 +02:00
|
|
|
})(Y || (Y = {}));
|
2014-08-14 15:53:37 +02:00
|
|
|
// no collision, since interface doesn't
|
|
|
|
// generate code.
|
2014-07-13 01:04:16 +02:00
|
|
|
var D;
|
|
|
|
(function (D) {
|
|
|
|
D.E = 'hello';
|
|
|
|
})(D || (D = {}));
|