@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
10 lines (9 loc) • 512 B
TypeScript
import { TransformTyped } from '../stream.model';
export interface TransformMapMultiOptions {
}
/**
* Like Mapper, but allows to emit multiple (or 0) results by calling a callback function.
* Error throwing works as normal (just `throw` it).
*/
export declare type MultiMapper<IN = any, OUT = any> = (input: IN, index: number, cb: (out: OUT) => any) => any;
export declare function transformMapMulti<IN = any, OUT = any>(mapper: MultiMapper<IN, OUT>, opt?: TransformMapMultiOptions): TransformTyped<IN, OUT>;