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

Types missing Uint8Array.prototype.toBase64 #16062

Open
canadaduane opened this issue Dec 30, 2024 · 0 comments
Open

Types missing Uint8Array.prototype.toBase64 #16062

canadaduane opened this issue Dec 30, 2024 · 0 comments
Labels
bug Something isn't working types An issue with TypeScript types

Comments

@canadaduane
Copy link

What version of Bun is running?

1.1.42+50eec0025

What platform is your computer?

Linux 6.9.3-76060903-generic x86_64 x86_64

What steps can reproduce the bug?

The following code snippet shows a type error indicating toBase64 is not a function of a Uint8Array:

const data = Uint8Array.from([0]);
console.log(data.toBase64());

The code compiles and runs correctly, however, so it appears to be just a type issue.

What is the expected behavior?

The type system should acknowledge that toBase64 is a function available to a Uint8Array instance.

What do you see instead?

Red squiggly line under toBase64

Additional information

The types are also probably missing for Uint8Array.fromBase64() and Uint8Array.prototype.setFromBase64().

@canadaduane canadaduane added bug Something isn't working types An issue with TypeScript types labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working types An issue with TypeScript types
Projects
None yet
Development

No branches or pull requests

1 participant