From f0b810678ad72a4a51f92f5663d775ead5f7edbc Mon Sep 17 00:00:00 2001 From: Bean Labs <287763725+beanscg@users.noreply.github.com> Date: Mon, 8 Jun 2026 13:43:46 -0400 Subject: [PATCH] docs(throttleTime): add config example --- .../rxjs/src/internal/operators/throttleTime.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/rxjs/src/internal/operators/throttleTime.ts b/packages/rxjs/src/internal/operators/throttleTime.ts index d22d1d6180..53e13eec0c 100644 --- a/packages/rxjs/src/internal/operators/throttleTime.ts +++ b/packages/rxjs/src/internal/operators/throttleTime.ts @@ -37,9 +37,24 @@ import { timer } from '../observable/timer.js'; * result.subscribe(x => console.log(x)); * ``` * + * ### Emit the first click immediately, then emit the latest click after one second + * + * ```ts + * import { asyncScheduler, fromEvent, throttleTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(throttleTime(1000, asyncScheduler, { trailing: true })); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} * @see {@link auditTime} + * @see {@link debounce} * @see {@link debounceTime} * @see {@link delay} + * @see {@link delayWhen} + * @see {@link sample} * @see {@link sampleTime} * @see {@link throttle} *