five.promise
Opened this issue · 1 comments
Cormanz commented
I'm a major consumer of APIs that are asynchronous (like discord.js
) and wanted to make a Five discord bot. You should implement five.promise
like so:
five.promise = () = new Promise(resolve => {
setTimeout(() => resolve(5), 0);
});
bl9l commented
Yeah! We need to follow modern trends. Btw here even more modern realization.
five.promise = () = new Promise(resolve => {
requestAnimationFrame(() => resolve(5));
});