diff options
Diffstat (limited to 'cli/js/web/body.ts')
-rw-r--r-- | cli/js/web/body.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/js/web/body.ts b/cli/js/web/body.ts index 2f6987592..7e398a535 100644 --- a/cli/js/web/body.ts +++ b/cli/js/web/body.ts @@ -10,7 +10,6 @@ const { Headers } = headers; // only namespace imports work for now, plucking out what we need const { FormData } = formData; const { TextEncoder, TextDecoder } = encoding; -const Blob = blob.DenoBlob; const DenoBlob = blob.DenoBlob; type ReadableStreamReader = domTypes.ReadableStreamReader; @@ -21,8 +20,8 @@ interface ReadableStreamController { } export type BodySource = - | domTypes.Blob - | domTypes.BufferSource + | Blob + | BufferSource | domTypes.FormData | domTypes.URLSearchParams | domTypes.ReadableStream @@ -161,8 +160,8 @@ export class Body implements domTypes.Body { return false; } - public async blob(): Promise<domTypes.Blob> { - return new Blob([await this.arrayBuffer()]); + public async blob(): Promise<Blob> { + return new DenoBlob([await this.arrayBuffer()]); } // ref: https://fetch.spec.whatwg.org/#body-mixin |