UNPKG

@piggly/fastify-chassis

Version:

An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.

18 lines (17 loc) 653 B
/** * Process uncaught error. * * It will wait for: * - EventBus cleanup; * - LoggerService flush and cleanup. * * You may not need to cleanup classes above when using this. * * @deprecated Use GracefulShutdownService instead. It will be removed in the next major version. * @param {() => Promise<number>} beforeExit * @param {number} exitCode Used when beforeExit is not provided. Default is 0. * @returns The callback function. * @since 5.1.0 * @author Caique Araujo <caique@piggly.com.br> */ export declare const processUncaught: (beforeExit?: () => Promise<number>, exitCode?: number) => (reason: any, origin: any) => Promise<never>;