-
-
Notifications
You must be signed in to change notification settings - Fork 4k
types(ClientEventTypes): use Events as keys #11121
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
index.test-d.ts is full of errors due to this change.
It seems this stops strings from being used. Unsure if this is desired. @vladfrangu, any ideas?
I agree that removing the ability to use strings directly is a bad idea. But I would also like to add compatibility of the type with the Events enum, since in fact they are completely identical. |
As I see it, it comes down to the async_event_emitter's typing. I would like to understand more precisely what can and should be changed there in order to keep support for raw strings |
Another problem. |
I wouldn't want this to break normal strings, so if it does... I am -1 on this |
Please describe the changes this PR makes and why it should be merged:
Allow to use native Events as key for ClientEventTypes (for examle
ClientEventTypes[Events]
instead ofClientEventTypes[keyof ClientEventTypes]
)Status and versioning classification: