import type { AsyncTransformFn } from '../internal/function.js';
import { type Result } from './result.js';
export type ResultAsyncTryTransformFn<in T, out U, out E> = AsyncTransformFn<T, Result<U, E>>;
/**
 *  Returns `Promise<Err(E)>` if the _input_ is `Err(E)`,
 *  otherwise calls _transformer_ with the value and returns the result.
 *
 *  XXX:
 *  Some languages call this operation flatmap.
 *  But we don't provide `flatMap()` as alias of this function
 *  to sort with other APIs.
 */
export declare function andThenAsyncForResult<T, U, E>(input: Result<T, E>, transformer: ResultAsyncTryTransformFn<T, U, E>): Promise<Result<U, E>>;
