Skip to content
New issue

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

String enums as alternative to Numeric enums #56

Closed
exonity opened this issue Apr 9, 2019 · 2 comments
Closed

String enums as alternative to Numeric enums #56

exonity opened this issue Apr 9, 2019 · 2 comments
Milestone

Comments

@exonity
Copy link
Contributor

exonity commented Apr 9, 2019

Is it possible that the generator could be extended that it gets possible to generate string enums as an alternative to numeric enums?

Currently a generated enum looks like:

export enum Status {
  Enabled,
  Disabled
}

What I like / need is:

export enum Status {
  Enabled = 'Enabled',
  Disabled = 'Disabled'
}

Cheers Markus

@dzuvic
Copy link
Owner

dzuvic commented Apr 10, 2019

That's actually a great idea. I discussed a similar issue with my former colleges and concluded adding an option to generate simple classes or interfaces instead of an enum.

@dzuvic
Copy link
Owner

dzuvic commented Mar 13, 2021

fixed with 0.5.0

Thank you for your contribution.

@dzuvic dzuvic closed this as completed Mar 13, 2021
@dzuvic dzuvic added this to the 0.5.0 milestone Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants