summaryrefslogtreecommitdiff
path: root/cli/js/web/streams/readable-stream.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-29 04:03:49 +1100
committerGitHub <noreply@github.com>2020-03-28 13:03:49 -0400
commitbced52505f32d6cca4f944bb610a8a26767908a8 (patch)
treeda49a5df4b7bd6f8306248069228cd6bd0db1303 /cli/js/web/streams/readable-stream.ts
parent1397b8e0e7c85762e19d88fde103342bfa563360 (diff)
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'cli/js/web/streams/readable-stream.ts')
-rw-r--r--cli/js/web/streams/readable-stream.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/js/web/streams/readable-stream.ts b/cli/js/web/streams/readable-stream.ts
index e062c278e..50753260d 100644
--- a/cli/js/web/streams/readable-stream.ts
+++ b/cli/js/web/streams/readable-stream.ts
@@ -11,18 +11,18 @@ import {
QueuingStrategy,
QueuingStrategySizeCallback,
UnderlyingSource,
- UnderlyingByteSource
+ UnderlyingByteSource,
} from "../dom_types.ts";
import {
ReadableStreamDefaultController,
- setUpReadableStreamDefaultControllerFromUnderlyingSource
+ setUpReadableStreamDefaultControllerFromUnderlyingSource,
} from "./readable-stream-default-controller.ts";
import { ReadableStreamDefaultReader } from "./readable-stream-default-reader.ts";
import {
ReadableByteStreamController,
- setUpReadableByteStreamControllerFromUnderlyingSource
+ setUpReadableByteStreamControllerFromUnderlyingSource,
} from "./readable-byte-stream-controller.ts";
import { SDReadableStreamBYOBReader } from "./readable-stream-byob-reader.ts";
@@ -123,7 +123,7 @@ export class SDReadableStream<OutputType>
return rs.readableStreamCancel(this, reason);
}
- tee(): Array<SDReadableStream<OutputType>> {
+ tee(): [SDReadableStream<OutputType>, SDReadableStream<OutputType>] {
return readableStreamTee(this, false);
}
@@ -280,7 +280,9 @@ export function readableStreamTee<OutputType>(
let branch2: SDReadableStream<OutputType>;
let cancelResolve: (reason: shared.ErrorResult) => void;
- const cancelPromise = new Promise<void>(resolve => (cancelResolve = resolve));
+ const cancelPromise = new Promise<void>(
+ (resolve) => (cancelResolve = resolve)
+ );
const pullAlgorithm = (): Promise<void> => {
return rs
@@ -362,7 +364,7 @@ export function readableStreamTee<OutputType>(
cancel2Algorithm
);
- reader[rs.closedPromise_].promise.catch(error => {
+ reader[rs.closedPromise_].promise.catch((error) => {
if (!closedOrErrored) {
rs.readableStreamDefaultControllerError(
branch1![