Trilium Backend API
    Preparing search index...

    Interface DuplexOptions<T>

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

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    allowHalfOpen?: boolean
    autoDestroy?: boolean
    construct?: (this: T, callback: (error?: Error) => void) => void
    decodeStrings?: boolean
    defaultEncoding?: BufferEncoding
    destroy?: (this: T, error: Error, callback: (error?: Error) => void) => void
    emitClose?: boolean
    encoding?: BufferEncoding
    final?: (this: T, callback: (error?: Error) => void) => void
    highWaterMark?: number
    objectMode?: boolean
    read?: (this: T, size: number) => void
    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
    write?: (
        this: T,
        chunk: any,
        encoding: BufferEncoding,
        callback: (error?: Error) => void,
    ) => void
    writev?: (
        this: T,
        chunks: { chunk: any; encoding: BufferEncoding }[],
        callback: (error?: Error) => void,
    ) => void