Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const setInterval = (func: Function, delay: number) => {
const id = generateUniqueNumber(SCHEDULED_INTERVAL_FUNCTIONS);
SCHEDULED_INTERVAL_FUNCTIONS.set(id, () => {
func();
scheduleFunction(id, delay, 'interval');
});
scheduleFunction(id, delay, 'interval');
return id;
};