We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is somewhat similar to #24, but applies when using UseString with Flags enums.
[Flags] [TsEnum(IncludeNamespace = false, UseString = true)] public enum UserGroup { None = 0x00, Administrator = 0x01, Standard = 0x02, Restricted = 0x04, Guest = 0x08, RestrictedAndLower = Restricted | Guest, Default = Standard, }
The typescript will give us:
export enum UserGroupExample { None = "None", Administrator = "Administrator", Standard = "Standard", Default = "Default", Restricted = "Restricted", Guest = "Guest", RestrictedAndLower = "RestrictedAndLower" }
Note that the link between Default and Standard, and the one between RestrictedAndLower and Restricted and Guest is lost.
Ideally, I would have expected something like:
export enum UserGroupExample { None = "None", Administrator = "Administrator", Standard = "Standard", Default = "Standard", Restricted = "Restricted", Guest = "Guest", RestrictedAndLower = ["Restricted", "Guest"] }
I think having a single value for Standard/Default is quite uncontroversial.
But I understand that not everyone would want RestrictedAndLower to become an array without opt-in.
I'm not sure if that's a bug or a feature request...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is somewhat similar to #24, but applies when using UseString with Flags enums.
The typescript will give us:
Note that the link between Default and Standard, and the one between RestrictedAndLower and Restricted and Guest is lost.
Ideally, I would have expected something like:
I think having a single value for Standard/Default is quite uncontroversial.
But I understand that not everyone would want RestrictedAndLower to become an array without opt-in.
I'm not sure if that's a bug or a feature request...
The text was updated successfully, but these errors were encountered: