TypeScript 2.7 Released
TypeScript, the programming language that brings optional static types to JavaScript by building on JavaScript itself, just got upgraded to TypeScript 2.7. If you are not familiar with TypeScript, have a look at this post we wrote a few months ago, covering the history of the language and some basics.
TypeScript emits clean, readable and agnostic JavaScript that runs bleeding-edge ECMAScript features on any browser, including on older browsers. TypeScript is sophisticated, yet quite effective. It’s easy to learn and easy to work with.
What’s New in TypeScript 2.7
TypeScript is in the top 10 languages used on GitHub. It’s popular among developers, and there is a lot of involvement from the community. For example, one of the new features, Fixed Length Tuples carries the signature of Tycho Grouwstra pull request.
Here are the latest improvements:
- Fixed Length Tuples: Leveraging literal numeric types allow tuples to be distinct from tuples of different arities, tuple types now encode arity and tuples of different arities are no longer assignable to each other.
- in operator narrowing and accurate instanceof: The in operator is now a narrowing expression for types while the instanceof operator now leverages the inheritance chain instead of on relying on structural compatibility.
- Stricter class property checks: The new –strictPropertyInitialization flag, performs checks to enforce that each class property instance is initialized in the constructor body or by a subsequent property initializer.
- Easier ECMAScript module interoperability: -esModuleInterop brings better interoperability with existing “legacy” module formats.
- Unique symbol types and const-named properties: The latest release understands ECMAScript symbols more deeply.
- Definite assignment assertions: A definite assertion in the form of a “!” can be included in variables or property declarations.
More insight on the latest improvements can be found in the release notes.
TypeScript NextGen
With Postcards you can create and edit email templates online without any coding skills! Includes more than 100 components to help you create custom emails templates faster than ever before.
Try FreeOther ProductsIt’s going to be an interesting year for TypeScript. The next release, which is scheduled for March, will bring conditional types and better handling for namespace-patterns in .js files. By the end of the year support for project references, variadic types, flattening declarations or new decorators are in the pipeline.
Get TypeScript 2017
Visual Studio 2015 users can install TypeScript 2.7 from here, but if you are running Visual Studio 2017 or later, TypeScript can be installed from here.
Keep in mind that there are some minor breaking changes, and you can get familiar with them on the Breaking Changes wiki page. Happy TypeScripting!