import { createSelector, createFeatureSelector, ActionReducerMap, } from '@ngrx/store'; import { MODULE } from '../infra.constant'; import * as ListStore from './list'; import * as DetailStore from './detail'; import { StateSelector } from '@overflow/core/ngrx/store'; export interface State { list: ListStore.State; sensor: DetailStore.State; } export const REDUCERS = { list: ListStore.reducer, sensor: DetailStore.reducer }; export const EFFECTS = [ ListStore.Effects, DetailStore.Effects ]; export const selectInfraState = createFeatureSelector(MODULE.name); export const ListSelector = new StateSelector(createSelector( selectInfraState, (state: State) => state.list )); export const DetailSelector = new StateSelector(createSelector( selectInfraState, (state: State) => state.sensor ));