3 ms·
One of the major problems with JavaScript has always been that there are too many options. I feel like TS reduces some, but it still lets people choose between
by embwbam 13y ago
One of the major problems with JavaScript has always been that there are too many options. I feel like TS reduces some, but it still lets people choose between a module pattern (AMD, CommonJS), and the traditional everything-in-the-global-scope way of writing programs.
So you're left feeling confused because there is more than one way to write a program. Options are good and all, but in the front-end Javascript community, I think we could deal with fewer of them.
To solve your own problem: I would recommend using CommonJS with Browserify for everything, and only use reference tags for ambient declarations. (.d.ts files). Then you'll always use import and export