function createSuccessfulBatchLoader(moduleMgr) {
  return {
    loadModules: /**
                    @suppress {globalThis} suppression added to enable type
                    checking
                  */
        function(ids, moduleInfoMap, {onError, onSuccess, onTimeout}) {
          requestCount++;
          setTimeout(goog.bind(this.onLoad, this, ids.concat(), 0), 5);
        },
    onLoad: /**
               @suppress {globalThis} suppression added to enable type checking
             */
        function(ids, idxLoaded) {
          moduleMgr.beforeLoadModuleCode(ids[idxLoaded]);
          moduleMgr.setLoaded();
          const idx = idxLoaded + 1;
          if (idx < ids.length) {
            setTimeout(goog.bind(this.onLoad, this, ids, idx), 2);
          }
        },
  };
}
@suppress {globalThis,checkTypes} suppression added to enable type
checking