An example app showing an issue with formdata-nodes readable stream type
- ESM package
- formdata-node v6.0.3
- node v18
- TS v5.4.4
- run
npm install
- run
npm run build
expected
the build should succeed.
actual
the following error occurs
$ npx tsc
node_modules/formdata-node/lib/File-cfd9c54a.d.ts:63:15 - error TS2304: Cannot find name 'ReadableStream'.
63 stream(): ReadableStream<Uint8Array>;
~~~~~~~~~~~~~~
Found 1 error in node_modules/formdata-node/lib/File-cfd9c54a.d.ts:63
I am not sure why type is ReadableStream<Uint8Array>
and not AsyncIterable<Uint8Array>
, like it is in source.