member_webapp/src/packages/target/store/index.ts
2018-04-06 20:02:18 +09:00

31 lines
708 B
TypeScript

import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { StateSelector } from 'packages/core/ngrx/store';
import { MODULE } from '../target.constant';
import * as TargetStore from './target';
export interface State {
readallbydomain: TargetStore.State;
}
export const REDUCERS = {
readallbydomain: TargetStore.reducer,
};
export const EFFECTS = [
TargetStore.Effects,
];
export const selectTargetState = createFeatureSelector<State>(MODULE.name);
export const ReadAllByDomainSelector = new StateSelector<TargetStore.State>(createSelector(
selectTargetState,
(state: State) => state.readallbydomain
));