4 ms·
> - Consistent async API (incl. Future, Streams, async* for Streams, async/await support everywhere). async.js is nowhere near to this. There now are Promises
by TomMarius 10y ago
> - Consistent async API (incl. Future, Streams, async* for Streams, async/await support everywhere). async.js is nowhere near to this.
There now are Promises and Promise-based async/await keywords. Sure, there are some legacy APIs, but this is no longer as true as it used to be.
> - Type inference and analyzer toolchain that works and don't need to fall back on grep. The moment you start using anything like lodash or similar you will lose your ability to explore the code reliably.
TypeScript has introduced mapped and lookup types in its latest version, that solves this problem.
- isoos 10y agoWe have a disagreement on the definition of "solves the problem". Having tried to refactor a codebase with heavy lodash use, that battle seems to be lost. Also, take a look at the async* construct here: https://www.dartlang.org/articles/language/beyond-async https://www.dartlang.org/articles/language/beyond-async Nothing similar is in TypeScript, and this is roughly a two-years old feature in Dart, not a fancy-new hype. I have used it couple of times, it is useful, and again: consistent across the board. Of course if you are happy with the limited promise support in TypeScript, go ahead with it. However saying that they are on-par is far from the truth.