You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ReadableStreamReaderGenericInitialize only uses the type of ReadableStream, it doesn't actually need to call that constructor.
Even if it did call it, it's still fine as long as it doesn't do it while the module is being loaded.
They don't cause a miscompilation, and the resulting bundle still works fine (as evidenced by the CI passing all the tests).
Now, I do agree that it's better if we can avoid these warnings. Previously that wasn't possible, but nowadays TypeScript has type-only imports (import type { ... } from '...') which I think can help Rollup better understand that there isn't actually a circular dependency. I'll see if that would help.
Ah, there are some other non-type-only imports too. 😅
generic-reader.ts imports ReadableStreamCancel from readable-stream.ts
default-reader.ts imports IsReadableStreamLocked from readable-stream.ts
validators/readable-stream.ts imports IsReadableStream from readable-stream.ts
I guess I should move some of these functions out of readable-stream.ts and into a separate module instead to "break" these cycles. But since it's more of an internal stylistic issue, it's not on the top of my to-do list. I'll get around to it at some point (probably if/when I need to rewrite/restructure that code), but not right now.
Hi,
On building this package with rollup, I got errors below,
Any fixes?
The text was updated successfully, but these errors were encountered: