In Node, the TypeScript return type for setTimeout is NodeJS.Timeout. In the browser, the return type is number. But what about code that runs in both? Neither type makes sense.
I'd also like to know how to handle this. Particularly wondering what isomorphic apps like Next.js expect you to do...?
-
-
When I last tried Next, it was clear that TypeScript support was bolted on without a whole lot of thought. (Its watcher would fail to even report type errors that involved multiple files.) So I wouldn't expect to see a great answer here unfortunately.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.