Skip to content

Commit

Permalink
Add bytes() to Blob (#13166)
Browse files Browse the repository at this point in the history
  • Loading branch information
huseeiin authored Aug 8, 2024
1 parent 9d74b5b commit 3aaa240
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/bun-types/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,10 @@ declare global {
* closely to the `BodyMixin` API.
*/
formData(): Promise<FormData>;
/**
* Returns a promise that resolves to the contents of the blob as a Uint8Array (array of bytes) its the same as `new Uint8Array(await blob.arrayBuffer())`
*/
bytes(): Promise<Uint8Array>;
}
var Blob: typeof globalThis extends {
onerror: any;
Expand Down

0 comments on commit 3aaa240

Please sign in to comment.