GraphReFlyTS

API Reference

last()

last: emit the last value matching pred (or the last value) on the source's COMPLETE. completeWhenDepsComplete:false + terminalAsRealInput:true. EDGE (RxJS divergence, flagged): RxJS last() throws EmptyError when no value matched; we COMPLETE without a value (no throw) — the clean-slate substrate has no "complete-or-throw" terminal and SENTINEL forbids emitting a placeholder.

Import

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

Signature

function last(pred?: (v: S) => boolean): Operator<S, S>

Parameters

ParameterTypeDescription
pred(v: S) => booleanpred value used by the helper.

Returns

A Operator<S, S> value.

Example

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

Source

packages/ts/src/graph/operators.ts