Hacker News new | ask | show | jobs
by lucideer 3438 days ago
I've run into the same problems with #2 quite a lot, especially in terms of libraries that are on DefinitelyTyped but are either out-of-date, or where the DefinitelyTyped typings are in some way tailored toward a specific module loader choice (node/SystemJS/es6/&c.).

In the end, my solution has been to just use only the DefinitelyTyped typings that work well, and fall back to inserting my own broad, liberal `declare`s for remaining libraries. This has the enormous drawback of effectively opting out of most of the benefits of using TypeScript in the context of those specific libraries, but it seems like a worthwhile trade-off given I keep the benefits throughout a lot of the app.

I haven't encountered #1 personally - this seems to work OK in my experience.

On #3, I've always thought both that "callback hell" was exaggerated and largely called by badly planned code rather than being a fundamental problem with callbacks, and also that Promises are an oversold solution that offer some benefits but are certainly no magic bullet. My code generally uses Promises, but never pervasively. They wouldn't be a dealbreaker by any means.

TL;DR while your criticisms are understandable and valid, they seem relatively minor based on my own experience. Abandoning an app completely seems extreme.