• Creates a throttled function that only invokes the provided function at most once per every wait milliseconds.

    Type Parameters

    • T extends ((...args) => void)

    Parameters

    • func: T

      The function to throttle.

    • wait: number

      The number of milliseconds to throttle invocations to.

    Returns ((...args) => void)

    A new throttled function.

      • (...args): void
      • Parameters

        • Rest ...args: Parameters<T>

        Returns void