Clean up
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import { Transform } from "stream";
|
||||
import { TransformOptions } from "./baseDefinitions";
|
||||
import { Transform, TransformOptions } from "stream";
|
||||
|
||||
export function flatMap<T, R>(
|
||||
mapper:
|
||||
| ((chunk: T, encoding: string) => R[])
|
||||
| ((chunk: T, encoding: string) => Promise<R[]>),
|
||||
options: TransformOptions = {
|
||||
readableObjectMode: true,
|
||||
writableObjectMode: true,
|
||||
objectMode: true,
|
||||
},
|
||||
): Transform {
|
||||
return new Transform({
|
||||
|
||||
Reference in New Issue
Block a user