import { GroupedObservable, Observable } from "rxjs"; export interface KeyChanges { type: "add" | "remove"; keys: Iterable; } /** * Groups the elements from the source stream by using `keySelector`, returning * a stream of the active keys, and a function to get the stream of a specific group * * @param stream Input stream * @param keySelector Function that specifies the key for each element in `stream` * @param streamSelector Function to apply to each resulting group * @returns [1, 2] * 1. A function that accepts a key and returns the stream for the group of that key. * 2. A stream of KeyChanges, an object that describes what keys have been added or deleted. */ export declare function partitionByKey(stream: Observable, keySelector: (value: T) => K, streamSelector: (grouped: Observable, key: K) => Observable): [(key: K) => GroupedObservable, Observable>]; /** * Groups the elements from the source stream by using `keySelector`, returning * a stream of the active keys, and a function to get the stream of a specific group * * @param stream Input stream * @param keySelector Function that specifies the key for each element in `stream` * @returns [1, 2] * 1. A function that accepts a key and returns the stream for the group of that key. * 2. A stream of KeyChanges, an object that describes what keys have been added or deleted. */ export declare function partitionByKey(stream: Observable, keySelector: (value: T) => K): [(key: K) => GroupedObservable, Observable>];