/// <reference types="node" />
import { Runtime } from "./runtime";
import { Readable, Writable } from "stream";
import { ivm } from ".";
export interface StreamInfo {
    stream: Readable;
    addedAt: number;
    readLength: number;
    endedAt: number;
    readTimeout: NodeJS.Timer;
}
export declare const streams: {
    [key: string]: StreamInfo;
};
export interface StreamOptions {
    readTimeout?: number;
}
export declare const streamManager: {
    add(rt: Runtime, stream: Readable, opts?: StreamOptions): number;
    subscribe(rt: Runtime, id: string | number, cb: ivm.Reference<Function>): void;
    read(rt: Runtime, id: string | number, cb: ivm.Reference<Function>): void;
    pipe(rt: Runtime, id: string | number, dst: Writable): void;
};
