Skip to content

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