export type BackgroundJobStop = () => void | Promise; export declare function registerBackgroundJobStop(stop: BackgroundJobStop): void; export declare function stopBackgroundJobs(timeoutMs?: number): Promise;