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

    Type Parameters

    Hierarchy (View Summary)

    Index

    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: T
      • callback: (error?: Error | null) => void

      Returns void

    • Parameters

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

      Returns void

    • Parameters

      • this: T
      • size: number

      Returns void

    • Parameters

      • this: T
      • chunk: any
      • encoding: BufferEncoding
      • callback: (error?: Error | null) => void

      Returns void

    • Parameters

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

      Returns void

    • Parameters

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

      Returns void