Skip to content

Commit 3100efb

Browse files
refactor: abortable sync as well
1 parent 1fd36ea commit 3100efb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/nodejs-lib/src/stream/pipeline.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { createAbortableSignal } from '@naturalcycles/js-lib'
88
import { _passthroughPredicate } from '@naturalcycles/js-lib/types'
99
import type {
1010
AbortableAsyncMapper,
11+
AbortableMapper,
1112
AsyncIndexedMapper,
1213
AsyncPredicate,
1314
END,
@@ -437,7 +438,7 @@ export class Pipeline<T = unknown> {
437438
}
438439

439440
async forEachSync(
440-
fn: IndexedMapper<T, void | typeof END>,
441+
fn: AbortableMapper<T, void>,
441442
opt: TransformMapSyncOptions<T, void> & TransformLogProgressOptions<T> = {},
442443
): Promise<void> {
443444
this.transforms.push(

0 commit comments

Comments
 (0)