proposal-enum
proposal-enum copied to clipboard
ADT enum proposal for ECMAScript
The README doesn't really explain what problem this proposal is setting out to solve, which makes it hard to evaluate.
close #24
Hi Jack, thanks for bringing up this proposal. It is a very interesting problem space to explore. The following comment is not an objection but something we might want to...
How does this compare to @rwaldron's https://github.com/rwaldron/proposal-enum-definitions and @rbuckton's https://github.com/rbuckton/proposal-enum ?
In the README, it is said that ADT is expected to be similar to the tagged union type in TypeScript. However, the tagged union type is just plain objects in...
Flow has different methods helpful for enum usage: https://flow.org/en/docs/enums/using-enums/#toc-methods 1) cast 2) isValid It will be wonderful to include some helpers with strict type safety in TS: ``` v =...
Strings and numbers aren't usually ideal since they don't have the formal typing semantics you usually want from enums. Symbols work well in having the correct uniqueness property, so form...