Skip to main

groupBy

groupBy

Signature - source.ts#L2621

function groupBy<T, K>(
    getKey: (value: T, index: number) => K,
    Subject_?: typeof Subject,
    removeGroupWhenNoSubscribers?: boolean,
): Operator<T, GroupSource<T, K>>

GroupSource

Signature - source.ts#L2708

type GroupSource<T, K> = ActiveGroupSource<T, K> | RemovedGroupSource<T>

ActiveGroupSource

Signature - source.ts#L2690

interface ActiveGroupSource<T, K> extends Source<T> {
    key: K
    remove(): void
    removed: false
}

RemovedGroupSource

Signature - source.ts#L2699

interface RemovedGroupSource<T> extends Source<T> {
    key: null
    remove(): void
    removed: true
}