summaryrefslogtreecommitdiff
path: root/cli/js/web/blob.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/blob.ts
parent0641ad0d9b073f67e6f665430567d00b7f36e8a8 (diff)
dedup type declarations (#4718)
Blob, BlobPart, BufferSource, ReferrerPolicy, BlobPart, AbortSignal, AbortSignalEventMap
Diffstat (limited to 'cli/js/web/blob.ts')
-rw-r--r--cli/js/web/blob.ts13
1 files changed, 5 insertions, 8 deletions
diff --git a/cli/js/web/blob.ts b/cli/js/web/blob.ts
index 90480c89c..ab6074b91 100644
--- a/cli/js/web/blob.ts
+++ b/cli/js/web/blob.ts
@@ -63,7 +63,7 @@ function collectSequenceNotCRLF(
}
function toUint8Arrays(
- blobParts: domTypes.BlobPart[],
+ blobParts: BlobPart[],
doNormalizeLineEndingsToNative: boolean
): Uint8Array[] {
const ret: Uint8Array[] = [];
@@ -102,7 +102,7 @@ function toUint8Arrays(
}
function processBlobParts(
- blobParts: domTypes.BlobPart[],
+ blobParts: BlobPart[],
options: domTypes.BlobPropertyBag
): Uint8Array {
const normalizeLineEndingsToNative = options.ending === "native";
@@ -164,17 +164,14 @@ async function readBytes(
// A WeakMap holding blob to byte array mapping.
// Ensures it does not impact garbage collection.
-export const blobBytesWeakMap = new WeakMap<domTypes.Blob, Uint8Array>();
+export const blobBytesWeakMap = new WeakMap<Blob, Uint8Array>();
-export class DenoBlob implements domTypes.Blob {
+export class DenoBlob implements Blob {
[bytesSymbol]: Uint8Array;
readonly size: number = 0;
readonly type: string = "";
- constructor(
- blobParts?: domTypes.BlobPart[],
- options?: domTypes.BlobPropertyBag
- ) {
+ constructor(blobParts?: BlobPart[], options?: domTypes.BlobPropertyBag) {
if (arguments.length === 0) {
this[bytesSymbol] = new Uint8Array();
return;