• blocks the execution of fn, if less than delta_time_ms amount of time has passed since the previous non-rejected call.

    Type Parameters

    • T extends unknown
    • ARGS extends any[]

    Parameters

    • delta_time_ms: number

      the time interval in milliseconds for throttling

    • fn: ((...args) => T)

      the function to be throttled

        • (...args): T
        • Parameters

          Returns T

    Returns ((...args) => typeof THROTTLE_REJECT | T)

    a function (that takes arguments intended for fn) that returns the value of fn if it was not throttled, otherwise a THROTTLE_REJECT symbol is returned.

Generated using TypeDoc