member_webapp/@overflow/probe/store/index.ts
2018-05-25 21:41:29 +09:00

36 lines
813 B
TypeScript

import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { StateSelector } from '@overflow/core/ngrx/store';
import { MODULE } from '../probe.constant';
import * as ProbeEntityStore from './entity/probe';
import * as ProbeListContainerStore from './container/probe-list';
export interface State {
probes: ProbeEntityStore.State;
probe_list_pending: ProbeListContainerStore.State;
}
export const REDUCERS = {
probes: ProbeEntityStore.reducer,
probe_list_pending: ProbeListContainerStore.reducer,
};
export const EFFECTS = [
ProbeEntityStore.Effects,
];
export const selectState = createFeatureSelector<State>(MODULE.name);
export const ProbeSelector = ProbeEntityStore.getSelectors(createSelector(
selectState,
(state: State) => state.probes
));