I think the usage of clearInterval() (with no arguments) is dangerous in general and should be avoided (except while playing in the Web IDE). Every module could use setInterval/setTimeout internally (and some do). I still like that clearInterval() does not remove the timer from setWatch anymore because it is a little unexpected.
Or is there any safe usecase for clearInterval(void) which I don't see?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think the usage of
clearInterval()
(with no arguments) is dangerous in general and should be avoided (except while playing in the Web IDE). Every module could usesetInterval/setTimeout
internally (and some do). I still like thatclearInterval()
does not remove the timer from setWatch anymore because it is a little unexpected.Or is there any safe usecase for clearInterval(void) which I don't see?