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

Hierarchy (view full)

Properties

signal?: AbortSignal

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

emitClose?: boolean
highWaterMark?: number
objectMode?: boolean
autoDestroy?: boolean
encoding?: BufferEncoding
decodeStrings?: boolean
defaultEncoding?: BufferEncoding
allowHalfOpen?: boolean
readableObjectMode?: boolean
writableObjectMode?: boolean
readableHighWaterMark?: number
writableHighWaterMark?: number
writableCorked?: number

Methods

  • Parameters

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

          • Optionalerror: Error

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    • this: Duplex
    • chunk: any
    • encoding: BufferEncoding
    • callback: ((error?: Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: Error

          Returns void

    Returns void

  • Parameters

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

          • Optionalerror: Error

          Returns void

    Returns void

  • Parameters

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

          • Optionalerror: Error

          Returns void

    Returns void

  • Parameters

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

          • Optionalerror: Error

          Returns void

    Returns void