Sign up (with export icon)

utils/delay

Api-module icon module

Interfaces

Functions

  • Chevron-right icon

    delay( func, wait ) → DelayedFunc<T>

    Returns a function wrapper that will trigger a function after a specified wait time. The timeout can be canceled by calling the cancel function on the returned wrapped function.

    Type parameters

    T : extends ( args: Array<any> ) => any

    Parameters

    func : T

    The function to wrap.

    wait : number

    The timeout in ms.

    Returns

    DelayedFunc<T>