-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
Issue with response resolver types after recent upgrade #2121
Comments
I'm seeing a similar error with the latest version. I'm mocking all graphql operations against a schema as defined in the docs: https://mswjs.io/docs/recipes/mock-graphql-schema , but that exact code snippet doesn't pass the typescript check. The error is :
I suspect this stems from the change in #2107 |
Update: I was able to fix the type errors by adjusting Not sure if this is totally right, but in terms of how I'm using this (wanting type inference working via |
Unsure if this is related, but I was seeing this issue if I had an arrow function return instead of just returning the HttpResponse method. E.g. this has the error
But this does not
|
Hi,
Love MSW thanks for all your hard work!
I'm struggling with types and hoping there's a simple tweak here.
We have a light abstraction over
server.use
for usage in our tests:We were just on 2.2.10 where it was working fine, and now seeing a type error on the
resolverCb
callback:For context, the helper is called like so:
Any insight is appreciated, thanks!
The text was updated successfully, but these errors were encountered: