Using Typescript lib es2024 and arrayBuffer, types are hard to use #2388
Labels
bug
Something isn't working
needs:triage
Issues that have not been investigated yet.
scope:node
Related to MSW running in Node
Prerequisites
Environment check
msw
versionNode.js version
v22.12.0
Reproduction repository
https://github.com/danilofuchs/examples/blob/main/index.ts
Reproduction steps
es2024
oresnext
to use features such asObject.groupBy
readFile
or create a mocked buffer usingBuffer.from("fake-file")
HttpResponse.arrayBuffer
Current behavior
Typescript does not allow, but msw accepts it in runtime:
Expected behavior
Previous lib versions works as expected
This is due to the introduction of
SharedArrayBuffer
in lib es2024Using the output of readFileSync is documented as supported by msw:
The text was updated successfully, but these errors were encountered: