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