Agenda - v6.0.0
    Preparing search index...

    Interface DebounceOptions

    Options for debouncing job execution. Debouncing delays job execution and resets the timer on subsequent saves, ensuring the job only runs once after a quiet period.

    interface DebounceOptions {
        delay: number;
        maxWait?: number;
        strategy?: "trailing" | "leading";
    }
    Index

    Properties

    delay: number

    Debounce window in milliseconds. The job will be scheduled to run this many ms after the last save.

    maxWait?: number

    Maximum time to wait before forcing execution (in milliseconds). If set, the job will execute within maxWait even if new saves keep coming. Without maxWait, continuous saves could delay execution indefinitely.

    strategy?: "trailing" | "leading"

    Debounce strategy:

    • 'trailing' (default): Execute after quiet period ends (last call wins)
    • 'leading': Execute immediately on first call, ignore subsequent calls during window