35 lines
784 B
TypeScript
Raw Normal View History

2018-03-08 19:07:03 +09:00
import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { StateSelector } from 'packages/commons/util/ngrx/store';
import { MODULE } from '../probe.constant';
2018-03-07 16:37:40 +09:00
import * as ProbeListStore from './list';
import * as ProbeDetailStore from './detail';
2018-03-07 15:23:45 +09:00
export interface State {
2018-03-07 16:37:40 +09:00
list: ProbeListStore.State;
detail: ProbeDetailStore.State;
2018-03-07 15:23:45 +09:00
}
export const REDUCERS = {
2018-03-07 16:37:40 +09:00
list: ProbeListStore.reducer,
detail: ProbeDetailStore.reducer,
2018-03-07 15:23:45 +09:00
};
export const EFFECTS = [
2018-03-07 16:37:40 +09:00
ProbeListStore.Effects,
ProbeDetailStore.Effects,
2018-03-07 15:23:45 +09:00
];
2018-03-08 19:07:03 +09:00
export const selectProbeState = createFeatureSelector<State>(MODULE.name);
export const ListSelector = new StateSelector<ProbeListStore.State>(createSelector(
selectProbeState,
(state: State) => state.list
));