Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

andThenAsyncForResult

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.

function andThenAsyncForResult<T, U, E>(input: Result<T, E>, transformer: ResultAsyncTryTransformFn<T, U, E>): Promise<Result<U, E>>;
§
andThenAsyncForResult<T, U, E>(input: Result<T, E>, transformer: ResultAsyncTryTransformFn<T, U, E>): Promise<Result<U, E>>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
transformer: ResultAsyncTryTransformFn<T, U, E>
[src]

§Return Type

§
Promise<Result<U, E>>
[src]