Skip to content
PACKAGES

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 { throttle } from "@graphrefly/ts/operators";
function throttle(ms: number): Operator<S, S>
ParameterTypeDescription
msnumberDuration or timestamp in milliseconds.

A Operator<S, S> value.

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

packages/ts/src/graph/time.ts