From 881be9a6e7b9332ef433093bfc15655f393c38ff Mon Sep 17 00:00:00 2001 From: Avril Date: Sat, 12 Feb 2022 15:53:07 +0000 Subject: [PATCH] Fix syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for async-timeout-js's current commit: Blessing − 吉 --- asynctimeout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asynctimeout.js b/asynctimeout.js index bfd5df1..6cc469b 100644 --- a/asynctimeout.js +++ b/asynctimeout.js @@ -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() })();