Summary
Extending ReadableStream throws "Base constructors must all have the same return type" error
Expected vs. Actual Behavior
Extending ReadableStream should be allowed (as mentioned in whatwg/streams#160 and whatwg/streams#965), but changes in #1362 cause a TS error when trying to do that
class A extends ReadableStream {
// ^ Base constructors must all have the same return type. ts(2510)
}
Playground Link
https://www.typescriptlang.org/play/?#code/MYGwhgzhAECC0FMAeAXBA7AJjASgsmYARiAgMooBO+AttAN4BQjAvkA
Browser Support
Have Tried The Latest Releases
Additional Context
No response
Summary
Extending
ReadableStreamthrows "Base constructors must all have the same return type" errorExpected vs. Actual Behavior
Extending
ReadableStreamshould be allowed (as mentioned in whatwg/streams#160 and whatwg/streams#965), but changes in #1362 cause a TS error when trying to do thatPlayground Link
https://www.typescriptlang.org/play/?#code/MYGwhgzhAECC0FMAeAXBA7AJjASgsmYARiAgMooBO+AttAN4BQjAvkA
Browser Support
Have Tried The Latest Releases
@types/web.Additional Context
No response