import { Mutation } from 'vuex' ; import { State } from '.' ; type M = Mutation < State > ; export const update = ( state , payload ) : void => { for ( const [ name , value ] of Object . entries ( payload ) ) { state [ name ] = value ; } } ; export const clear = ( state ) => { state = Object . assign ( { } ) ; } ;