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.
-
-
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


-
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.
- 3 more replies
New conversation -
-
-
Is using the esm loader or backpack from
@jaredpalmer not possible? -
I'm not using webpack. I specifically do not want any ES/CJS interop.
End of conversation
New conversation -
-
-
You can also use the `import =` form, i.e. `import fs = require('fs')`. This form maps directly to CJS semantics and is preferred, especially if you're a library. Unfortunately, you can't target ES6 when you use this.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Yup ES modules is the way to go with TS. They can perfectly transpile down to CJS I'd needed

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.
he/him 