Since TypeScript supports everything in the current ECMAScript specification, we're going to go over the existing JavaScript features quickly and transition to new features available in ES2015 and beyond, which are also supported in TypeScript. These features are all transpiled to ES5, while others not covered here need to target ES6 (this will be covered in a future chapter).
- ES5 (current version) -
function
,var
, array methods, etc. let
andconst
- Classes (Static, Public/Private, Property Types)
- Arrow Functions
- Template Strings
- Object Literals
- Destructuring
- Default and Rest Parameters
- Spread Operator
- Iterators and
for..of
- Decorators