src/action.ts
Function actionDecoratorFactory
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function actionDecoratorFactory<T>(params?: ActionDecoratorParams): MethodDecorator {
const { commit = undefined, rawError = !!config.rawError, root = false } = params || {}
return function (target: Object, key: string | symbol, descriptor: TypedPropertyDescriptor<any>) {
const module = target.constructor as Mod<T, any>
if (!module.hasOwnProperty('actions')) {
Function action
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const action: Act<typeof target, any> = async function (
context: ActionContext<typeof target, any>,
payload: Payload
) {
try {