app-state-utils
Version:
A set of utilities for state management in web apps, integrates well with front-end state management libraries like redux and vuex, and can be used on server side as well. It defines methods for mutating keys and values in a conventional javascript object
12 lines (9 loc) • 387 B
TypeScript
type MutationHelperMethod = ((state: object) => object) | ((state: any) => any)
interface MutationHelperMethods {
createEntry: MutationHelperMethod
updateValue: MutationHelperMethod
clearValue: MutationHelperMethod
deleteEntry: MutationHelperMethod
logState: MutationHelperMethod
}
declare function MutationHelper (state: object): MutationHelperMethods;