import type { EntityState } from './models' ; export function getInitialEntityState < V > ( ) { return { ids : [ ] , entities : { } , } ; } export function createInitialStateFactory < V > ( ) { function getInitialState ( ) ; function getInitialState < S extends object > ( additionalState ) ; function getInitialState ( additionalState = { } ) { return Object . assign ( getInitialEntityState ( ) , additionalState ) ; } return { getInitialState } ; }