Open jacquesg opened 7 months ago
Hi, @jacquesg! Thanks for reporting this. This looks like a bug and we should fix it.
Do you mind writing a simple type test for this? Putting it somewhere in this test suite would be the best. You can then open a PR with a failing test and we can investigate it from there. Let me know if that sounds interesting to you!
Hi @kettanaito, I've submitted PR #2132.
I shared a solution and my concerns with it in the PR.
Prerequisites
Environment check
msw
versionNode.js version
v20.12.1
Reproduction repository
https://codesandbox.io/p/sandbox/friendly-pare-8tkfgz?file=%2Fmocks%2Fhandlers.ts
Reproduction steps
npx tsc
Current behavior
Adding a
return HttpResponse.error()
results in a TS error:Expected behavior
No error.