Class DebounceLeadingBehavior<T>

Debouncing behavior to queue the leading event.

See

debounce:function

Example

--a-b-c--T20-d--|

debounce(20, new DebounceLeadingBehavior())

--a----------d---

Type Parameters

  • T

Implements

Constructors

Methods

Constructors

Methods

  • This is will be called once for every chunk received and before the timer has been set.

    Parameters

    • state: Readonly<{
          ms: number;
          queued: boolean;
          timer?: number;
      }>
    • chunk: T
    • controller: TransformStreamDefaultController<T>

    Returns void | Readonly<{
        ms: number;
        queued: boolean;
        timer?: number;
    }>

Generated using TypeDoc