Bagas runs to the market on a deadline from Mrs. Sari’s stopwatch: AbortSignal.timeout calls him back by itself, AbortSignal.any joins in Mr. Tono’s cancel…
The key idea
A signal that aborts by itself, with its own reason
Try it in this playground
See a TimeoutError The request outlasts its limit: AbortSignal.timeout aborts it with a TimeoutError.
See a limit with no effect The request finishes first: the timeout signal still aborts, but nothing is disturbed.
See a false alarm from a hand-made timer Without clearTimeout, 'waktu habis' prints after the egg is in.
Clear the timer clearTimeout in a finally: after a success, nothing goes off any more.