ELSEIF
Your brief EB
183 stories from 71 feeds 32 clusters Refreshed 9 minutes ago next pull 13:20

LANGUAGES Signal 278

I made a Promise-aware debounce and throttle library for TypeScript

WHY IT MATTERS

Engineers working with async TypeScript can get full type inference and per-call promise-based return values from debounced or throttled functions, eliminating the need to manually manage stale synchronous results. The library also consolidates several timing utilities—batching, rate-limited promise queues, exponential-backoff retries, idle scheduling, and concurrency limiting—that typically require separate packages or custom implementations.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

Each invocation returns a promise that resolves with the actual async result and propagates errors natively, rather than returning the last synchronous result or undefined.

02

debounceAsync supports configurable overlap policies (queue, drop, cancel-previous) with automatic AbortSignal injection for cooperative cancellation of in-flight work.

03

The library includes utilities beyond debounce/throttle: batch for argument aggregation, throttlePromise for rate-limited FIFO promise queues, retry with exponential backoff, idle scheduling, and concurrencyLimit.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
Hacker News I made a Promise-aware debounce and throttle library for TypeScript Open ↗