@pleisto/active-support

    Variable throttleConst

    throttle: <TArgs extends any[]>(
        { interval }: { interval: number },
        func: (...args: TArgs) => any,
    ) => ThrottledFunction<TArgs>

    Given an interval and a function returns a new function that will only call the source function if interval milliseconds have passed since the last invocation

    Type declaration

      • <TArgs extends any[]>(
            { interval }: { interval: number },
            func: (...args: TArgs) => any,
        ): ThrottledFunction<TArgs>
      • Type Parameters

        • TArgs extends any[]

        Parameters

        • { interval }: { interval: number }
        • func: (...args: TArgs) => any

        Returns ThrottledFunction<TArgs>

    MMNEPVFCICPMFPCPTTAAATR