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

inspectOkForResult

  • Return input directly.
    • This value is passed as the input. But it maybe mutated by calling effector.
  • Call effector with the inner value of input if input is Ok(T).
  • 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 inspectOkForResult<T, E>(input: Result<T, E>, effector: EffectFn<T>): Result<T, E>;
§
inspectOkForResult<T, E>(input: Result<T, E>, effector: EffectFn<T>): Result<T, E>
[src]

§Type Parameters

§Parameters

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

§Return Type