File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ expectType<boolean>(response.bodyUsed)
174174expectType < Promise < ArrayBuffer > > ( response . arrayBuffer ( ) )
175175expectType < Promise < Blob > > ( response . blob ( ) )
176176expectType < Promise < FormData > > ( response . formData ( ) )
177+ expectType < Promise < Uint8Array > > ( response . bytes ( ) )
177178expectType < Promise < unknown > > ( response . json ( ) )
178179expectType < Promise < string > > ( response . text ( ) )
179180expectType < Response > ( response . clone ( ) )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export class BodyMixin {
3333
3434 readonly arrayBuffer : ( ) => Promise < ArrayBuffer >
3535 readonly blob : ( ) => Promise < Blob >
36+ readonly bytes : ( ) => Promise < Uint8Array >
3637 /**
3738 * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments.
3839 * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows:
You can’t perform that action at this time.
0 commit comments