UNPKG

@reactivex/ix-es5-esm

Version:

The Interactive Extensions for JavaScript

18 lines (17 loc) 912 B
import { AsyncIterableX } from '../asynciterablex.js'; import { MonoTypeOperatorAsyncFunction } from '../../interfaces.js'; /** @ignore */ export declare class ThrottleAsyncIterable<TSource> extends AsyncIterableX<TSource> { private _source; private _time; constructor(source: AsyncIterable<TSource>, time: number); [Symbol.asyncIterator](signal?: AbortSignal): AsyncGenerator<Awaited<TSource>, void, unknown>; } /** * Throttles the source async-iterable sequence so that it doesn't emit more than one value during the given timeframe. * * @template TSource The type of elements in the source sequence. * @param {number} time The time in milliseconds to throttle the source sequence. * @returns {MonoTypeOperatorAsyncFunction<TSource>} The source sequence throttled by the given timeframe. */ export declare function throttle<TSource>(time: number): MonoTypeOperatorAsyncFunction<TSource>;