Files
koc-loop/lib/background.ts
2026-08-11 23:07:26 +08:00

12 lines
245 B
TypeScript

export function runInBackground(
operation: Promise<unknown>,
label: string,
) {
void operation.catch((error) => {
console.error(
`[KOC LOOP] ${label} failed`,
error instanceof Error ? error.message : error,
);
});
}