function groupBy<T, K>(
getKey: (value: T, index: number) => K,
Subject_?: typeof Subject,
removeGroupWhenNoSubscribers?: boolean,
): Operator<T, GroupSource<T, K>>1 | function groupBy<T, K>( |
2 | getKey: (value: T, index: number) => K, |
3 | Subject_?: typeof Subject, |
4 | removeGroupWhenNoSubscribers?: boolean, |
5 | ): Operator<T, GroupSource<T, K>> |
type GroupSource<T, K> = ActiveGroupSource<T, K> | RemovedGroupSource<T>
interface ActiveGroupSource<T, K> extends Source<T> {
key: K
remove(): void
removed: false
}1 | interface ActiveGroupSource<T, K> extends Source<T> { |
2 | key: K |
3 | remove(): void |
4 | removed: false |
5 | } |
interface RemovedGroupSource<T> extends Source<T> {
key: null
remove(): void
removed: true
}1 | interface RemovedGroupSource<T> extends Source<T> { |
2 | key: null |
3 | remove(): void |
4 | removed: true |
5 | } |