throttle()
throttle (alias throttleTime): leading-edge — emit a value immediately, then ignore the source
for ms. exhaustMap drops new source values while the current window inner is alive; the
window emits v at its leading edge and stays alive ms.
Matches the RxJS-7 throttleTime DEFAULT (leading:true, trailing:false). The leading/trailing
OPTIONS RxJS exposes are NOT provided (a capability gap, not a behavior divergence; B44) — add a
trailing-window form if a consumer needs it.
Import
Section titled “Import”import { throttle } from "@graphrefly/ts/operators";Signature
Section titled “Signature”function throttle(ms: number): Operator<S, S>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ms | number | Duration or timestamp in milliseconds. |
Returns
Section titled “Returns”A Operator<S, S> value.
Example
Section titled “Example”import { throttle } from "@graphrefly/ts/operators";Source
Section titled “Source”packages/ts/src/graph/time.ts