-
Notifications
You must be signed in to change notification settings - Fork 632
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
tracking: remove use of TypeScript enums #3782
Comments
Has this been fixed? if not, can I fix it. |
Great! Yep, it's still available. Would you like me to assign you? |
Yes |
hi, is this is still open? (Seems to be without assignee). Could I take a stab at this? Would it be possible to convert the tasks into individual issues or would you prefer to just reference the tracking issue in the individual prs? |
Best that we tackle them in separate PRs and reference this issue. |
@iuioiua They are all in progress now. |
Thank you for completing these, @realpha. The help is very much appreciated. |
The main reason is that objects align more with native JavaScript than enums. There are also other technical reasons for objects being more desirable over enums. Union types may also work, depending on the scenario.
Enums show up in the following spots:
enum Status
in favour ofSTATUS_CODES
object #3781)Note: the
enum
s in front_matter/_format.ts and archive/_common.ts are deliberately omitted as the corresponding implementations will soon be deprecated.References:
The text was updated successfully, but these errors were encountered: