diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-03-29 04:03:49 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 13:03:49 -0400 |
commit | bced52505f32d6cca4f944bb610a8a26767908a8 (patch) | |
tree | da49a5df4b7bd6f8306248069228cd6bd0db1303 /cli/js/web/body.ts | |
parent | 1397b8e0e7c85762e19d88fde103342bfa563360 (diff) |
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'cli/js/web/body.ts')
-rw-r--r-- | cli/js/web/body.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/web/body.ts b/cli/js/web/body.ts index 03c35848a..a16f872b9 100644 --- a/cli/js/web/body.ts +++ b/cli/js/web/body.ts @@ -124,7 +124,7 @@ export const BodyUsedError = "Failed to execute 'clone' on 'Body': body is already used"; export class Body implements domTypes.Body { - protected _stream: domTypes.ReadableStream | null; + protected _stream: domTypes.ReadableStream<string | ArrayBuffer> | null; constructor(protected _bodySource: BodySource, readonly contentType: string) { validateBodyType(this, _bodySource); @@ -148,8 +148,8 @@ export class Body implements domTypes.Body { start(controller: ReadableStreamController): void { controller.enqueue(bodySource); controller.close(); - } - }); + }, + }) as domTypes.ReadableStream<ArrayBuffer | string>; } return this._stream; } @@ -247,7 +247,7 @@ export class Body implements domTypes.Body { if (dispositionParams.has("filename")) { const filename = dispositionParams.get("filename")!; const blob = new DenoBlob([enc.encode(octets)], { - type: partContentType + type: partContentType, }); // TODO: based on spec // https://xhr.spec.whatwg.org/#dom-formdata-append |