/** * CleanKill hooks the interrupt handler, and provides callbacks for your code * to cleanly shut down before the process exits. */ /** * The type of a cleankill interrupt handler. */ export declare type Handler = (doneHandling: () => void) => void; /** * Register a handler to occur on SIGINT. All handlers are passed a callback, * and the process will be terminated once all handlers complete. */ export declare function onInterrupt(handler: Handler): void; /** * Call all interrupt handlers, and call the callback when they all complete. * * Removes the list of interrupt handlers. */ export declare function close(done: () => void): void; /** * Calls all interrupt handlers, then exits with exit code 0. * * If called more than once it skips waiting for the interrupt handlers to * finish and exits with exit code 1. * * This function is called when a SIGINT is received. */ export declare function interrupt(): void;