Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/others/throttle

Index

Functions

Functions

Const throttle

  • throttle<T, A>(fn: (...args: A[]) => T, ms?: number): throttled
  • Creates a throttled function that only invokes func at most once per every wait milliseconds.

    Type parameters

    • T

    • A

    Parameters

    • fn: (...args: A[]) => T
        • (...args: A[]): T
        • Parameters

          • Rest ...args: A[]

          Returns T

    • Default value ms: number = 0

    Returns throttled

    {{ (...args: A[]): Promise; cancel(): void; }}

Generated using TypeDoc