web-streams-polyfill
web-streams-polyfill copied to clipboard
Upgrading to Typescript 4.9 results in error TS2322 when using web-streams-polyfill
Hello!! We have a type error when do this:
window.ReadableStream = ReadableStream;
Error:
Type 'typeof ReadableStream' is not assignable to type '{ new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number | undefined; } | undefined): ReadableStream<Uint8Array>; new <R = any>(underlyingSource: UnderlyingDefaultSource<...>, strategy?: QueuingStrategy<...> | undefined): ReadableStream<...>; new <R = any>(underlyingSource?: UnderlyingSourc...'.
Types of parameters 'underlyingSource' and 'underlyingSource' are incompatible.
Type 'UnderlyingSource<any> | undefined' is not assignable to type 'UnderlyingByteSource'.
Type 'undefined' is not assignable to type 'UnderlyingByteSource'.
Do you plan to update the type? Thanks a lot!!