| I built a non-trivial webapp in nodejs + Typescript but abandoned it due to these issues: 1. You can generate source maps for your TS files, but node can't use them. There is some support for source maps via the node-source-map-support, but it doesn't play well with a lot of stuff out of the box. Just getting accurate stack traces in my logs turned into a project of its own. 2. Most node libraries don't include type definitions, and what is on DefinitelyTyped is more likely than not to be out-of-date and inaccurate. Having the wrong type definitions might be worse than none at all, which means for the most part you'll be declaring a lot of stuff as "any." It makes even preserving the types in your own code difficult, as anything that touches a 3rd-party library is going to come back as the any type without additional annotation. 3. Similar to 2, if you want to use a promise-based approach to deal with the "callback hell" induced by node's continuation passing style, you are probably going to need to use a library that does runtime mutation of the many libraries that don't support promises, which means that any time information you do have about 3rd-party libraries is going to get lost. 4. The last two items, combined with the lack of runtime type checking, means that your types are going to be difficult to maintain and can easily become inaccurate without feedback from the compiler to let you know that something is wrong. |
Re 2: I do agree that this is a problem but remember that it's all just a community effort. You can always create your own type definitions or enhance existing ones and share on the DefinitelyTyped repository. Also, most of the time if a type definition is out of date or invalid, you can just create your own partial typedef for a module with only those several methods you are actually using.
Re 3: IMO it's a feature. By using, for e.g. a bluebird library to wrap third party code in a Promise, you are changing the way how your code is interacting with that library by redeclaring the whole library or some parts of it. TSC is complaining because you've changed the declarations. You have to provide your own type definitions, either inline, or for the whole module.
I've engineered or reviewed several projects that are using TypeScript with success. The teams after initial hiccups are mostly not willing to come back to pure JavaScript now.
I'm not advocating to use TS everywhere and for every project. It all depends. Many factors must be considered but some sort of type checking is usually a good thing to have.