data type of window.setinterval code example
Example 1: typescript type for intervalId
let timer: ReturnType<typeof setTimeout> = setTimeout(() => { ... });
clearTimeout(timer);
Example 2: js setinterval
function func(){
console.log("Ran")
}
setInterval(func,1000)//Runs the "func" function every second