Skip to content

Const enums shouldn't be emitted after inlining #1632

@mjbvz

Description

@mjbvz

Follow up on #1599

Steps to reproduce

const enum A {
    B = 1
}

const a = A.B

Behavior with typescript@5.8

The enum is inlined and then the enum itself is not emitted:

const a = 1 /* A.B */;

Behavior with tsgo

The enum is still emitted

var A;
(function (A) {
    A[A["B"] = 1] = "B";
})(A || (A = {}));
const a = 1 /* A.B */;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: EmitRelated to emit, AST printing, Program emit funcsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions