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

mapErrForResult

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

This function can be used to pass through a successful result while handling an error.

function mapErrForResult<T, E, F>(input: Result<T, E>, transformer: TransformFn<E, F>): Result<T, F>;
§
mapErrForResult<T, E, F>(input: Result<T, E>, transformer: TransformFn<E, F>): Result<T, F>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
transformer: TransformFn<E, F>
[src]

§Return Type