import {Scope, Reducer, MakeScopesFn} from './lib/types'; import {Observable} from 'rxjs'; export interface StateSource { state$: Observable; select(scope: Scope): StateSource; toCollection(this: StateSource>, itemComp: (so: any) => Si): Collection; isolateSource(source: StateSource, scope: Scope): StateSource; isolateSink(innerReducer$: Observable>, scope: Scope): Observable>; } export interface Collection { uniqueBy(getKey: (state: S) => string): UniqueCollection; isolateEach(makeScopes: MakeScopesFn): Collection; build(sources: any): Instances; } export interface UniqueCollection extends Collection { isolateEach(makeScopes: (key: string) => string | object): UniqueCollection; } export interface Instances { pickMerge(selector: string): Observable; pickCombine(selector: string): Observable>; }