fix(streams): tighten stream typings and guard optional runtime paths for duplex and wrapper utilities
This commit is contained in:
@@ -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.'
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user