summaryrefslogtreecommitdiff
path: root/cli/js/web/body.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-11 16:25:31 -0400
committerGitHub <noreply@github.com>2020-04-11 16:25:31 -0400
commitda28fc1e7b4551281ad14d49c7fb396010ba0107 (patch)
tree9293ea58dda9c48e5536d7d953414c66bffb2499 /cli/js/web/body.ts
parent0641ad0d9b073f67e6f665430567d00b7f36e8a8 (diff)
dedup type declarations (#4718)
Blob, BlobPart, BufferSource, ReferrerPolicy, BlobPart, AbortSignal, AbortSignalEventMap
Diffstat (limited to 'cli/js/web/body.ts')
-rw-r--r--cli/js/web/body.ts9
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