diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-14 09:23:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 09:23:07 -0400 |
commit | ff60b311299e11d1cf761b29e38ea54ad1744bff (patch) | |
tree | 5605e043c1769991ad0f6d6b9113c56f23c0ddba /cli/js/web/body.ts | |
parent | 360c05ffe7fc91058a6c8acd5ea9b4e2ed120946 (diff) |
dedup various type definitions (#4741)
FormData FilePropertyBag DomFile BlobPropertyBag RequestCache
RequestCredentials RequestDestination RequestMode RequestRedirect
ResponseType
Diffstat (limited to 'cli/js/web/body.ts')
-rw-r--r-- | cli/js/web/body.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/js/web/body.ts b/cli/js/web/body.ts index f4fc4a3e2..717b02e29 100644 --- a/cli/js/web/body.ts +++ b/cli/js/web/body.ts @@ -1,11 +1,9 @@ -import * as formData from "./form_data.ts"; import * as blob from "./blob.ts"; import * as encoding from "./text_encoding.ts"; import * as domTypes from "./dom_types.d.ts"; import { ReadableStream } from "./streams/mod.ts"; // only namespace imports work for now, plucking out what we need -const { FormData } = formData; const { TextEncoder, TextDecoder } = encoding; const DenoBlob = blob.DenoBlob; @@ -19,7 +17,7 @@ interface ReadableStreamController { export type BodySource = | Blob | BufferSource - | domTypes.FormData + | FormData | URLSearchParams | domTypes.ReadableStream | string; @@ -162,7 +160,7 @@ export class Body implements domTypes.Body { } // ref: https://fetch.spec.whatwg.org/#body-mixin - public async formData(): Promise<domTypes.FormData> { + public async formData(): Promise<FormData> { const formData = new FormData(); const enc = new TextEncoder(); if (hasHeaderValueOf(this.contentType, "multipart/form-data")) { |