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

Make Element.type into an enum #106

Open
lukehutch opened this issue Dec 11, 2024 · 1 comment
Open

Make Element.type into an enum #106

lukehutch opened this issue Dec 11, 2024 · 1 comment

Comments

@lukehutch
Copy link

Right now Element.type is a string. I keep running into new element types that I haven't seen before, and I have to add another else-if block to handle the additional element type. If this was an enum rather than a string, then the Dart tooling would show me which element types I still need to implement support for.

@lukehutch
Copy link
Author

Maybe add the enum as another field, typeEnum or something, so that type is still backwards-compatible.

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

1 participant