From 8bcfc03d71cbd2cfd7ab68035ec0968d9f93b5b8 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Thu, 23 Apr 2020 00:06:51 +1000 Subject: Rewrite streams (#4842) --- cli/js/web/request.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cli/js/web/request.ts') diff --git a/cli/js/web/request.ts b/cli/js/web/request.ts index 75f66b7cc..8fe93babe 100644 --- a/cli/js/web/request.ts +++ b/cli/js/web/request.ts @@ -1,9 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import * as body from "./body.ts"; import * as domTypes from "./dom_types.d.ts"; -import * as streams from "./streams/mod.ts"; - -const { ReadableStream } = streams; +import { ReadableStreamImpl } from "./streams/readable_stream.ts"; function byteUpperCase(s: string): string { return String(s).replace(/[a-z]/g, function byteUpperCaseReplace(c): string { @@ -124,8 +122,8 @@ export class Request extends body.Body implements domTypes.Request { let body2 = this._bodySource; - if (this._bodySource instanceof ReadableStream) { - const tees = (this._bodySource as domTypes.ReadableStream).tee(); + if (this._bodySource instanceof ReadableStreamImpl) { + const tees = this._bodySource.tee(); this._stream = this._bodySource = tees[0]; body2 = tees[1]; } -- cgit v1.2.3