Source

utils/requestAnimationFrameRecursive.js

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var setTimerRecursive_1 = __importDefault(require("./setTimerRecursive"));
/**
 * Gradually invoking each of the stack of functions with a constant interval
 *
 * @param callStack The stack of functions to call in sequence.
 * @param interval The constant interval between each invocation.
 * @returns A reference value pointed to the titimmer references stack.
 *          It is useful to cancel timers.
 * @category utils
 * @module requestAnimationFrameRecursive
 */
var requestAnimationFrameRecursive = function (callStack, setAborter) {
    if (callStack === void 0) { callStack = []; }
    return (0, setTimerRecursive_1.default)('animFrame', callStack, undefined, setAborter);
};
exports.default = requestAnimationFrameRecursive;