From a395596883e3918f800918687e6b2e1727927c46 Mon Sep 17 00:00:00 2001 From: Harvmaster Date: Sun, 19 Jul 2026 14:03:09 +0000 Subject: [PATCH] Fix formatting --- source/sse-session/async-push-iterator.ts | 4 ++-- test/sse-session/async-push-iterator.test.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/sse-session/async-push-iterator.ts b/source/sse-session/async-push-iterator.ts index a09a60f..29736ea 100644 --- a/source/sse-session/async-push-iterator.ts +++ b/source/sse-session/async-push-iterator.ts @@ -35,7 +35,7 @@ export class AsyncPushIterator { // `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) => { + start: (controller: ReadableStreamDefaultController): void => { this.controller = controller; }, }); @@ -76,7 +76,7 @@ export class AsyncPushIterator { * Uses `preventCancel: true` so early `break` from `for await...of` does not * close the stream and block later pushes. */ - [Symbol.asyncIterator]() { + [Symbol.asyncIterator](): AsyncIterableIterator { return this.stream.values({ preventCancel: true }); } } diff --git a/test/sse-session/async-push-iterator.test.ts b/test/sse-session/async-push-iterator.test.ts index ac5c36c..e110b5c 100644 --- a/test/sse-session/async-push-iterator.test.ts +++ b/test/sse-session/async-push-iterator.test.ts @@ -24,7 +24,7 @@ const testPushComposedPushAndConsume = async (): Promise => { const iterator = new AsyncPushIterator(); const result = new Promise((resolve) => { - void (async () => { + void (async (): Promise => { resolve(await collectAll(iterator)); })(); }); @@ -62,7 +62,7 @@ const testPushComposedResolvesWithNoValues = async (): Promise => { const iterator = new AsyncPushIterator(); const result = new Promise((resolve) => { - void (async () => { + void (async (): Promise => { resolve(await collectAll(iterator)); })(); }); @@ -79,7 +79,7 @@ const testPushComposedIgnoresValuesAfterClose = async (): Promise => { const iterator = new AsyncPushIterator(); const result = new Promise((resolve) => { - void (async () => { + void (async (): Promise => { resolve(await collectAll(iterator)); })(); }); @@ -106,14 +106,14 @@ const testPushComposedRejectsMultipleConsumers = async (): Promise => { const successfulIterator = (): Promise => new Promise((resolve) => { - void (async () => { + void (async (): Promise => { resolve(await collectAll(iterator)); })(); }); const failedIterator = (): Promise => new Promise((resolve, reject) => { - void (async () => { + void (async (): Promise => { try { /* eslint-disable-next-line */ for await (const _value of iterator) {