import { createSelector, createFeatureSelector, ActionReducerMap, Selector, } from '@ngrx/store'; import { StateSelector } from '@overflow/core/ngrx/store'; import { MODULE } from '../discovery.constant'; import * as DiscoverStore from './discover'; import * as SettingStore from './setting'; export interface State { discover: DiscoverStore.State; setting: SettingStore.State; } export const REDUCERS = { discover: DiscoverStore.reducer, setting: SettingStore.reducer, }; export const EFFECTS = [ SettingStore.Effects, DiscoverStore.Effects, ]; export const selectDiscoveryState = createFeatureSelector(MODULE.name); export const DiscoverSelector = new StateSelector(createSelector( selectDiscoveryState, (state: State) => state.discover )); export const SettingSelector = new StateSelector(createSelector( selectDiscoveryState, (state: State) => state.setting ));