import { createFeatureSelector , createSelector } from '@ngrx/store' ; import { AUTH_FEATURE_KEY , AuthState } from './auth.reducer' ; const getAuthState = createFeatureSelector < AuthState > ( AUTH_FEATURE_KEY ) ; const getAuthToken = createSelector ( getAuthState , state => state . authToken ) ; const getUser = createSelector ( getAuthState , state => state . user ) ; const getLoginInProgress = createSelector ( getAuthState , state => state . loginInProgress ) ; export const authQuery = { getAuthToken , getLoginInProgress , getUser } ;