
2025-05-30 07:51:01
type TimeoutID = ReturnType<typeof setTimeout>;
const n: TimeoutID = setTimeout(...
clearTimeout(n)
Use this so that your typescript code works no matter the environment
No longer will I need to ask is this code using NodeJS.Timeout or number (browser)
#typescript #webdev