template-saas/apps/backend/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.d.ts
rckrdmrd 26f0e52ca7 feat: Initial commit - template-saas
Template base para proyectos SaaS multi-tenant.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React/Vite)
- apps/database (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:24 -06:00

22 lines
745 B
TypeScript

/**
* Options for configuring shutdown hooks behavior.
*
* @publicApi
*/
export interface ShutdownHooksOptions {
/**
* If true, uses `process.exit()` instead of `process.kill(process.pid, signal)`
* after shutdown hooks complete. This ensures the 'exit' event is properly
* triggered, which is required for async loggers (like Pino with transports)
* to flush their buffers before the process terminates.
*
* Note: Using `process.exit()` will:
* - Change the exit code (e.g., SIGTERM: 143 → 0)
* - May not trigger other signal handlers from third-party libraries
* - May affect orchestrator (Kubernetes, Docker) behavior
*
* @default false
*/
useProcessExit?: boolean;
}