await sleep(1000) const sleep = (ms: number) => { return new Promise((resolve) => { setTimeout(resolve, ms); }); }