import type { DataSourceFnBuilder, WithOutputType } from './data-source-fn-builder.types'; import type { WithMapOutputToType } from './with-map-output.types'; import type { OnSuccessFn, WithOnSuccess } from './with-on-success.types'; /** * Adds an onSuccessFn and corresponding types to a DataSourceFnBuilder. * When the function is called and succeeds, the onSuccessFn will also * be called. This is intended for side effects. Errors thrown in the * onSuccessFn will be caught and won't cause the function itself to fail. * * @param onSuccessFn - Called after the built function is called and succeeds * @return void */ export declare const withOnSuccess: (onSuccessFn: OnSuccessFn) => (builder: BuilderType & WithOutputType & (MapOutputToType extends never ? {} : WithMapOutputToType)) => BuilderType & WithOnSuccess; /** * A type guard to determine if a builder has an onSuccessFn. * * @param builder - Any DataSourceFnBuilder * @return boolean */ export declare const hasOnSuccessFn: (builder?: BuilderType | undefined) => builder is BuilderType & WithOnSuccess;