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

inspectBothForResult

  • Return input directly.
    • This value is passed as the input. But it maybe mutated by calling effector.
  • Call okEffector with the inner value of input if input is Ok(T). Otherwise, call errEffector with the inner value if input is Err(E)
  • This main purpose is to inspect an inner value in a chained function calling. If you don't have to do it, you should not mutate the inner value. if-else statement might be sufficient to mutate the inner value instead of calling this function.
function inspectBothForResult<T, E>(
input: Result<T, E>,
okEffector: EffectFn<T>,
errEffector: EffectFn<E>,
): Result<T, E>;
§
inspectBothForResult<T, E>(input: Result<T, E>, okEffector: EffectFn<T>, errEffector: EffectFn<E>): Result<T, E>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
okEffector: EffectFn<T>
[src]
§
errEffector: EffectFn<E>
[src]

§Return Type