Fix formatting
This commit is contained in:
@@ -35,7 +35,7 @@ export class AsyncPushIterator<T> {
|
||||
// `start`'s `this` is the underlying source object when using a plain method.
|
||||
// An arrow function captures the class instance so the controller is stored here.
|
||||
this.stream = new ReadableStream({
|
||||
start: (controller: ReadableStreamDefaultController<T>) => {
|
||||
start: (controller: ReadableStreamDefaultController<T>): void => {
|
||||
this.controller = controller;
|
||||
},
|
||||
});
|
||||
@@ -76,7 +76,7 @@ export class AsyncPushIterator<T> {
|
||||
* Uses `preventCancel: true` so early `break` from `for await...of` does not
|
||||
* close the stream and block later pushes.
|
||||
*/
|
||||
[Symbol.asyncIterator]() {
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<T> {
|
||||
return this.stream.values({ preventCancel: true });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user