diff options
Diffstat (limited to 'cli/js/web/blob.ts')
-rw-r--r-- | cli/js/web/blob.ts | 13 |
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; |