• Helper to delay anything within an async function

    Parameters

    • ms: number

      delay in milliseconds

    Returns Promise<unknown>

    Example

    const anyAsyncFunc = async () => {
    // do something
    console.log('before delay')
    // wait for 200ms
    await delay(200)
    // and do other things
    console.log('after delay')
    }

Generated using TypeDoc