You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.8 KiB
31 lines
1.8 KiB
2 years ago
|
import { Subscriber } from '../Subscriber';
|
||
|
import { Subscription } from '../Subscription';
|
||
|
import { Observable } from '../Observable';
|
||
|
import { Subject } from '../Subject';
|
||
|
import { OperatorFunction } from '../interfaces';
|
||
|
export declare function groupBy<T, K>(keySelector: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
|
||
|
export declare function groupBy<T, K>(keySelector: (value: T) => K, elementSelector: void, durationSelector: (grouped: GroupedObservable<K, T>) => Observable<any>): OperatorFunction<T, GroupedObservable<K, T>>;
|
||
|
export declare function groupBy<T, K, R>(keySelector: (value: T) => K, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<K, R>) => Observable<any>): OperatorFunction<T, GroupedObservable<K, R>>;
|
||
|
export declare function groupBy<T, K, R>(keySelector: (value: T) => K, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<K, R>) => Observable<any>, subjectSelector?: () => Subject<R>): OperatorFunction<T, GroupedObservable<K, R>>;
|
||
|
export interface RefCountSubscription {
|
||
|
count: number;
|
||
|
unsubscribe: () => void;
|
||
|
closed: boolean;
|
||
|
attemptedToUnsubscribe: boolean;
|
||
|
}
|
||
|
/**
|
||
|
* An Observable representing values belonging to the same group represented by
|
||
|
* a common key. The values emitted by a GroupedObservable come from the source
|
||
|
* Observable. The common key is available as the field `key` on a
|
||
|
* GroupedObservable instance.
|
||
|
*
|
||
|
* @class GroupedObservable<K, T>
|
||
|
*/
|
||
|
export declare class GroupedObservable<K, T> extends Observable<T> {
|
||
|
key: K;
|
||
|
private groupSubject;
|
||
|
private refCountSubscription;
|
||
|
constructor(key: K, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription);
|
||
|
/** @deprecated internal use only */ _subscribe(subscriber: Subscriber<T>): Subscription;
|
||
|
}
|