Didn't realize how difficult it was to get started with TypeScript compared to Flow. With Flow it has decent defaults so an empty `.flowconfig` is enough to get started. Having to install type definitions for Node in TS was another hurdle. In Flow they're built in.
-
Show this thread
-
Can someone help me figure out how to get Node definitions in TS working? I installed @types/node and it successfully installed, and TS picks it up. But using `require("fs")` is still `any`? The @types/node definitions deliberately type `require` as always returning `any`.
5 replies 0 retweets 5 likesShow this thread -
How am I supposed to import Node built-ins safely? I've googled "TypeScript with Node.js" and none of the guides cover this, or is it just meant to work and I'm doing something wrong?
5 replies 0 retweets 5 likesShow this thread -
Replying to @michaelbenin
Unfortunately not. This is a private project that I'm converting.
11:46 AM - 19 Jun 2019
0 replies
0 retweets
0 likes
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.
he/him 