Skip to content

fix: make FetchResponse type compatible with a native Response object #1025

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

Merged
merged 2 commits into from
May 1, 2024

Conversation

apaleslimghost
Copy link
Member

No description provided.

@apaleslimghost apaleslimghost requested a review from a team as a code owner May 1, 2024 10:18
@@ -25,7 +25,7 @@ const { Writable } = require('node:stream');
* The response HTTP status code.
* @property {string} url
* The URL of the response.
* @property {FetchResponseBody} body
* @property {NodeFetchResponseBody | ReadableStream<Uint8Array> | null} body
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReadableStream here is the native web streams type, which comes from the DOM lib types. i'm not 100% certain how this will behave if the consumer doesn't have that lib.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually this seems to work fine in cp-content-pipeline-schema

@apaleslimghost apaleslimghost force-pushed the apaleslimghost-patch-1 branch from b3b0e2a to d4efd92 Compare May 1, 2024 10:31
This is why we've missed a few type errors.
@apaleslimghost apaleslimghost merged commit 8759e0f into main May 1, 2024
14 checks passed
@apaleslimghost apaleslimghost deleted the apaleslimghost-patch-1 branch May 1, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants