/** * Attempts every shutdown step and preserves failures in execution order. * Caught values are intentionally opaque because JavaScript permits throwing * values that are not `Error` instances. * @param {object} args - Shutdown steps. * @param {string} args.message - Aggregate error message. * @param {Array<() => void | Promise>} args.steps - Ordered steps to attempt. * @returns {Promise} - Resolves when every step succeeds. */ export declare function runShutdownSteps({ message, steps }: { message: string; steps: Array<() => void | Promise>; }): Promise; /** * Runs service shutdown and its completion hook while preserving both failures. * @param {object} args - Lifecycle callbacks. * @param {() => Promise} args.shutdown - Primary service shutdown. * @param {() => void | Promise} [args.onStopped] - Completion hook. * @returns {Promise} - Resolves after shutdown and the hook finish. */ export default function shutdownLifecycle({ shutdown, onStopped }: { shutdown: () => Promise; onStopped?: () => void | Promise; }): Promise; //# sourceMappingURL=shutdown-lifecycle.d.ts.map