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

fix: upgrade to strict-event-emitter@0.4.3 #382

Closed

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Jun 13, 2023

Upgrading strict-event-emitter to the same version range as in the latest MSW (1.x). Since MSW 2.x, the strict-event-emmiter is on 0.5.

@kettanaito kettanaito force-pushed the backport/0.17.20-strict-event-emitter branch from fb73793 to a88ad86 Compare June 13, 2023 13:47
export type FunctionEventMapToStrictEventEmitterMap<
Functions extends FunctionEventMap
> = {
[K in keyof Functions]: Parameters<Functions[K]>
Copy link
Member Author

Choose a reason for hiding this comment

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

EventMapType and EventMap types are different across strict-event-emitter 0.2 and 0.5. Adding this transformer type to account for that difference since the events contract in Interceptors uses Record<string, Function> index signature to allow specifying the expected return type of the events (since those can be awaited, etc).

@kettanaito kettanaito force-pushed the backport/0.17.20-strict-event-emitter branch from a88ad86 to a2006ba Compare June 13, 2023 13:50
@kettanaito kettanaito changed the title fix: upgrade to strict-event-emitter@0.5.0 fix: upgrade to strict-event-emitter@0.4.3 Jun 13, 2023
@kettanaito
Copy link
Member Author

This branch is extremely old. Closing this. If this is still relevant, we should open a new PR.

@kettanaito kettanaito closed this Apr 29, 2024
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.

None yet

1 participant