Make default type symbol
As currently proposed, default enums will have equal members. For instance:
enum COLORS {
RED,
BLUE
}
enum PLANTS {
TREE,
FERN
}
COLORS.RED === PLANTS.TREE // true
In other staticly-typed languages, this backing number is fine, since the type checker prevents these kinds of comparisons, but that is not the case in js. I mostly worry about switch statements -- if you switch on an enum with another enum or a number, it will appear to work. Not so with a symbol, which will always hit the default case.
The value of enums for me is to surface API misuse by locking down the set of acceptable values in one definition - one source of truth.
So defaulting to Symbols would aid this use-case, because it prevents equivalent values being invented/duplicated in arbitrary parts of the code base that may get out of sync with the source of truth over time.