What's New in TypeScript 3.5

What's New in TypeScript 3.5

TypeScript 3.5 introduces several optimizations around type-checking and incremental builds.

Less than two weeks after the release candidate, Microsoft *has shipped the final release of *TypeScript 3.5, the increasingly popular programming language that improves upon JavaScript by allowing optional static typing.

The open source, cross-platform language was even said to be "exploding" in popularity in an analyst report earlier this month.

One of the main highlights of this release is actually a fix for a type-checking bug the TypeScript team introduced in v3.4 that caused longer build times and made TypeScript/JavaScript editor operations "unbearably slow."

Other improvements in the compiler/language department as detailed by program manager Daniel Rosenwasser include:

  • The Omit helper type: This lets developers omit certain properties from an object, such as creating a Person type without a location property. See more here.
  • Improved excess property checks in union types: This improves excess property checking in object literals, a feature used to detect typos for when a type isn't expecting a specific property in a union of two constructs. For example, a const created from a union of a Point and Label now will be flagged if it tries to assign a boolean to a property expecting a string. See more here.
  • The --allowUmdGlobalAccess flag: "In TypeScript 3.5, you can now reference UMD global declarations like export as namespace foo; from anywhere -- even modules -- using the new --allowUmdGlobalAccess flag." See more here.
  • Smarter union type checking: This improves upon union type checking that was previously compared each constitutent type in isolation. Now it digs deeper to see if a type is allowable. It stems from a pull request titled "Relate source types covered by a target discriminated union." See more here.
  • Higher order type inference from generic constructors: This stems from a pull request to "support higher order inferences for constructor functions and to permit function type arguments to higher order composition functions to have other members in addition to their single call signature." See more here.

In the editor tooling department, Rosenwasser called out:

  • Smart Select: "TypeScript 3.5 provides an API for editors to expand text selections farther and farther outward in a way that is syntactically aware -- in other words, the editor knows which constructs it should expand out to. This feature is called Smart Select, and the result is that editors don't have to resort to heuristics like brace-matching, and you can expect selection expansion in editors like Visual Studio Code to 'just work"'." See more here.
  • Extract to type alias: Coming from an open source contributor, this is described by Rosenwasser as "a useful new refactoring to extract types to local type aliases." See more here.

Going forward, developers can expect a v3.6 beta on July 12, with the final version set for Aug. 23. It will include expected work items ranging from strongly typed iterators and generators (in the language department) to APIs for --incremental builds and project references (in the compiler department) to a release overhaul (in the infrastructure department) to "Await feedback for more completion priority improvements" (in the editor features department). All of this and much more is detailed in the TypeScript 3.6 iteration plan.

Looking further down the road, the laundry list of new features in the *TypeScript *road map includes:

  • Variadic types
  • Investigate nominal typing support
  • Flattening declarations
  • Implement ES Decorator proposal
  • Implement ES Private Fields
  • Investigate Ambient, Deprecated, and Conditional decorators
  • Investigate partial type argument inference
  • Quick fix to Scaffold local @types packages
  • Investigate error messages in haiku or iambic pentameter
  • Decorators for function expressions/arrow functions

Note that the possibility of providing error messages in haiku or iambic parameter is still a hot item, with our own .NET expert columnist Peter Vogel offering up the following nugget in a comment on an earlier article that mentioned the poetic PR:

Reference is null.> * Reflect: Cold nature also> * Abhors a vacuum. However, Rosenwasser has said the issue has taken a back seat to more important issues, even throwing some shade on the original idea: "Besides, we'd probably do limericks first anyway. A haiku doesn't even rhyme."

typescript web-development

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Why Web Development is Important for your Business

With the rapid development in technology, the old ways to do business have changed completely. A lot more advanced and developed ways are ...

Important Reasons to Hire a Professional Web Development Company

    You name the business and I will tell you how web development can help you promote your business. If it is a startup or you seeking some...

Hire Dedicated eCommerce Web Developers | Top eCommerce Web Designers

Build your eCommerce project by hiring our expert eCommerce Website developers. Our Dedicated Web Designers develop powerful & robust website in a short span of time.

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

5 Web Design Software You Should Use for Web Development

Want to know best web design software to built an awesome website? We've handpicked the top 5 web development software you should use for your project!