I'm facing the challenge of creating an enum in Typescript that mimics the functionality of Java enums. In TypeScript, only integer-based enums like C# are supported, unlike in Java where we can have custom objects with non-integer related properties within an enum. Is there a way to achieve this in Typescript without having to resort to workarounds?
My goal is to replicate an enum structure similar to this Java code snippet in Typescript:
public enum Something {
PENNY("PENNY"), NICKLE("NICKLE");
private String value;
private Something (String value) {
this.value = value;
}
};