import { SimpleUserState , Query , Queries , Root , combineRootFactory } from 'ngrx-domains' ; export interface SimpleQueries { loggedIn : Query < boolean > ; } const fromRoot = combineRootFactory < SimpleUserState > ( 'simpleUser' ) ; Queries . simpleUser = { loggedIn : fromRoot ( state => state . loggedIn ) } ; declare module 'ngrx-domains' { interface Root { simpleUser : Query < SimpleUserState > ; } interface Queries { simpleUser : SimpleQueries ; } }