Skip to content

It is not to recognize exported variables when transforming namesapce #393

@chirsz-ever

Description

@chirsz-ever

example code:

export {}
namespace foo {
    export var bar = 'baz';
}
namespace foo {
    bar = 'foo';
}

TypeScript output:

export {};
var foo;
(function (foo) {
    foo.bar = 'baz';
})(foo || (foo = {}));
(function (foo) {
    foo.bar = 'foo';
})(foo || (foo = {}));

amaro ouput (with amaro.transformSync(src, { mode: "transform" })):

export { };
(function(foo) {
    foo.bar = 'baz';
})(foo || (foo = {}));
(function(foo) {
    bar = 'foo';
})(foo || (foo = {}));
var foo;

Related esbuild issue: evanw/esbuild#1410

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions