@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.
13 lines (12 loc) • 662 B
TypeScript
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import * as plugins from './smartstream.plugins.js';
import { Duplex, type DuplexOptions } from 'stream';
export declare class SmartStream extends Duplex {
private observableSubscription?;
constructor(options?: DuplexOptions);
_read(size: number): void;
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
static fromBuffer(buffer: Buffer, options?: DuplexOptions): SmartStream;
static fromObservable(observable: plugins.smartrx.rxjs.Observable<any>, options?: DuplexOptions): SmartStream;
}