@@ -389,28 +389,31 @@ var makeAction = function makeAction(actionId, parentActionId, actionSchema, act
389389 } ;
390390 } ;
391391
392- // /**
393- // * Clean entity from entity reducer
394- // *
395- // * @memberOf action.makeAction.Action
396- // * @type {Function }
397- // *
398- // * @example
399- // * store.dispatch(userLoginAction.clean())
400- // *
401- // * @returns {Undefined } - returns None, only clear entity data
402- // */
403- // this.action.clean = () => {
404- // return (dispatch, getState) => {
405- // dispatch({
406- // time: new Date().getTime(),
407- // type: ACTION_CLEAN_TYPE_NAME,
408- // prefix: ACTION_TYPE_PREFIX,
409- // actionId: this.actionId,
410- // actionSchema: this.schema
411- // })
412- // }
413- // }
392+ /**
393+ * Delete entity from entity reducer
394+ *
395+ * @memberOf action.makeAction.Action
396+ * @type {Function }
397+ *
398+ * @example
399+ * store.dispatch(userDeleteAction.delete())
400+ *
401+ * @example
402+ * store.dispatch(userDeleteAction.withPrefix(userId).delete())
403+ *
404+ * @returns {Undefined } - returns None, only delete entity data
405+ */
406+ this . action . delete = function ( ) {
407+ return function ( dispatch , getState ) {
408+ dispatch ( {
409+ time : new Date ( ) . getTime ( ) ,
410+ type : _config . ACTION_DELETE_TYPE_NAME ,
411+ prefix : _config . ACTION_TYPE_PREFIX ,
412+ actionId : _this . actionId ,
413+ actionSchema : _this . schema
414+ } ) ;
415+ } ;
416+ } ;
414417
415418 return this . action ;
416419} ;
0 commit comments