Skip to content

Enums are not transpliling correctly #524

@agubler

Description

@agubler

Bug

The enums in widgets that use the keyword const in their declaration are not transpiled correctly.

Removing the const keyword ensures that they are correctly transpiled.

Example Enum declarations:

// This does not transpile correctly
export const enum BrokenEnum { 
    a = 0
}

// transpiles correctly
export enum CorrectEnum { 
    a = 0
}

Transpiled output (missing BrokenEnum):

define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var CorrectEnum;
    (function (CorrectEnum) {
        CorrectEnum[CorrectEnum["a"] = 0] = "a";
    })(CorrectEnum = exports.CorrectEnum || (exports.CorrectEnum = {}));
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions