Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

groupBy.d.ts 1.9KB

1234567891011121314151617181920212223242526272829303132
  1. import { Subscriber } from '../Subscriber';
  2. import { Subscription } from '../Subscription';
  3. import { Observable } from '../Observable';
  4. import { Subject } from '../Subject';
  5. import { OperatorFunction } from '../types';
  6. export declare function groupBy<T, K>(keySelector: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
  7. export declare function groupBy<T, K>(keySelector: (value: T) => K, elementSelector: void, durationSelector: (grouped: GroupedObservable<K, T>) => Observable<any>): OperatorFunction<T, GroupedObservable<K, T>>;
  8. 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>>;
  9. 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>>;
  10. export interface RefCountSubscription {
  11. count: number;
  12. unsubscribe: () => void;
  13. closed: boolean;
  14. attemptedToUnsubscribe: boolean;
  15. }
  16. /**
  17. * An Observable representing values belonging to the same group represented by
  18. * a common key. The values emitted by a GroupedObservable come from the source
  19. * Observable. The common key is available as the field `key` on a
  20. * GroupedObservable instance.
  21. *
  22. * @class GroupedObservable<K, T>
  23. */
  24. export declare class GroupedObservable<K, T> extends Observable<T> {
  25. key: K;
  26. private groupSubject;
  27. private refCountSubscription?;
  28. /** @deprecated Do not construct this type. Internal use only */
  29. constructor(key: K, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription);
  30. /** @deprecated This is an internal implementation detail, do not use. */
  31. _subscribe(subscriber: Subscriber<T>): Subscription;
  32. }