member_webapp/@overflow/notification/store/index.ts
2018-05-27 18:12:20 +09:00

30 lines
696 B
TypeScript

import {
createSelector,
createFeatureSelector,
} from '@ngrx/store';
import { StateSelector } from '@overflow/core/ngrx/store';
import { MODULE } from '../notification.constant';
import * as NotificationEntityStore from './entity/notification';
export interface State {
notification: NotificationEntityStore.State;
}
export const REDUCERS = {
notification: NotificationEntityStore.reducer,
};
export const EFFECTS = [
NotificationEntityStore.Effects,
];
export const selectState = createFeatureSelector<State>(MODULE.name);
export const NotificationEntitySelector = NotificationEntityStore.getSelectors(createSelector(
selectState,
(state: State) => state.notification
));