/// import { Duplex } from "readable-stream"; import type { Readable, Writable } from "stream"; import { BufferEncoding } from "./interfaces"; import Substream from "./substream"; export declare const IGNORE_SUBSTREAM: unique symbol; export type Stream = Readable | Writable; interface Chunk { name: string; data: unknown; } export declare class ObjectMultiplex extends Duplex { _substreams: Record; getStream: (name: string) => Substream | symbol; constructor(opts?: Record); createStream(name: string): Substream; ignoreStream(name: string): void; _read(): void; _write(chunk: Chunk, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void; } export declare function setupMultiplex(stream: Duplex): ObjectMultiplex; export {};