interface DuplexOptions {
    allowHalfOpen?: boolean;
    autoDestroy?: boolean;
    decodeStrings?: boolean;
    defaultEncoding?: BufferEncoding;
    emitClose?: boolean;
    encoding?: BufferEncoding;
    highWaterMark?: number;
    objectMode?: boolean;
    readableHighWaterMark?: number;
    readableObjectMode?: boolean;
    signal?: AbortSignal;
    writableCorked?: number;
    writableHighWaterMark?: number;
    writableObjectMode?: boolean;
    construct(this: Duplex, callback: (error?: null | Error) => void): void;
    destroy(
        this: Duplex,
        error: null | Error,
        callback: (error?: null | Error) => void,
    ): void;
    final(this: Duplex, callback: (error?: null | Error) => void): void;
    read(this: Duplex, size: number): void;
    write(
        this: Duplex,
        chunk: any,
        encoding: BufferEncoding,
        callback: (error?: null | Error) => void,
    ): void;
    writev(
        this: Duplex,
        chunks: { chunk: any; encoding: BufferEncoding }[],
        callback: (error?: null | Error) => void,
    ): void;
}

Hierarchy (View Summary)

Properties

allowHalfOpen?: boolean
autoDestroy?: boolean
decodeStrings?: boolean
defaultEncoding?: BufferEncoding
emitClose?: boolean
encoding?: BufferEncoding
highWaterMark?: number
objectMode?: boolean
readableHighWaterMark?: number
readableObjectMode?: boolean
signal?: AbortSignal

When provided the corresponding AbortController can be used to cancel an asynchronous action.

writableCorked?: number
writableHighWaterMark?: number
writableObjectMode?: boolean

Methods

  • Parameters

    • this: Duplex
    • callback: (error?: null | Error) => void

    Returns void

  • Parameters

    • this: Duplex
    • error: null | Error
    • callback: (error?: null | Error) => void

    Returns void

  • Parameters

    • this: Duplex
    • callback: (error?: null | Error) => void

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • this: Duplex
    • chunks: { chunk: any; encoding: BufferEncoding }[]
    • callback: (error?: null | Error) => void

    Returns void