|TypeScript 1.5 Released|
|Written by Kay Ewbank|
|Friday, 24 July 2015|
TypeScript 1.5 has been released and the developers say it’s a big one.
The new version is part of the newly released Visual Studio 2015, and it adds better support for ES6 features including modules, destructuring, spread, for..of, symbols, computed properties, let/const, and tagged string templates.
TypeScript 1.5 supports the new module syntax from ES6. This is similar to external modules in TypeScript, and you can import modules and export each piece of your public API. You can also selectively import the parts of that public API you want to use.
Modules have also been simplified. Writing about the new version on the Developer Tools blog, Microsoft’s Jonathan Turner says that one of the common points of feedback from users working with TypeScript for the first time is that the modules are a bit confusing, saying:
“Before ES6, there were internal and external modules. Now with support for ES6 modules, there is now another module to learn about. We’re simplifying this with the 1.5 release.”
The blog post about the new version admits:
“one of the tricky things with TypeScript projects is that it’s not often easy to move from a single file to working with a growing project of files. You generally have two options: adding ///<reference> statements to tie your project together, or manually handling everything on the commandline. Neither approach is particularly clean, and easily become a mess as the project grows. Additionally, only the ///<reference> approach works well with editors, so you inevitably have a number of them in addition to your build.”
In recognition of this, TypeScript 1.5 introduces a new feature intended to make getting started with TypeScript easier. The compiler now supports ‘tsconfig.json’, a new file which allows you to specify the files in your project and the compiler settings to use. This lets you create a lightweight project that can be used both on the command-line and within the editor. VS Code, Sublime, Atom, and others already support using tsconfig.json files.
Another improvement in the 1.5 release is support for the proposed Decorator feature of ES7, which is currently being developed in collaboration with the Angular, Ember, and Aurelia teams. Since Decorators are being defined in ES7, which hasn’t stabilized yet, the feature is considered experimental. Decorators allow you to attach metadata to classes and members, as well as update the functionality of what is being decorated.
In addition to being included in Visual Studio 2015, TypeScript 1.5 can be downloaded from Github.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: email@example.com
|Last Updated ( Friday, 24 July 2015 )|