summaryrefslogtreecommitdiff
path: root/cli/js/web/request.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-04-23 00:06:51 +1000
committerGitHub <noreply@github.com>2020-04-22 10:06:51 -0400
commit8bcfc03d71cbd2cfd7ab68035ec0968d9f93b5b8 (patch)
treee1769ca51d2afde57ae18eb25b7a91388fcbf00a /cli/js/web/request.ts
parentb270d6c8d090669601465f8c9c94512d6c6a07d4 (diff)
Rewrite streams (#4842)
Diffstat (limited to 'cli/js/web/request.ts')
-rw-r--r--cli/js/web/request.ts8
1 files changed, 3 insertions, 5 deletions
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];
}