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: make TextEncoder.prototype.encode return Uint8Array<ArrayBuffer> #1893

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsherret
Copy link

It's surprising that this repo has zero references to Uint8Array<ArrayBuffer> given how disruptive the change is for typed arrays.

For microsoft/TypeScript#60846

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@@ -934,7 +934,7 @@ interface TextEncoder extends TextEncoderCommon {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
*/
encode(input?: string): Uint8Array;
encode(input?: string): Uint8Array<ArrayBuffer>;
Copy link
Author

Choose a reason for hiding this comment

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

This is wrong for TS 5.5. The minimum should be TS 5.7. How do I deal with this?

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.

1 participant