summaryrefslogtreecommitdiff
path: root/cli/js/web/streams/readable_stream_default_controller.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-05-01 00:40:10 +1000
committerGitHub <noreply@github.com>2020-04-30 10:40:10 -0400
commit81c75332fbf2635f5275cc85053dc244f211471d (patch)
treeb0142c4dddf6f2ef2d6c48c0470e5bdfe822b499 /cli/js/web/streams/readable_stream_default_controller.ts
parent84d687e958ab93afb161def4a8ab47f8994307c9 (diff)
feat: Add WritableStreams (and enable ReadableStreams piping) (#4980)
Diffstat (limited to 'cli/js/web/streams/readable_stream_default_controller.ts')
-rw-r--r--cli/js/web/streams/readable_stream_default_controller.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/js/web/streams/readable_stream_default_controller.ts b/cli/js/web/streams/readable_stream_default_controller.ts
index bbdfa1f0d..0755e7765 100644
--- a/cli/js/web/streams/readable_stream_default_controller.ts
+++ b/cli/js/web/streams/readable_stream_default_controller.ts
@@ -18,10 +18,11 @@ import {
readableStreamDefaultControllerGetDesiredSize,
resetQueue,
SizeAlgorithm,
+ setFunctionName,
} from "./internals.ts";
import { ReadableStreamImpl } from "./readable_stream.ts";
import * as sym from "./symbols.ts";
-import { customInspect } from "../../web/console.ts";
+import { customInspect } from "../console.ts";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export class ReadableStreamDefaultControllerImpl<R = any>
@@ -113,8 +114,13 @@ export class ReadableStreamDefaultControllerImpl<R = any>
}
[customInspect](): string {
- return `ReadableStreamDefaultController { desiredSize: ${String(
+ return `${this.constructor.name} { desiredSize: ${String(
this.desiredSize
)} }`;
}
}
+
+setFunctionName(
+ ReadableStreamDefaultControllerImpl,
+ "ReadableStreamDefaultController"
+);