UNPKG

@push.rocks/smartstream

Version:

A library to simplify the creation and manipulation of Node.js streams, providing utilities for handling transform, duplex, and readable/writable streams effectively in TypeScript.

9 lines (8 loc) 507 B
/// <reference types="node" resolution-mode="require"/> import { type TransformOptions } from 'stream'; import { SmartDuplex } from './smartstream.classes.smartduplex.js'; export interface AsyncTransformFunction<TInput, TOutput> { (chunkArg: TInput): Promise<TOutput>; } export declare function createTransformFunction<TInput, TOutput>(asyncFunction: AsyncTransformFunction<TInput, TOutput>, options?: TransformOptions): SmartDuplex; export declare const createPassThrough: () => SmartDuplex<any, any>;