You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In summary, the main objection seems to be the loss of the "closed" property of Enums. With enum extension, client code looses the quality that it can be sure of complete coverage of members.
The text was updated successfully, but these errors were encountered:
Indeed we could use inheritance. The cost being some complexity in code using enums that may have to support annotations when building values. How important is this feature really?
Feature Request ποΈ
I want to prompt a discussion about the extension of enumerated types as a feature in a type systems
Use Case
Consider the following...
Alternative
An alternative solution would be to allow a users define new types through copying rather than extension. E.g.
Context
This discussion for the same feature in TypeScript is useful reference, microsoft/TypeScript#17592
In summary, the main objection seems to be the loss of the "closed" property of Enums. With enum extension, client code looses the quality that it can be sure of complete coverage of members.
The text was updated successfully, but these errors were encountered: