Skip to main

debounce

debounce

Signature - source.ts#L3489

function debounce<T>(
    getDurationSource: (value: T, index: number) => Source<unknown>,
    getInitialDurationRange?:
        | ((firstDebouncedValue: T, index: number) => InitialDurationInfo)
        | null,
    config?: DebounceConfig | null,
): Operator<T, T>
function debounce<T>(
    getDurationSource: undefined | null,
    getInitialDurationRange: (
        firstDebouncedValue: T,
        index: number,
    ) => InitialDurationInfo,
    config?: DebounceConfig | null,
): Operator<T, T>

DebounceConfig

Signature - source.ts#L3440

interface DebounceConfig {
    emitPendingOnEnd?: boolean | null
    leading?: boolean | null
    trailing?: boolean | DebounceTrailingRestart | null
}

defaultDebounceConfig

Signature - source.ts#L3449

var defaultDebounceConfig: DebounceConfig

InitialDurationInfo

Signature - source.ts#L3458

type InitialDurationInfo =
    | [Source<unknown>, (Source<unknown> | undefined | null)?]
    | [undefined | null, Source<unknown>]

DebounceTrailingRestart

DebounceTrailingRestart - Type

Signature - source.ts#L3431

type DebounceTrailingRestart = 'restart'

DebounceTrailingRestart - Variable

Signature - source.ts#L3435

var DebounceTrailingRestart: DebounceTrailingRestart