-
Notifications
You must be signed in to change notification settings - Fork 760
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
chore: Small cleanup to vm._emit #3396
Conversation
roninjin10
commented
May 3, 2024
- Move it to an instance method. There shouldn't be any issues with it being an instance method since the underlying event emitter is still per object.
- Make it more typesafe by taking keyof Events rather than string
- TODO meant to do this pr to master not vitest-update
I switched it over to master and looks like it's accidentally grabbed all of the commits from my PR. Maybe just cherry-pick to a new PR? |
8992865
to
320d8d1
Compare
Done! This pr is in draft only because I haven't ran any tests or typecheckers yet and my type change might break some downstream usages of the function since it's stricter now. If pr is green I'll move it out of draft. |
- Move it to an instance method. There shouldn't be any issues with it being an instance method since the underlying event emitter is still per object. - Make it more typesafe by taking keyof Events rather than string Syntax error fix broken build run linter
e2fb779
to
af0ef0c
Compare
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