-
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
refactor(jsonc): replace enum
with string union type
#3837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would changing TokenType
to a union type make more sense in this case?
IMO yes. Wasn't sure if the convetion in the codebase in general is to prefer maps over simple string unions. Will push the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you.
jsonc
moduleenum
with string union type
* feat(jsonc): replace TokenType enum with const object * refactor(jsonc): TokenType is now a union based upon TokenTypeMap * refactor(jsonc): TokenType enum to string literal union
This PR replaces the used typescript enum in the
jsonc
module with aconst object
as requested here.As this enum is only used internally, merging this change wouldn't constitute a
breaking change.
This change seems a little bit clunky but does the trick.