Skip to content

Remove enums from core api #6

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

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Remove enums from core api #6

merged 1 commit into from
Aug 26, 2022

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Aug 23, 2022

enums are a pain in the core api because they don't go away when compiled to javascript, meaning you always have to have some version of the core api just to use the enums. String union types are better because they do go away, meaning you're not actually using any javascript from the core api when you reference them. It took some tedious changes in the worker, but I was able to get rid of the enums.

Prime example: With enums we had to create a mock test api. Without enums, I can get rid of setupTestCoreApi completely! (Related to @hossam-nasr's comment here)

@ejizba ejizba merged commit 52945a3 into v3.x Aug 26, 2022
@ejizba ejizba deleted the ej/enumless branch August 26, 2022 00:46
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

Successfully merging this pull request may close these issues.

2 participants