import type { DataSourceResultFnFailure } from '../data-source.types'; import type { DataSourceFnBuilder } from './data-source-fn-builder.types'; import type { WithOnFailure } from './with-on-failure.types'; /** * Adds an onFailureFn and corresponding types to a DataSourceFnBuilder. * When the function is called and fails, the onFailureFn will also * be called. This is intended for side effects. Errors thrown in the * onFailureFn will be caught and won't override the error of the fn itself. * * @param onFailureFn - Called after the built function is called and fails * @return void */ export declare const withOnFailure: (onFailureFn: (failure: DataSourceResultFnFailure) => void) => (builder: BuilderType) => BuilderType & import("./with-on-failure.types").WithOnFailureFn; /** * A type guard to determine if a builder has an onFailureFn. * * @param builder - Any DataSourceFnBuilder * @return boolean */ export declare const hasOnFailureFn: (builder?: BuilderType | undefined) => builder is BuilderType & import("./with-on-failure.types").WithOnFailureFn;