Fix syntax error

Fortune for async-timeout-js's current commit: Blessing − 吉
master
Avril 3 years ago
parent 05daa18891
commit 881be9a6e7
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -22,7 +22,7 @@ function AsyncTimeout(thing, interval)
} catch(e) { reject(e); }
}, interval);
});
this.interval = async function*() => {
this.interval = async function*() {
while(true) {
yield await new Promise((resolve, reject) => {
setTimeout(() => {
@ -43,4 +43,4 @@ const example = async (_timeout) => {
for await (const value of new AsyncTimeout(() => "hi forever", _timeout).interval()) { alert(value); }
};
//(async () => { example() })();

Loading…
Cancel
Save