Skip to content
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(types): declare ReadableStream type without requiring dom #3889

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

AllanZhengYP
Copy link
Contributor

@AllanZhengYP AllanZhengYP commented Aug 29, 2022

Issue

Resolves: #3807
Resolves: #3063
Resolves: #2522

#2896 will be fixed in follow-up PR with similar fix.

Description

The SDK clients have reference to ReadableStream interface only available in dom. It causes building issue for users that don't have dependency over dom. This is a minimal fix to eliminate error TS2304: Cannot find name 'ReadableStream'. How it works is decribed in microsoft/TypeScript#31894.

Testing

Manual test with repro:
#3063 (comment)

Additional context

This can be removed when TypeScript comes up with solution that supports runtime-specific types.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AllanZhengYP AllanZhengYP merged commit 061b5f5 into aws:main Aug 30, 2022
@santialbo
Copy link

Hi @AllanZhengYP, this didn't fix #2522. The error was a runtime error due to ReadableStream not being defined on the global object on Nodejs.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants