Skip to content

feat: Get rid of enums.#287

Merged
ShogunPanda merged 3 commits into
nodejs:mainfrom
ShogunPanda:no-enums
Jan 30, 2024
Merged

feat: Get rid of enums.#287
ShogunPanda merged 3 commits into
nodejs:mainfrom
ShogunPanda:no-enums

Conversation

@ShogunPanda

Copy link
Copy Markdown
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

Uzlopak commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

Done, what about now?

@Uzlopak

Uzlopak commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

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 ;).

@Uzlopak Uzlopak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

:)

@ShogunPanda

Copy link
Copy Markdown
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
@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