Cannot find name 'ReadableStream' when compiling project with file-type dependency
nickshater opened this issue · 2 comments
nickshater commented
Getting this typescript compilation error after the recent changes to this code. Looked at the recently merged PR and saw some discussion around something like this. Is there a workaround or something I should be doing here, or am I doing something wrong?
error TS2552: Cannot find name 'ReadableStream'. Did you mean 'WebReadableStream'?
12 export type AnyWebReadableStream<G> = WebReadableStream<G> | ReadableStream<G>;
~~~~~~~~~~~~~~
Found 1 error in node_modules/file-type/core.d.ts:12
Borewit commented
ReadableStream
should be provided by the DOM API Typings.
In your tsconfig.json
file, ensure that the "lib"
property includes "dom"
.
Borewit commented
I assume the issue has been addressed, otherwise re-open the issue.