before action can be an array of actions. updated jsdoc type