import { createStateContainer } from '../../common/state_containers' ; interface State { count : number ; } const container = createStateContainer ( { count : 0 } , { increment : ( state ) => ( by ) => ( { count : state . count + by } ) , double : ( state ) => ( ) => ( { count : state . count * 2 } ) , } , { count : ( state ) => ( ) => state . count , } ) ; container . transitions . increment ( 5 ) ; container . transitions . double ( ) ; console . log ( container . selectors . count ( ) ) ; export const result = container . selectors . count ( ) ;