"use strict";

var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
_Object$defineProperty(exports, "__esModule", {
  value: true
});
exports.default = promiseTick;
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
/*!
 * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
 */

/**
 * Uses Promise#then to run some number of ticks
 * @param count
 */
function promiseTick(count) {
  var promise = _promise.default.resolve(undefined);
  while (count > 1) {
    promise = promise.then(function () {
      return promiseTick(1);
    });
    count -= 1;
  }
  return promise;
}
//# sourceMappingURL=promise-tick.js.map
