const countdown = new Countdown();
countdown.start(10_000)
.then(() => console.log("Okey Dokey!"))
.catch(() => console.log("Nooope!"));
// [...]
countdown.stop(new Error());
This caused the program to crash with an uncaught exception.
This shouldn't be the case; the exception should be caught with the .catch statement.
Am I missing something?
This caused the program to crash with an uncaught exception.
This shouldn't be the case; the exception should be caught with the
.catchstatement.Am I missing something?