import { CaptureCancellablePromise } from 'real-cancellable-promise'; /** * Returns a `capture` function which "captures" `CancellablePromise`'s and * cancels them when the component unmounts. This is desirable in certain * situations to prevent callbacks passed down to a component from being called * after that component is unmounted. * * ``` * const capture = useCancellablePromiseCleanup() * * // Later, in an async function: * const result = await capture(api.get('xyz')) * ``` */ export declare function useCancellablePromiseCleanup(): CaptureCancellablePromise;