code: function action(targetAction) {
      return function (target, propertyKey, descriptor) {
          if (targetAction == undefined) {
              var metadata = Reflect.getMetadata('design:paramtypes', target, propertyKey);
              if (metadata == undefined || metadata.length < 2)
                  throw new Error('@action() must be applied to a function with two arguments. ' +
                      'eg: reducer(state: State, action: SubclassOfAction): State { }');
              targetAction = metadata[1];
          }
          var statexActions = {};
          if (Reflect.hasMetadata(constance_1.STATEX_ACTION_KEY, target)) {
              statexActions = Reflect.getMetadata(constance_1.STATEX_ACTION_KEY, target);
          }
          statexActions[propertyKey] = targetAction;
          Reflect.defineMetadata(constance_1.STATEX_ACTION_KEY, statexActions, target);
          return {
              value: function (state, payload) {
                  return descriptor.value.call(this, state, payload);
              }
          };
      };
  }
docs: Binds action to a function
  
  @example
  class TodoStore {
  
  @action
  addTodo(state: State, action: AddTodoAction): State {
  // return modified state
  }
  }
  
  @export
  @param {*} target
  @param {string} propertyKey
  @param {PropertyDescriptor} descriptor
  @returns