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
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartstream',
version: '3.4.1',
version: '3.4.2',
description: '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.'
}
+4 -1
View File
@@ -112,7 +112,10 @@ export class WebDuplexStream<TInput = any, TOutput = any> extends TransformStrea
};
try {
await this.options.readFunction(tools);
const readFunction = this.options.readFunction;
if (readFunction) {
await readFunction(tools);
}
if (doneSignaled) {
await writer.close();
}