News

TypeScript 2.9 Adds Notable Editor Features

TypeScript 2.9 has shipped with several new editor features added along with some language/compiler features.

The open source programming language is primarily developed and maintained by Microsoft, providing a strict syntactical superset of JavaScript with the addition of optional static typing.

While TypeScript 2.8, which shipped in March, was known for its addition of support for conditional types, v2.9 adds some interesting editor features. The language figures prominently in many editors including Visual Studio, Sublime Text, Eclipse and especially Visual Studio Code, which just came out in a May update -- version 1.24 -- that supports TypeScript 2.9.

New editor features added to v2.9 include:

  • Rename file and move declaration to new file: This was implemented in response to "much community demand," Daniel Rosenwasser, Microsoft's program manager for TypeScript, said in a blog post last week. The new feature enables moving declarations to their own new files along with the ability to rename files while at the same time updating import paths. Rosenwasser said the functionality might not be implemented in all editors immediately but should soon be propagated broadly.
  • Unused span reporting: With this feature, declared but unused spans that typically generate errors can now be manifested as "unused" suggestion spans. For example, VS Code displays them as grayed-out test. Other editors may handle them differently.
  • Convert property to getter/setter: This editor feature comes courtesy of community developer Wenlu Wang, providing support to easily convert properties to get- and set- accessors.

While Rosenwasser said that while new editor features are often more applicable to users, v2.9 also includes many notable core language/compiler features -- some causing breaking changes that developers have complained about -- including:

Going forward, Rosenwasser said TypeScript 3.0 will feature "an experience around project-to-project references, a new unknown type, a stricter any type, and more." These and other planned features can be seen in the TypeScript Roadmap. Meanwhile, features requested and implemented -- or not -- can be seen on this GitHub issues site. There, the most-commented issue is a 2014 post calling for the language to "Support some non-structural (nominal) type matching."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Microsoft Previews Mads Kristensen Keynote at Orlando Dev Conference

    Microsoft today previewed a keynote presentation by Visual Studio guru Mads Kristensen at an upcoming developer/IT pro event where he will be joined by other company dev luminaries such as Jon Galloway, Rachel Kang, and James Montemagno.

  • Syncfusion Open Sources 14 Controls for .NET MAUI

    Third-party .NET-centric dev UI tooling specialist Syncfusion this week announced the open sourcing of 14 controls for .NET MAUI, the evolution of Xamarin.Forms that adds support for building desktop apps.

  • Kubernetes for Developers

    "Kubernetes has a lot of 'moving parts' so can be intimidating at first," says Dan Wahlin, a principal cloud developer advocate at Microsoft who promises to explain everything at a developer conference next month in Orlando.

  • New Combit Reporting Tool Release Supports .NET 9

    The List & Label reporting tool by combit helps devs integrate advanced reporting, printing and exporting capabilities into their apps for web, cloud and desktop environments with minimal code.

Subscribe on YouTube