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

mapAsyncForResult

Maps a Result<T, E> to Result<U, E> by applying a transformer function to an contained Ok(T) value, leaving an Err(E) value untouched.

This function can be used to compose the results of two functions.

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

§Type Parameters

§Parameters

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

§Return Type

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