member_webapp/@overflow/notification/store/index.ts
2018-05-25 12:31:08 +09:00

30 lines
689 B
TypeScript

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