import type { Predicate } from "@rickosborne/typical"; import type { LogLike } from "./logger.js"; export interface CatchAndOptions { logIf?: Predicate | undefined; logger?: LogLike | undefined; message?: string | undefined; prefix?: string | undefined; rethrow?: boolean | undefined; rethrowIf?: Predicate | undefined; returnSupplier?: ((err: unknown) => T) | undefined; returnValue?: T | undefined; } type CatchAndReturn> = O extends { returnValue: infer U; } ? U : O extends { returnSupplier: ((err: unknown) => infer U); } ? U : O extends { rethrow: true; } ? never : undefined; /** * Catch block builder to reduce the noise of thorough error handling. */ export declare const catchAnd: >(options?: O) => (err: unknown) => CatchAndReturn; export {}; //# sourceMappingURL=catch-and.d.ts.map