method AsyncResult.prototype.inspect
AsyncResult.prototype.inspect(fn: (value: T) => void | Promise<void>): AsyncResult<T, E>

Performs a side effect on the Ok value without changing the result.

Parameters

fn: (value: T) => void | Promise<void>

Function to call with the Ok value (if Ok)

Return Type

This AsyncResult, unchanged

Usage

import { AsyncResult } from "result/mod.ts";