fix(streams): tighten stream typings and guard optional runtime paths for duplex and wrapper utilities
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { type TransformOptions } from 'stream';
|
||||
import { type DuplexOptions } from 'stream';
|
||||
import { SmartDuplex } from './smartstream.classes.smartduplex.js';
|
||||
|
||||
export interface AsyncTransformFunction<TInput, TOutput> {
|
||||
@@ -7,7 +7,7 @@ export interface AsyncTransformFunction<TInput, TOutput> {
|
||||
|
||||
export function createTransformFunction<TInput, TOutput>(
|
||||
asyncFunction: AsyncTransformFunction<TInput, TOutput>,
|
||||
options?: TransformOptions
|
||||
options?: DuplexOptions
|
||||
): SmartDuplex {
|
||||
const smartDuplexStream = new SmartDuplex({
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user