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

feat: Get rid of enums. #287

Merged
merged 3 commits into from
Jan 30, 2024
Merged

feat: Get rid of enums. #287

merged 3 commits into from
Jan 30, 2024

Conversation

ShogunPanda
Copy link
Contributor

@Uzlopak I had to remove -r in the test run script to avoid starting a REPL locally. Was yours a leftover or am I missing someting?

@Uzlopak
Copy link
Contributor

Uzlopak commented Jan 30, 2024

@ShogunPanda
Oh! I thought this is how it fixes the windows test. But it works now. So everything went well. Nice.

I would not call the interface Enum. Maybe TokenDict or something like this.

@ShogunPanda
Copy link
Contributor Author

Done, what about now?

@Uzlopak
Copy link
Contributor

Uzlopak commented Jan 30, 2024

I dont know how strict you want your IntDict to actually be.

This is when you want them to be more strict. Typescript Playground

Thats why I wrote, that you would basically duplicate the code, once as an interface and once for the the Object.

But this is just fyi. If you like it more strict, than this is the way to go. Or maybe not. Your decision ;).

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

:)

@ShogunPanda
Copy link
Contributor Author

Since we use them internally (as llhttp it not published anymore on NPM) I don't it cares too much.
Eventually we can revisit in the future. Merging this.

@ShogunPanda ShogunPanda merged commit a3186f7 into nodejs:main Jan 30, 2024
11 checks passed
@ShogunPanda ShogunPanda deleted the no-enums branch January 30, 2024 10:22
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