import { Storage } from './Storage' ; import { keyType } from './types' ; param key param nextValue export function mutate < S , K = string > ( key , nextValue ? ) { const store = Storage . get ( key ) ; if ( store && store . setState ) { store . setState ( key , store . state , nextValue ) ; } else { Storage . set ( key , { state : nextValue } as any ) ; } }