UNPKG

when-exit

Version:

Execute a function right before the process, or the browser's tab, is about to exit.

12 lines (11 loc) 316 B
import type { Callback, Disposer } from '../types.js'; declare class Interceptor { private callbacks; private exited; constructor(); exit: (signal?: string) => void; hook: () => void; register: (callback: Callback) => Disposer; } declare const _default: Interceptor; export default _default;