/** * timer-callback-async-needs-catch — flag fire-and-forget promise chains inside * a timer callback (`setInterval` / `setTimeout` / `setImmediate`) that lack a * `.catch` (or a two-argument `.then`). * * **Why:** a timer callback runs detached from any caller. If a promise it * starts rejects and nothing handles the rejection, Node treats it as an * unhandled rejection and (by default, Node 15+) **terminates the host * process**. A `setInterval` heartbeat that crashes the process is exactly the * class of bug that produces a bare `ELIFECYCLE` / worker crash with no * assertion. * * **The gap this closes:** ESLint's `no-floating-promises` treats a leading * `void` as an explicit opt-out, and the sibling `detached-promises` check * treats `.finally` as "handled" — so `void p.finally(...)` slips through both * even though `.finally` re-throws a rejection. This check is scoped to timer * callbacks (high signal, where an unhandled rejection is fatal) and, unlike * those, does NOT accept `void` or `.finally` as sufficient — only a real * rejection handler (`.catch`, or `.then(onFulfilled, onRejected)`) counts. */ import { type CheckViolation } from '@opensip-cli/fitness'; /** Direct detection entry (no test-file skip) — exported for unit tests. */ export declare function analyzeTimerCallbacks(content: string, filePath: string): CheckViolation[]; export declare const timerCallbackAsyncNeedsCatch: import("@opensip-cli/fitness").Check; //# sourceMappingURL=timer-callback-async-needs-catch.d.ts.map