UNPKG

@beenotung/tslib

Version:
16 lines (15 loc) 449 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clearAllTimer = clearAllTimer; // eslint-disable-next-line @typescript-eslint/no-empty-function function noop() { } function clearAllTimer() { let i = setInterval(noop); if (typeof i !== 'number') { throw new Error('clearAllTimer does not support node.js'); } for (; i > 0; i--) { clearTimeout(i); clearInterval(i); } }