export function safeRun(fn: () => Promise) { fn().catch((e) => { console.error(e); }); } export function sleep(ms: number): Promise { return new Promise((resolve) => { setTimeout(() => { resolve(); }, ms); }); }