docx
    Preparing search index...

    Type Alias PatchDocumentOptions<T>

    Options for patching a document.

    type PatchDocumentOptions<
        T extends PatchDocumentOutputType = PatchDocumentOutputType,
    > = {
        data: InputDataType;
        keepOriginalStyles?: boolean;
        outputType: T;
        patches: Readonly<Record<string, IPatch>>;
        placeholderDelimiters?: Readonly<{ end: string; start: string }>;
        recursive?: boolean;
    }

    Type Parameters

    Index

    Properties

    The input document to patch

    keepOriginalStyles?: boolean

    Whether to preserve original text formatting

    outputType: T

    Desired output format (buffer, blob, string, etc.)

    patches: Readonly<Record<string, IPatch>>

    Map of placeholder keys to patch definitions

    placeholderDelimiters?: Readonly<{ end: string; start: string }>

    Custom delimiter characters for placeholders

    recursive?: boolean

    Whether to search for multiple occurrences of placeholders