import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; import { Observable } from '../Observable'; import { Subject } from '../Subject'; /** * Groups the items emitted by an Observable according to a specified criterion, * and emits these grouped items as `GroupedObservables`, one `GroupedObservable` per group. * * * * @param {Function} keySelector - a function that extracts the key for each item * @param {Function} elementSelector - a function that extracts the return element for each item * @returns {Observable} an Observable that emits GroupedObservables, each of which corresponds * to a unique key value and each of which emits those items from the source Observable that share * that key value. */ export declare function groupBy(keySelector: (value: T) => K, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable) => Observable): Observable>; export interface RefCountSubscription { count: number; unsubscribe: () => void; isUnsubscribed: boolean; attemptedToUnsubscribe: boolean; } export declare class GroupedObservable extends Observable { key: K; private groupSubject; private refCountSubscription; constructor(key: K, groupSubject: Subject, refCountSubscription?: RefCountSubscription); protected _subscribe(subscriber: Subscriber): Subscription; }