28 lines
636 B
TypeScript
28 lines
636 B
TypeScript
import {
|
|
createSelector,
|
|
createFeatureSelector,
|
|
} from '@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
|
|
));
|