Skip to content

Repeated code with exporting #12076

@falsandtru

Description

@falsandtru

This repeated code is added in a few weeks.

TypeScript Version: master

Code

export class C {}
export namespace C {
  var c;
}

Expected behavior:

"use strict";
var C = (function () {
    function C() {
    }
    return C;
}());
exports.C = C;
(function (C) {
    var c;
})(C = exports.C || (exports.C = {}));

Actual behavior:

"use strict";
var C = (function () {
    function C() {
    }
    return C;
}());
exports.C = C;
(function (C) {
    var c;
})(C = exports.C || (exports.C = {}));
exports.C = C; // <- here

cf:

export namespace C {
  var c;
}
"use strict";
var C;
(function (C) {
    var c;
})(C = exports.C || (exports.C = {}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions