ES6 Map in Typescript

EDIT (Jun 5 2019): While the idea that “TypeScript supports Map natively” is still true, since version 2.1 TypeScript supports something called Record. Unfortunately the first generic parameter (key type) is still not fully respected: even with a string type, something like peopleA[0] (a number) is still valid. EDIT (Apr 25 2016): The answer below is old and should not be considered the best answer. … Read more

What is TypeScript and why would I use it in place of JavaScript? [closed]

I originally wrote this answer when TypeScript was still hot-off-the-presses. Five years later, this is an OK overview, but look at Lodewijk’s answer below for more depth 1000ft view… TypeScript is a superset of JavaScript which primarily provides optional static typing, classes and interfaces. One of the big benefits is to enable IDEs to provide a richer environment … Read more