import { IApplicationsState } from '@client/applications/index' ; import { IStoreState } from '@client/store' ; export const getDraftsState = ( store ) : IApplicationsState => store . applicationsState ; function getKey < K extends keyof IApplicationsState > ( store , key ) { return getDraftsState ( store ) [ key ] ; } export const getInitialApplicationsLoaded = ( store ) : IApplicationsState [ 'initialApplicationsLoaded' ] => getKey ( store , 'initialApplicationsLoaded' ) ;