-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Description
Standard enum output is pretty complex.
// Input
enum ElementTypes {
ELEMENT,
COMPONENT,
SLOT,
TEMPLATE
}
// Output
var ElementTypes = /* @__PURE__ */ ((ElementTypes2) => {
ElementTypes2[ElementTypes2["ELEMENT"] = 0] = "ELEMENT";
ElementTypes2[ElementTypes2["COMPONENT"] = 1] = "COMPONENT";
ElementTypes2[ElementTypes2["SLOT"] = 2] = "SLOT";
ElementTypes2[ElementTypes2["TEMPLATE"] = 3] = "TEMPLATE";
return ElementTypes2;
})(ElementTypes || {});
But most of the time we just want a simple output.
// Input
enum ElementTypes {
ELEMENT,
COMPONENT,
SLOT,
TEMPLATE
}
// Output
var ElementTypes = {
ELEMENT: 0,
COMPONENT: 1,
SLOT: 2,
TEMPLATE: 3
}
Many people mentioned this in #128 as well.
Metadata
Metadata
Assignees
Labels
No labels