docs: function createSagas() {
    var models = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    // 已经定义的 namespace
    var existentNamespace = {}; // 所有的 saga watchers
  
    var sagaWatchers = [];
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
  
    try {
      var _loop = function _loop() {
        var model = _step.value;
        var namespace = model.namespace,
            _model$effects = model.effects,
            effects = _model$effects === void 0 ? {} : _model$effects; // 检测 namespace 是否有定义
  
        if (!namespace) {
          throw new Error('namespace 未定义或为空字符串.');
        } // 检测 namespace 是否重复定义(必须全局唯一)
  
  
        if (existentNamespace[namespace]) {
          throw new Error("namespace: ".concat(namespace, " \u91CD\u590D\u5B9A\u4E49."));
        } // 检查 effects 类型
  
  
        if (!(0, _utils.isType)(effects, 'Object')) {
          throw new Error("effects \u6570\u636E\u7C7B\u578B\u5FC5\u987B\u4E3A\u5BF9\u8C61.");
        } // 设置该 namespace 已存在
  
  
        existentNamespace[namespace] = true; // 获取定义的 effect
  
        Object.keys(effects).forEach(function (effectName) {
          var effect = effects[effectName];
          var effectFunc =
          /*#__PURE__*/
          regeneratorRuntime.mark(function effectFunc() {
            return regeneratorRuntime.wrap(function effectFunc$(_context8) {
              while (1) {
                switch (_context8.prev = _context8.next) {
                  case 0:
                  case "end":
                    return _context8.stop();
                }
              }
            }, effectFunc, this);
          }); // effect 函数
  
          var type = ''; // effect watch 类型
  
          var throttleTime = 0; // type 为 throttle 的 time 参数
  
          if ((0, _utils.isType)(effect, 'GeneratorFunction')) {
            effectFunc = effect;
            type = 'takeEvery';
          } else if ((0, _utils.isType)(effect, 'Array') && (0, _utils.isType)(effect[0], 'GeneratorFunction') && (0, _utils.isType)(effect[1], 'Object')) {
            effectFunc = effect[0];
            type = effect[1].type || 'takeEvery';
            throttleTime = effect[1].throttleTime || 0;
          } else {
            throw new Error('effect 的格式为 *(action, effects) => void 或 [*(action, effects) => void, { type }]');
          }
  
          sagaWatchers.push( // 生成 saga watcher
          effectWatcherCreator(namespace, effectName, effectFunc, {
            type: type,
            throttleTime: throttleTime
          }));
        });
      };
  
      for (var _iterator = models[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        _loop();
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return != null) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
  
    return (
      /*#__PURE__*/
      regeneratorRuntime.mark(function rootSaga() {
        return regeneratorRuntime.wrap(function rootSaga$(_context7) {
          while (1) {
            switch (_context7.prev = _context7.next) {
              case 0:
                _context7.next = 2;
                return _effects.default.all(sagaWatchers.map(function (saga) {
                  return _effects.default.spawn(
                  /*#__PURE__*/
                  regeneratorRuntime.mark(function _callee6() {
                    return regeneratorRuntime.wrap(function _callee6$(_context6) {
                      while (1) {
                        switch (_context6.prev = _context6.next) {
                          case 0:
                            if (!true) {
                              _context6.next = 11;
                              break;
                            }
  
                            _context6.prev = 1;
                            _context6.next = 4;
                            return _effects.default.call(saga);
  
                          case 4:
                            _context6.next = 9;
                            break;
  
                          case 6:
                            _context6.prev = 6;
                            _context6.t0 = _context6["catch"](1);
                            console.error(_context6.t0);
  
                          case 9:
                            _context6.next = 0;
                            break;
  
                          case 11:
                          case "end":
                            return _context6.stop();
                        }
                      }
                    }, _callee6, this, [[1, 6]]);
                  }));
                }));
  
              case 2:
              case "end":
                return _context7.stop();
            }
          }
        }, rootSaga, this);
      })
    );
  }