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

[renderers] Support enum with custom number indexes #79

Open
lorisleiva opened this issue Jun 19, 2024 · 0 comments
Open

[renderers] Support enum with custom number indexes #79

lorisleiva opened this issue Jun 19, 2024 · 0 comments
Labels
proposal Suggesting a change / new feature

Comments

@lorisleiva
Copy link
Member

If enum variants have custom discriminator values, we should consider using them when generating the enum in JavaScript or Rust.

enum MyEnum {
  First = 1,
  Second,
  Fifth = 5,
}

The same goes for discriminated unions in JavaScript which is going to be a combination of the type discriminator and/or the codec's options.

@lorisleiva lorisleiva added the proposal Suggesting a change / new feature label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Suggesting a change / new feature
Projects
None yet
Development

No branches or pull requests

1 participant