TypeScript 2.1 has been released

TypeScript 2.1 has been released.

As per announcement Announcing TypeScript 2.1, the biggest improvements are:

  • Finally, async/await is available for ES5/ES3 compilation (so: it doesn't require to compile to ES6 anymore).
    This feature is really important, because, like in the C# world, it allows to develop async code in a linear fashion.

  • Object spead: it allows to shallow copy objects, and also to merge more of them in a single final result;
    dually there are object rest, that are used to pickup extra properties in a destructuring operation.

  • keyof operator: it allows to declare a type as an union string based on the fields of another object or class.
  • Mapped types: they allow to declare a new type as a variation of another type;
    merge with the keyof operator, they allow to declare a new type, based on another type, where all the fields are readonly, or boolean, or nullable, for example.
  • Finally, as now there is a different behaviour in module imports, it is reccomended to change this value in your tsconfig.json file:
            "compilerOptions": {
                "noImplicitAny": true,

Add comment