/** * State flags shared by both stream sides and the duck-typing predicates that * `node:stream` exposes for classifying arbitrary values. * @module */ export declare const kIsDestroyed: unique symbol; export declare const kIsErrored: unique symbol; export declare const kIsReadable: unique symbol; export declare const kIsWritable: unique symbol; export declare const kIsDisturbed: unique symbol; export declare const kState: unique symbol; export declare const kOnConstructed: unique symbol; export declare const kObjectMode: number; export declare const kErrorEmitted: number; export declare const kAutoDestroy: number; export declare const kEmitClose: number; export declare const kDestroyed: number; export declare const kClosed: number; export declare const kCloseEmitted: number; export declare const kErrored: number; export declare const kConstructed: number; /** Whether `value` looks like a readable Node stream. `strict` additionally requires `pause`/`resume`. */ export declare function isReadableNodeStream(value: unknown, strict?: boolean): boolean; export declare function isWritableNodeStream(value: unknown): boolean; export declare function isDuplexNodeStream(value: unknown): boolean; export declare function isNodeStream(value: unknown): boolean; export declare function isReadableStream(value: unknown): value is ReadableStream; export declare function isWritableStream(value: unknown): value is WritableStream; export declare function isTransformStream(value: unknown): value is TransformStream; export declare function isWebStream(value: unknown): boolean; export declare function isIterable(value: unknown, isAsync?: boolean): boolean; export declare function isDestroyed(stream: unknown): boolean | null; /** Whether `end()` has been called. */ export declare function isWritableEnded(stream: unknown): boolean | null; /** Whether `finish` has been emitted. With `strict === false`, an ended and drained stream counts. */ export declare function isWritableFinished(stream: unknown, strict?: boolean): boolean | null; /** Whether `push(null)` has happened. */ export declare function isReadableEnded(stream: unknown): boolean | null; /** Whether `end` has been emitted. With `strict === false`, an ended and drained stream counts. */ export declare function isReadableFinished(stream: unknown, strict?: boolean): boolean | null; export declare function isReadable(stream: unknown): boolean | null; export declare function isWritable(stream: unknown): boolean | null; export declare function isFinished(stream: unknown, opts?: { readable?: boolean; writable?: boolean; }): boolean | null; export declare function isWritableErrored(stream: unknown): Error | null; export declare function isReadableErrored(stream: unknown): Error | null; export declare function isClosed(stream: unknown): boolean | null; /** Whether `stream` is expected to emit `close` on its own, which `eos` relies on to decide what to wait for. */ export declare function willEmitClose(stream: unknown): boolean | null; /** Whether anything has been read from `stream`. */ export declare function isDisturbed(stream: unknown): boolean; export declare function isErrored(stream: unknown): boolean; /** Read by `eos()` so `finished()` works on the web streams produced here. */ /** Set by `node:stream` on the web streams it creates; lets `finished()` observe one without consuming it. */ export declare const kIsClosedPromise: unique symbol; export declare function trackClosed(stream: T, closed: Promise): T;