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(setupServer): infer function args and return in ".boundary()" #2100

Closed
wants to merge 1 commit into from

Conversation

kettanaito
Copy link
Member

'error',
{
types: {
Function: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

A little of eslint magic to allow Function as a type.

boundary<Fn extends (...args: Array<any>) => unknown>(
callback: Fn,
): (...args: Parameters<Fn>) => ReturnType<Fn>
boundary<T>(callback: T & Function): T & Function
Copy link
Member Author

Choose a reason for hiding this comment

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

@kettanaito kettanaito marked this pull request as draft March 18, 2024 17:41
@kettanaito
Copy link
Member Author

The build won't compile. Mentioned here: #2069 (comment)

@kettanaito
Copy link
Member Author

Released: v2.2.9 🎉

This has been released in v2.2.9!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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.

Infering the boundary callback arguments
1 participant