2020-04-02 01:36:28 +02:00
|
|
|
//// [tests/cases/compiler/moduleAugmentationEnumClassMergeOfReexportIsError.ts] ////
|
|
|
|
|
|
|
|
//// [file.ts]
|
|
|
|
export class Foo {
|
|
|
|
member: string;
|
|
|
|
}
|
|
|
|
//// [reexport.ts]
|
|
|
|
export * from "./file";
|
|
|
|
//// [augment.ts]
|
|
|
|
import * as ns from "./reexport";
|
|
|
|
|
|
|
|
declare module "./reexport" {
|
|
|
|
export enum Foo {
|
|
|
|
A, B, C
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare const f: ns.Foo; //is this the enum or the class? should be an error.
|
|
|
|
|
|
|
|
|
|
|
|
//// [file.js]
|
|
|
|
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
|
|
exports.Foo = void 0;
|
|
|
|
var Foo = /** @class */ (function () {
|
|
|
|
function Foo() {
|
|
|
|
}
|
|
|
|
return Foo;
|
|
|
|
}());
|
|
|
|
exports.Foo = Foo;
|
|
|
|
//// [reexport.js]
|
|
|
|
"use strict";
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
o[k2] = m[k];
|
|
|
|
}));
|
|
|
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
2020-04-14 00:34:34 +02:00
|
|
|
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
2020-05-12 13:27:01 +02:00
|
|
|
};
|
2020-04-02 01:36:28 +02:00
|
|
|
exports.__esModule = true;
|
|
|
|
__exportStar(require("./file"), exports);
|
|
|
|
//// [augment.js]
|
|
|
|
"use strict";
|
|
|
|
exports.__esModule = true;
|