diff options
Diffstat (limited to 'node_modules/signal-exit/dist/cjs/index.d.ts')
-rw-r--r-- | node_modules/signal-exit/dist/cjs/index.d.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/node_modules/signal-exit/dist/cjs/index.d.ts b/node_modules/signal-exit/dist/cjs/index.d.ts new file mode 100644 index 0000000..18a4cc6 --- /dev/null +++ b/node_modules/signal-exit/dist/cjs/index.d.ts @@ -0,0 +1,37 @@ +/// <reference types="node" /> +import { signals } from './signals.js'; +export { signals }; +/** + * A function that takes an exit code and signal as arguments + */ +export type Handler = (code: number | null | undefined, signal: NodeJS.Signals | null) => any; +export declare const +/** + * Called when the process is exiting, whether via signal, explicit + * exit, or running out of stuff to do. + * + * If the global process object is not suitable for instrumentation, + * then this will be a no-op. + * + * Returns a function that may be used to unload signal-exit. + */ +onExit: (cb: Handler, opts?: { + alwaysLast?: boolean | undefined; +} | undefined) => () => void, +/** + * Load the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ +load: () => void, +/** + * Unload the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ +unload: () => void; +//# sourceMappingURL=index.d.ts.map
\ No newline at end of file |