typescript setInterval timer type code example
Example: typescript type for intervalId
let timer: ReturnType<typeof setTimeout> = setTimeout(() => { ... });
clearTimeout(timer);
let timer: ReturnType<typeof setTimeout> = setTimeout(() => { ... });
clearTimeout(timer);