member_webapp/src/packages/meta/crawler/store/index.ts

31 lines
651 B
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { StateSelector } from 'packages/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
));