import { BaseDocument } from '../models/base-document' ; export const getState = < T extends BaseDocument > ( featureName , item ? ) => ( { [ featureName ] : item ? { ids : [ item . id ] , entities : { [ item . id ] : item } , selectedId : item . id } : { ids : [ ] , entities : { } , selectedId : undefined } } ) ;