import { type HealthCheckContract, type HealthCheckReport } from './types.ts'; /** * The HealthChecks class acts as a repository and a runner to register and execute * health checks * * @example * ```typescript * const healthChecks = new HealthChecks() * * healthChecks.register([ * new DiskSpaceCheck().warnWhenExceeds(70).failWhenExceeds(85), * new MemoryHeapCheck().warnWhenExceeds('200 mb').failWhenExceeds('500 mb') * ]) * * const report = await healthChecks.run() * console.log(report.isHealthy) // true or false * ``` */ export declare class HealthChecks { #private; /** * Registers health checks. Any existing health checks will be * removed during the register method call * * @param checks - Array of health checks to register * * @example * ```typescript * const healthChecks = new HealthChecks() * healthChecks.register([ * new DiskSpaceCheck(), * new MemoryHeapCheck() * ]) * ``` */ register(checks: HealthCheckContract[]): this; /** * Appends a new set of health checks to the existing ones * * @param checks - Array of health checks to append * * @example * ```typescript * const healthChecks = new HealthChecks() * healthChecks.register([new DiskSpaceCheck()]) * healthChecks.append([new MemoryHeapCheck()]) // Adds to existing checks * ``` */ append(checks: HealthCheckContract[]): this; /** * Executes all the checks in parallel and returns the * health check report * * @example * ```typescript * const healthChecks = new HealthChecks() * const report = await healthChecks.run() * * console.log(report.isHealthy) // true or false * console.log(report.status) // 'ok' | 'warning' | 'error' * console.log(report.checks) // Array of check results * ``` */ run(): Promise; }