import type { MutableRefObject } from 'react'; import type { Binding, ReadonlyBinding } from 'react-bindings'; import type { TypeOrPromisedType } from '../../resolveable/types'; import type { UseWaitableOnSuccessCallback } from '../types/args'; import type { WaitablePrimaryFunction } from '../types/primary-function'; /** * Updates the error or value bindings for a waitable in the case where the waitable's primary function is also used as its default value * producer. * * This function: * * - marks the waitable as having been run * - marks the waitable as busy * - set error to undefined * - runs the primary function * - if the waitable hasn't otherwise been updated before the value was produced, the waitable's value is updated with the result * - marks the waitable as no longer busy * * If there's an error, the waitable is soft reset so the primary function can be rerun. */ export declare const updateWaitableBindingsWithPrimaryFunctionForDefaultValue: ({ primaryFunc, isBusy, error, value, alreadyRanFunc, resetCount, softReset, onSuccess }: { isBusy: Binding; primaryFunc: WaitablePrimaryFunction; error: Binding; value: Binding; alreadyRanFunc: MutableRefObject; resetCount: ReadonlyBinding; softReset: () => void; onSuccess: UseWaitableOnSuccessCallback | undefined; }) => TypeOrPromisedType; //# sourceMappingURL=update-waitable-bindings-with-primary-function-for-default-value.d.ts.map