dedup various type definitions (#4741)

FormData FilePropertyBag DomFile BlobPropertyBag RequestCache 
RequestCredentials RequestDestination RequestMode RequestRedirect 
ResponseType
This commit is contained in:
Ryan Dahl 2020-04-14 09:23:07 -04:00 committed by GitHub
parent 360c05ffe7
commit ff60b31129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 158 deletions

View file

@ -103,7 +103,7 @@ function toUint8Arrays(
function processBlobParts(
blobParts: BlobPart[],
options: domTypes.BlobPropertyBag
options: BlobPropertyBag
): Uint8Array {
const normalizeLineEndingsToNative = options.ending === "native";
// ArrayBuffer.transfer is not yet implemented in V8, so we just have to
@ -171,7 +171,7 @@ export class DenoBlob implements Blob {
readonly size: number = 0;
readonly type: string = "";
constructor(blobParts?: BlobPart[], options?: domTypes.BlobPropertyBag) {
constructor(blobParts?: BlobPart[], options?: BlobPropertyBag) {
if (arguments.length === 0) {
this[bytesSymbol] = new Uint8Array();
return;