member_webapp/@overflow/sensor/store/index.ts
2018-05-29 13:13:28 +09:00

31 lines
700 B
TypeScript

import {
createSelector,
createFeatureSelector,
} from '@ngrx/store';
import { MODULE } from '../sensor.constant';
import * as SensorEntityStore from './entity/sensor';
import * as SensorListContainerStore from './container/sensor-list';
export interface State {
sensor_list: SensorListContainerStore.State;
}
export const REDUCERS = {
sensor_list: SensorListContainerStore.reducer,
};
export const EFFECTS = [
SensorEntityStore.Effects,
];
export const selectState = createFeatureSelector<State>(MODULE.name);
export const SensorListContainerSelector = SensorListContainerStore.getSelectors(createSelector(
selectState,
(state: State) => {
return state.sensor_list;
}
));