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