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 @danbucholtz
Ahhh TS forces you to use ES modules for CJS? I deliberately avoid it because interop standards aren't consistent. This feels like another potentially large breaking change that is going to hold TS back.
4 replies 0 retweets 6 likes -
Replying to @sebmck @danbucholtz
Disagree with that. I feel like it's the other way around. CJS can't die soon enough so that we can use the same module system in node and the browser

1 reply 0 retweets 1 like -
Replying to @marvinhagemeist @danbucholtz
TypeScript forcing people to use their specific CJS and ES interop semantics will hold the ecosystem back. There isn't really any debating that. A large consumer making unstandardized decisions is a big deal.
1 reply 0 retweets 2 likes -
Replying to @sebmck @danbucholtz
I know you're more involved in that given your relationship with babel. Iirc both the TS team and Babel put their heads together to make the ES -> CJS conversion consistent for everyone. Haven't run into any issues so far.
1 reply 0 retweets 0 likes
I should have never added CJS/ES module interop in Babel to begin with
-
-
Replying to @sebmck @danbucholtz
What do you regret about it? (Honest question). Do you went a different route for Rome?
0 replies 0 retweets 1 likeThanks. 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.
he/him 