GraphReFlyTS

API Reference

tap()

tap: invoke a side effect on each DATA (function form) or on data/error/complete (observer form); values pass through unchanged. The observer form reads source terminals (completeWhenDepsComplete:false + errorWhenDepsError:false + terminalAsRealInput:true) so it can call error/complete then forward the terminal; the function form lets the substrate auto-cascade terminals.

Import

import { tap } from "@graphrefly/ts/operators";

Signature

function tap(fnOrObserver: ((v: S) => void) | TapObserver<S>): Operator<S, S>

Parameters

ParameterTypeDescription
fnOrObserver((v: S) => void) | TapObserver<S>fn or observer value used by the helper.

Returns

A Operator<S, S> value.

Example

import { tap } from "@graphrefly/ts/operators";

Source

packages/ts/src/graph/operators.ts