member_webapp/@overflow/sensor-item/store/index.ts

30 lines
615 B
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import {
createSelector,
createFeatureSelector,
} from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { StateSelector } from '@overflow/core/ngrx/store';
2018-04-06 11:02:18 +00:00
import * as ListStore from './key-list';
import { MODULE } from '../sensor-item.constant';
export interface State {
list: ListStore.State;
}
export const REDUCERS = {
list: ListStore.reducer,
};
export const EFFECTS = [
ListStore.Effects,
];
export const selectState = createFeatureSelector<State>(MODULE.name);
export const ReadSensorItemKeySelector = new StateSelector<ListStore.State>(createSelector(
selectState,
(state: State) => state.list
));