News for hackers. Stuff that matters.
Re:SetBigTimeout by dgoldstein0 on Friday October 18, 2024 @07:04PM (#41884284)
It's return your differs between node and in a browser. If you want to type a variable to hold the return value in typescript and share that across node (eg jest tests where you might include @types/node) and the browser you need ReturnType<typeof setTimeout>, otherwise the code won't typecheck in all cases. Similar with setInterval.

There are no comments on this comment yet.