Simple utility function to wait: export async function wait(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); }