There are plenty of JavaScript and compiled to JavaScript languages. To make it worse there are zillion JS frameworks out there. Selecting good tools for doing modern web apps can be challenging.
I'm doing a lot of so called SPAs (Single Page Applications). Most of them are done in Dart or Javascript with superb IntelliJ. Some time ago I tried to use Typescript with VisualStudioCode in one of smaller projects. After this experiment I still like Dartlang more for web apps and here is why.
Reasons I like Dart more over Typescript
- Dart analyzer is usually able to show more common mistakes even if you are not heavy type user. In real life dev you usually do plenty of simple typos. In Dart - thanks to fantastic Analyzer - time to find them is way shorter.
- It's easier to start debug in Dart and it's more reliable. This could be IntelliJ itself.
- Code in Dart is shorter for small apps since it has build in SDK - there is no need for external libs in simple apps.
- It's easier to back to this code after few weeks (shorter less dependencies) and easier to maintain it. Also time needed to start from scratch is shorter.
- Pub is modern lib/package mechanism (versioning, automatic fetching) and is way superior to what is there in Typescript world. There is single library index site: pub.dartlang.org
- Dart has one mechanism for library importing (which doesn't confuse me!)
- I'm not afraid if library x conflicts with library y
- await async works on non ES6 browsers - no wired settings in main config file!
There are still things I like more in Typescript
There is one thing better in TS which I like very much - how interfaces can be applied to Maps allowing using json as typed object.