Looking for a way to combine two separate enums into one for easier use.
export enum ActionTypes1 {
ClearError = 'CLEAR_ERROR',
PrependError = 'PREPEND_ERROR',
}
export enum ActionTypes2 {
IncrementCounter = 'INCREMENT_COUNTER',
}
Is there a method to access data from both enums using a single call?
For example:
Foo.ClearError // should work
Foo.IncrementCounter // should work
I am utilizing the enum for function names. When trying to replace the enum with a constant, an error occurs:
// Error: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
async [ActionTypes.IncrementCounter]({ commit }) {