1 | import { AnyAction, Reducer } from 'redux';
|
2 | import { ObservableStore } from '../components/observable-store';
|
3 | import { Comparator, Selector, Transformer } from '../components/selectors';
|
4 | /**
|
5 | * Used with the `@WithSubStore` class decorator to define a SubStore (AKA a
|
6 | * fractal store).
|
7 | *
|
8 | * For more info on substores, see
|
9 | * https://github.com/angular-redux/platform/blob/master/packages/store/articles/fractal-store.md
|
10 | */
|
11 | export interface FractalStoreOptions {
|
12 | /**
|
13 | * The name of an instance method that will define the
|
14 | * base path for the subStore. This method is expected to return an array
|
15 | * of property names or undefined/null.
|
16 | */
|
17 | basePathMethodName: string;
|
18 | /**
|
19 | * The localReducer for the substore in question.
|
20 | */
|
21 | localReducer: Reducer<any, AnyAction>;
|
22 | }
|
23 | /** @hidden */
|
24 | export declare const setClassOptions: (decoratedClassConstructor: any, options: FractalStoreOptions) => void;
|
25 | /**
|
26 | * Gets the store associated with a decorated instance (e.g. a
|
27 | * component or service)
|
28 | * @hidden
|
29 | */
|
30 | export declare const getBaseStore: (decoratedInstance: any) => ObservableStore<any>;
|
31 | /**
|
32 | * Creates an Observable from the given selection parameters,
|
33 | * rooted at decoratedInstance's store, and caches it on the
|
34 | * instance for future use.
|
35 | * @hidden
|
36 | */
|
37 | export declare const getInstanceSelection: <T>(decoratedInstance: any, key: string | symbol, selector: Selector<any, T>, transformer?: Transformer<any, T>, comparator?: Comparator) => any;
|