TypeScript/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.js
Sheetal Nandi 6ab3adfd43 Modified the emitComment logic to handle emitting leading or trailing spaces depending on flags
Leading comments have trailing separator while trailing comments have leading space
This removes the extra trailing space in the trailing comments
2014-08-15 14:32:08 -07:00

41 lines
924 B
JavaScript

//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts] ////
//// [module.d.ts]
declare module A {
export module Point {
export var Origin: {
x: number;
y: number;
}
}
}
//// [classPoint.ts]
module A {
export class Point {
constructor(public x: number, public y: number) { }
}
}
//// [test.ts]
var p: { x: number; y: number; }
var p = A.Point.Origin;
var p = new A.Point(0, 0); // unexpected error here, bug 840000
//// [classPoint.js]
var A;
(function (A) {
var Point = (function () {
function Point(x, y) {
this.x = x;
this.y = y;
}
return Point;
})();
A.Point = Point;
})(A || (A = {}));
//// [test.js]
var p;
var p = A.Point.Origin;
var p = new A.Point(0, 0); // unexpected error here, bug 840000