import { createDomainModule , DomainEntities } from 'redux-with-domain' ; export interface Workbook { id : string ; name : string ; datasetIdList : string [ ] ; reportIdList : string [ ] ; } interface Entities { workbookList : Workbook ; } const selectors = { getWorkbook : ( { entities } ) => { return entities . workbookList . select ( ) ; } } ; export default createDomainModule < Entities , typeof selectors , { } > ( 'domain/workbook' , { entities : { workbookList : 'id' } , selectors : { getWorkbook : ( { entities } ) => { return entities . workbookList . select ( ) as Workbook [ ] ; } } , services : ( { entities , sagaEffects : { call , put } } ) => ( { } ) } ) ;