Function nextWithTimeout

  • Returns the next IteratorResult, throwing an error if it does not happen within interval (default: 1s)

    Type Parameters

    • V

    Parameters

    • it: AsyncIterableIterator<V> | IterableIterator<V>
    • options: SleepOpts<any>

    Returns Promise<IteratorResult<V, any>>