Create a TimeoutRunner to run tasks (promises) with timeout
Sample:
await xaa.timeout(1000, "timeout fetching data").run(() => fetch(url)) Copy
await xaa.timeout(1000, "timeout fetching data").run(() => fetch(url))
with promises:
await xaa.timout(1000).run([promise1, promise2]) Copy
await xaa.timout(1000).run([promise1, promise2])
number of milliseconds to allow tasks to run
message to reject with when timeout triggers
TimeoutRunner object
Create a TimeoutRunner to run tasks (promises) with timeout
Sample:
with promises: