63 lines
1.6 KiB
JavaScript
63 lines
1.6 KiB
JavaScript
//// [ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts]
|
|
class Point {
|
|
constructor(public x: number, public y: number) { }
|
|
|
|
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
|
|
}
|
|
|
|
module Point {
|
|
export function Origin() { return null; } //expected duplicate identifier error
|
|
}
|
|
|
|
|
|
module A {
|
|
export class Point {
|
|
constructor(public x: number, public y: number) { }
|
|
|
|
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
|
|
}
|
|
|
|
export module Point {
|
|
export function Origin() { return ""; }//expected duplicate identifier error
|
|
}
|
|
}
|
|
|
|
//// [ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js]
|
|
var Point = (function () {
|
|
function Point(x, y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
Point.Origin = function () {
|
|
return { x: 0, y: 0 };
|
|
};
|
|
return Point;
|
|
})();
|
|
var Point;
|
|
(function (Point) {
|
|
function Origin() {
|
|
return null;
|
|
}
|
|
Point.Origin = Origin;
|
|
})(Point || (Point = {}));
|
|
var A;
|
|
(function (A) {
|
|
var Point = (function () {
|
|
function Point(x, y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
Point.Origin = function () {
|
|
return { x: 0, y: 0 };
|
|
};
|
|
return Point;
|
|
})();
|
|
A.Point = Point;
|
|
(function (Point) {
|
|
function Origin() {
|
|
return "";
|
|
}
|
|
Point.Origin = Origin;
|
|
})(A.Point || (A.Point = {}));
|
|
var Point = A.Point;
|
|
})(A || (A = {}));
|