TypeScript 4.0 arrives with performance boosts

TypeScript 4.0 arrives with performance boosts

Newly arrived production release improves build speeds and startup times and brings editing and coding enhancements

TypeScript 4.0, a major upgrade to Microsoft’s popular typed superset of JavaScript, is now available as a production release, with improvements for builds and editing scenarios as well as support for variadic tuple types. The TypeScript 4.0 production release arrived August 20.

TypeScript 4.0 boosts speed in the build mode, with the caching of semantic diagnostics in the builder written to the disk with .tsbuildinfo, to benefit the next incremental build. This is intended to fix a situation in which compiling a program after a previous compile with errors under --incremental would be very slow when using the --noEmitOnError flag.

Also on InfoWorld: What is Jamstack? The static website revolution upending web development ]

Further, new JavaScript/TypeScript functionality improves editing scenarios in Visual Studio Code and Visual Studio 2017/2019. A new partial editing mode at startup addresses slow startup times, particularly on bigger projects. A smarter auto-imports capability does extra work in editor scenarios to include packages listed in the package.json’s dependencies field. Information from these packages is used to improve auto-imports while not changing anything like type-checking.

Other capabilities in TypeScript 4.0 include:

  • Variadic tuple types provide the ability for tuple types to have spreads of generic types that can be replaced with actual elements through type instantiation. Spreads in tuple type syntax now can be generic. Thus, higher-order operations on tuples and arrays can be represented even if the actual types being operated over are not known. Also, spread elements can occur anywhere in a tuple, not just at the end. Version 4.0 also improves the inference process for rest parameters and rest tuple elements. Variadic tuple types enable new patterns, especially around function composition.
  • Tuple types now can provide labels, for ease of use.
  • Control flow analysis now can be used to determine the types of properties in classes when noImplicitAny is enabled.
  • A proposal to add three new assignment operators, &&=, ||=, and ??=, is supported as a coding enhancement.
  • The type of catch clause variables can be specified as unknown, with unknown being safer than any because it reminds developers that they must perform type-checking before operating on their values.
  • For JSX factories, users can customize the fragment factory through a new jsxFragmentFactory option. A fragment is a type of JSX element for returning multiple child elements.
  • In a breaking change, operands for delete must be optional. Also, the usage of TypeScript’s node factory has been deprecated.

typescript

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

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

What’s New In Typescript 4.0?

Today I am going to talk about new features in Typescript 4.0. TypeScript 4.0 comes with lots of new features to make JavaScript development easier.

Learn TypeScript | TypeScript Crash Course | TypeScript Tutorial for Beginners

Learn TypeScript | TypeScript Crash Course | TypeScript Tutorial for Beginners: My goal with this courses is just give your the fundamentals of the language, show you what TypeScript is and how to use it. We as developers don't have time neither can we afford to spend too much time on any tehcnology.

Microsoft Releases TypeScript 4.0 With Speed Boosting Features

Microsoft recently announced the availability of TypeScript version 4.0, an open-source language that is built on top of JavaScript.

TypeScript — Compilation & the TypeScript Compiler

TypeScript — Compilation & the TypeScript Compiler. In this lesson, we are going to learn about the settings of the TypeScript compiler and the usage of the tsconfig.json file.