Executes a side effect function on the success value of a Result or ResultAsync, without modifying the original result. This is useful for debugging, logging, or performing other side effects while maintaining the original value and error state.
The input Result or ResultAsync.
The return type of the inspection function.
pipe - It is recommended to use this function with the pipe function for better readability and composability.
inspect<
R1
>(fn
): (result
) =>R1
Defined in: functions/inspect.ts:46
R1
extends ResultMaybeAsync
<any
, any
>
(a
) => unknown
(
result
):R1
R1
R1
inspect<
F
>(fn
): <R1
>(result
) =>R1
Defined in: functions/inspect.ts:47
F
extends (a
) => unknown
F
<
R1
>(result
):R1
R1
extends ResultMaybeAsync
<Parameters
<F
>[0
], any
>
R1
R1