News

TypeScript 3.0 Ships

TypeScript 3.0 Ships

Less than three weeks since the release candidate was unveiled, Microsoft has shipped the final TypeScript 3.0 release.

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 using types can help with the authoring experience, the TypeScript compiler actually emits clean readable JavaScript that runs in any ECMAScript runtime -- such as browsers and Node.js -- with constructs such as type declarations and annotations removed.

"At its core, this experience means analyzing your code to catch things like bugs and typos before your users run into them; but it brings more than that," Microsoft's Daniel Rosenwasser said in a post yesterday (July 30) announcing v3.0. "Thanks to all that information and analysis TypeScript can provide a better authoring experience, providing code completion and navigation features like Find all References, Go to Definition, and Rename in your favorite editor."

TypeScript 3.0 introduces few breaking changes from its preceding versions, Microsoft said, which means it should make for an easy upgrade.

Among new features, Rosenwasser highlighted new project reference functionality, designed to better support various project scenarios, such as multiple folders with a variety of interdependent and shared code strategies.

"Project references allow TypeScript projects to depend on other TypeScript projects –- specifically, allowing tsconfig.json files to reference other tsconfig.json files," Rosenwasser said. "Specifying these dependencies makes it easier to split your code into smaller projects, since it gives TypeScript (and tools around it) a way to understand build ordering and output structure. That means things like faster builds that work incrementally, and support for transparently navigating, editing, and refactoring across projects. Since 3.0 lays the foundation and exposes the APIs, any build tool should be able to provide this."

The new version also introduces new support for operating on parameter lists, new types that enforce explicit checks, improved JSX support (JSX is a syntax extension integral to React.js), a better error UX and much more, Rosenwasser said.

Detail on these and other new functionality can be found in our coverage of the release candidate, the open source documentation, the project's "what's new" section of its GitHub site and in Rosenwasser's post.

TypeScript 3.0 can be installed through NuGet or the npm package manager.

Rosenwasser said developers can also get editor support for:

"Going forward, we foresee bringing more value to the type system and tooling experience, polishing the existing work on project references, and making TypeScript (both the language and the project) more approachable by whatever means we can," Rosenwasser said. "But in addition to that, we want to explore what we can do to empower more tool authors and users in the JavaScript community – to bring value to users who could still get value from using TypeScript even without directly using TypeScript."

The TypeScript roadmap provides more guidance on what's coming up for the language.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events