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

const enums can't be used after code is transpiled #884

Closed
TimoGlastra opened this issue Jun 19, 2022 · 0 comments · Fixed by #888
Closed

const enums can't be used after code is transpiled #884

TimoGlastra opened this issue Jun 19, 2022 · 0 comments · Fixed by #888
Milestone

Comments

@TimoGlastra
Copy link
Contributor

TimoGlastra commented Jun 19, 2022

We've started using const enums in a few places throughout the framework. Although lighter, I've noticed they can't be used after code is transpiled (in react native which uses a custom ts compiler I think).

Due to this I think it may be better to keep using normal enums for now (to stay consistent across the framework). We can then later look at using other types of enum methods that can be used outside of AFJ (in consumer code).

more info: https://ncjamieson.com/dont-export-const-enums/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant