Interface AsyncTransformOptions<T>

interface AsyncTransformOptions<T> {
    allowHalfOpen?: boolean;
    autoDestroy?: boolean;
    decodeStrings?: boolean;
    defaultEncoding?: BufferEncoding;
    emitClose?: boolean;
    encoding?: BufferEncoding;
    flush?: ((this: Transform) => unknown);
    highWaterMark?: number;
    objectMode?: boolean;
    readableHighWaterMark?: number;
    readableObjectMode?: boolean;
    signal?: AbortSignal;
    transform?: ((this: Transform, data: T, encoding: string) => unknown);
    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;
}

Type Parameters

  • T = unknown

Hierarchy

  • DuplexOptions
    • AsyncTransformOptions

Properties

allowHalfOpen?: boolean
autoDestroy?: boolean
decodeStrings?: boolean
defaultEncoding?: BufferEncoding
emitClose?: boolean
encoding?: BufferEncoding
flush?: ((this: Transform) => unknown)

Performs any final actions after the source has ended

highWaterMark?: number
objectMode?: boolean
readableHighWaterMark?: number
readableObjectMode?: boolean
signal?: AbortSignal

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

transform?: ((this: Transform, data: T, encoding: string) => unknown)

Transforms data from the source by calling the push method

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

Methods

  • Parameters

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

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

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

          • error: null | Error

          Returns void

    Returns void

  • Parameters

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

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

    • this: Duplex
    • size: number

    Returns void

  • Parameters

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

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

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

          • Optionalerror: null | Error

          Returns void

    Returns void