UNPKG

nanolith

Version:

Multi-threading in no time with seamless TypeScript support.

18 lines (17 loc) 599 B
/// <reference types="node" resolution-mode="require"/> import { Readable } from 'stream'; import type { Messagable } from '../types/streams.js'; /** * A `Readable` stream that allows for reading and handling data streamed * from another thread. */ export declare class ReadableFromPort<Sender extends Messagable> extends Readable { #private; /** * The object containing any meta data about the stream that can be * used to identify it. */ get metaData(): Record<any, any>; constructor(id: string, sender: Sender, metaData?: Record<any, any>); _read(): void; }