UNPKG

when-exit

Version:

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

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