import { Selector, createSelector } from '@ngrx/store'; export interface State { selectedRoom: string | null; selectedMassDetail: number | null; massDetailProcessing: boolean; } export const initialState: State = { selectedRoom: null, selectedMassDetail: null, massDetailProcessing: false }; export function selectors(selector: Selector) { return { selectedRoom: createSelector( selector, (state: State) => state.selectedRoom ), selectedMassDetail: createSelector( selector, (state: State) => state.selectedMassDetail ) }; }