2018-03-16 19:28:50 +09:00

32 lines
605 B
TypeScript

import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { MODULE } from '../infra.constant';
import * as ListStore from './list';
import { StateSelector } from '../../core/ngrx/store';
export interface State {
list: ListStore.State;
}
export const REDUCERS = {
list: ListStore.reducer,
};
export const EFFECTS = [
ListStore.Effects,
];
export const selectInfraState = createFeatureSelector<State>(MODULE.name);
export const ListSelector = new StateSelector<ListStore.State>(createSelector(
selectInfraState,
(state: State) => state.list
));