The type of the promise's resolved value.
The promise to wrap with a timeout.
Timeout duration in milliseconds.
Optional timeout error message (default: "Timeout").
A promise that resolves or rejects like the original promise, or rejects on timeout.
Wraps a promise with a timeout. If the promise does not settle within the specified time, it rejects with a
Timeout
error.