fix(streams): tighten stream typings and guard optional runtime paths for duplex and wrapper utilities

This commit is contained in:
2026-04-30 12:04:51 +00:00
parent f78469a299
commit fccd0f86ad
19 changed files with 1687 additions and 4247 deletions
+2 -2
View File
@@ -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,