import type { MutableRefObject } from 'react'; import type { Binding, ReadonlyBinding } from 'react-bindings'; import type { UseWaitableOnFailureCallback, UseWaitableOnSuccessCallback } from '../types/args'; import type { WaitablePrimaryFunction } from '../types/primary-function'; /** * Updates the error or value bindings for a waitable by running the primary function. * * This function: * * - marks the waitable as having been run * - marks the waitable as busy * - runs the primary function, with callbacks that directly affect the waitable's value and error bindings * - marks the waitable as no longer busy * * If an uncaught error is thrown, the value and error bindings are unaffected but the waitable's busy state will be cleared */ export declare const updateWaitableBindingsWithPrimaryFunction: ({ id, primaryFunc, isBusy, error, value, alreadyRanFunc, resetCount, onSuccess, onFailure }: { id: string; isBusy: Binding; primaryFunc: WaitablePrimaryFunction; error: Binding; value: Binding; alreadyRanFunc: MutableRefObject; resetCount: ReadonlyBinding; onSuccess: UseWaitableOnSuccessCallback | undefined; onFailure: UseWaitableOnFailureCallback | undefined; }) => void | Promise; //# sourceMappingURL=update-waitable-bindings-with-primary-function.d.ts.map