-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbufferCount.d.ts
More file actions
21 lines (21 loc) · 1.06 KB
/
Copy pathbufferCount.d.ts
File metadata and controls
21 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Observable } from '../Observable';
/**
* Buffers a number of values from the source observable by `bufferSize` then
* emits the buffer and clears it, and starts a new buffer each
* `startBufferEvery` values. If `startBufferEvery` is not provided or is
* `null`, then new buffers are started immediately at the start of the source
* and when each buffer closes and is emitted.
*
* <img src="./img/bufferCount.png" width="100%">
*
* @param {number} bufferSize the maximum size of the buffer emitted.
* @param {number} [startBufferEvery] optional interval at which to start a new
* buffer. (e.g. if `startBufferEvery` is `2`, then a new buffer will be started
* on every other value from the source.) A new buffer is started at the
* beginning of the source by default.
* @returns {Observable<T[]>} an Observable of arrays of buffered values.
*/
export declare function bufferCount<T>(bufferSize: number, startBufferEvery?: number): Observable<T[]>;
export interface BufferCountSignature<T> {
(bufferSize: number, startBufferEvery?: number): Observable<T[]>;
}