31 lines
652 B
TypeScript
31 lines
652 B
TypeScript
import {
|
|
createSelector,
|
|
createFeatureSelector,
|
|
ActionReducerMap,
|
|
} from '@ngrx/store';
|
|
|
|
import { StateSelector } from '@overflow/core/ngrx/store';
|
|
|
|
import { MODULE } from '../crawler.constant';
|
|
|
|
import * as ListStore from './list';
|
|
|
|
export interface State {
|
|
crawlers: ListStore.State;
|
|
}
|
|
|
|
export const REDUCERS = {
|
|
crawlers: ListStore.reducer,
|
|
};
|
|
|
|
export const EFFECTS = [
|
|
ListStore.Effects,
|
|
];
|
|
|
|
export const selectCrawlerState = createFeatureSelector<State>(MODULE.name);
|
|
|
|
export const ReadAllCrawlerSelector = new StateSelector<ListStore.State>(createSelector(
|
|
selectCrawlerState,
|
|
(state: State) => state.crawlers
|
|
));
|