Timeout error thrown when an operation exceeds its time limit
if (Date.now() - startTime > timeout) { throw new TimeoutError('Operation timed out after 10s');} Copy
if (Date.now() - startTime > timeout) { throw new TimeoutError('Operation timed out after 10s');}
Create a new timeout error
Description of the timeout
Optional
The timeout duration in milliseconds
Readonly
Timeout error thrown when an operation exceeds its time limit
Example