-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TS error in entry-server - make Passthrough a ReadableStream #7361
Conversation
🦋 Changeset detectedLatest commit: 0cdde9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -47,11 +47,12 @@ function handleBotRequest( | |||
onAllReady() { | |||
shellRendered = true; | |||
const body = new PassThrough(); | |||
const webBody = Readable.toWeb(body) as ReadableStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cast seems to be required due to the underlying generic, but I couldn't find a way to get them to align without the as
.
Type 'ReadableStream<T>' is missing the following properties from type 'ReadableStream<ArrayBufferView | undefined>':
values, [Symbol.asyncIterator]ts(2345)
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Now that we're strictly using web fetch/streams and we no longer export the
fetch
API out through@remix-run/node
(#7293), we are also using the globally availableResponse
constructor inentry.server.tsx
(#7271). TS doesn't allow a nodePassThrough
stream to be passed directly, so we need to convert it to a web stream using node'sReadable.toWeb()
utility.Closes: #7357