import { shouldBlockAppUpdate } from "@/lib/app/appUpdateTaskGuard"; interface DownloadedUpdateInstallOptions { getActiveTaskCount: () => number; install: () => Promise; } export async function installDownloadedUpdateWhenIdle(options: DownloadedUpdateInstallOptions): Promise { if (shouldBlockAppUpdate(options.getActiveTaskCount())) return false; await options.install(); return true; }