@@ -257,7 +257,7 @@ async function createUploadRequest(
257
257
await events . once ( req , 'drain' )
258
258
}
259
259
} else if ( typeof part ?. pipe === 'function' ) {
260
- // Stream data chunk-by-chunk with backpressure support
260
+ // Stream data chunk-by-chunk with backpressure support.
261
261
const stream = part as Readable
262
262
// eslint-disable-next-line no-await-in-loop
263
263
for await ( const chunk of stream ) {
@@ -273,7 +273,7 @@ async function createUploadRequest(
273
273
// eslint-disable-next-line no-await-in-loop
274
274
await events . once ( req , 'drain' )
275
275
}
276
- // Cleanup stream to free memory buffers/
276
+ // Cleanup stream to free memory buffers.
277
277
if ( typeof part . destroy === 'function' ) {
278
278
part . destroy ( )
279
279
}
@@ -410,9 +410,7 @@ function promiseWithResolvers<T>(): ReturnType<
410
410
return Promise . withResolvers < T > ( )
411
411
}
412
412
413
- // This is what the above does but it's not available in node 20 (it is in node 22)
414
- // @ts -ignore -- sigh.
415
- const obj : ReturnType < typeof Promise . withResolvers < T > > = { }
413
+ const obj = { } as ReturnType < typeof Promise . withResolvers < T > >
416
414
obj . promise = new Promise < T > ( ( resolver , reject ) => {
417
415
obj . resolve = resolver
418
416
obj . reject = reject
@@ -735,7 +733,7 @@ export class SocketSdk {
735
733
running . findIndex ( entry => entry . generator === generator ) ,
736
734
1
737
735
)
738
- // Yield the value if one is given, even when done:true
736
+ // Yield the value if one is given, even when done:true.
739
737
if ( iteratorResult . value ) {
740
738
yield iteratorResult . value
741
739
}
0 commit comments