When the timeout is reached, the job is canceled (throwing
CancelError to any waiting promises or jobs), unless a new timeout
is set before then. You may set a new timeout value for a job as many times
as desired. A timeout value of zero disables the timeout. Timers are
disposed of if the job is canceled or restarted.
Type Parameters
T
Parameters
ms: number
Optional: Number of milliseconds after which the job will be
canceled. Defaults to zero if not given.
Set the cancellation timeout for a job.
When the timeout is reached, the job is canceled (throwing CancelError to any waiting promises or jobs), unless a new timeout is set before then. You may set a new timeout value for a job as many times as desired. A timeout value of zero disables the timeout. Timers are disposed of if the job is canceled or restarted.