Skip to content

Enums are not renamed causing runtime error #11

@87vrvk9k

Description

@87vrvk9k

Enum members are not renamed, but member access is renamed resulting in potential runtime errors.

export enum TestEnum {
  Test1,
  Test2,
  Test3,
}

Results in:

export var TestEnum;
(function (TestEnum) {
    TestEnum[TestEnum["Test1"] = 0] = "Test1";
    TestEnum[TestEnum["Test2"] = 1] = "Test2";
    TestEnum[TestEnum["Test3"] = 2] = "Test3";
})(TestEnum || (TestEnum = {}));

Member access results in:

console.log(TestEnum._internal_Test1);

Which does not exist.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions