• The setInterval() method repeatedly calls a function, with a fixed time delay between each call. This method returns an interval ID which uniquely identifies the interval, so you can remove it later by calling clearInterval().

    Returns

    A numeric, non-zero value which identifies the timer created; this value can be passed to clearInterval() to cancel the interval.

    See

    setInterval on MDN

    Type Parameters

    • TArgs extends any[]

    Parameters

    • callback: ((...args: TArgs) => void)

      A function to be called every delay milliseconds. The first call happens after delay milliseconds.

        • (...args: TArgs): void
        • Parameters

          • Rest ...args: TArgs

          Returns void

    • Optional delay: number

      The time, in milliseconds, that the timer should delay in between calls of the specified function. Defaults to 0 if not specified.

    • Rest ...args: TArgs

      Additional arguments which are passed through to the callback function.

    Returns number

Generated using TypeDoc