3 ms·
foo will be called only once (see my answer above). I am working on another script to achieve event streams using es6 generators let's keep in touch
by gianlucaguarini 10y ago
foo will be called only once (see my answer above). I am working on another script to achieve event streams using es6 generators let's keep in touch
- egeozcan 10y agopromisifiedWindow.setInterval(200).then(x => console.log("res:", x)); -> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} >> VM310:1 res: undefined How do you cancel the interval?
- gianlucaguarini 10y agoAt moment it's not possible and it does not make any sense to use a setInterval with a promise in return. But I will think about a simple solution to clear the timer functions
- gianlucaguarini 10y agoOk with this it should be possible https://github.com/GianlucaGuarini/allora/pull/3 https://github.com/GianlucaGuarini/allora/pull/3