TypeScript


Microsoft announced the availability of the latest stable version of its programming  language, TypeScript 4.0 and as the next generation of TypeScript releases, with focus on expressivity, productivity, and scalability.

While TypeScript is an open-source programming language developed by Microsoft, which serves as a strict syntactical superset of JavaScript with optional static typing support.

TypeScript is fundamentally designed for development of applications at scale and transcompiles directly to JavaScript.

What's New in TypeScript 4.0?



TypeScript 4.0 comes as a major milestone in the programming language, with several enhancements and new features, such as Variadic Tuple Types, which function in JavaScript is called concat that takes two array or tuple types and concatenates them together to make a new array.

It brings two fundamental changes, along with inference improvements to make typing easier. The first change is the fact that spreads in tuple type syntax is now generic, which means that users can represent higher-order operations on tuples and arrays even when they don’t know the actual types operating over.

And if generic spreads are instantiated (or, replaced with a real type) in the tuple types, they can produce other sets of array and tuple types. You can find all the major new features and changes in TypeScript 4.0 below:

  • Custom JSX Factories
  • Labeled Tuple Elements
  • Short-Circuiting Assignment Operators
  • Class Property Inference from Constructors
  • Unknown on catch Clauses


Additionally, TypeScript 4.0 changes the outcome of compiling a program after a previous compile with errors under --incremental, which would previously be extremely slow when using the --noEmitOnError flag, because of none of the information from the last compilation would be cached in a .tsbuildinfo file based on the --noEmitOnError flag.

Now, it gives a great speed boost in the above scenarios, improving --build mode scenarios (which imply both --incremental and --noEmitOnError).

Getting started with TypeScript 4.0



If you want to get started in using TypeScript 4.0, you should install it via NuGet or NPM:

npm i typescript


Also, you can test code using the TypeScript playground or any text editor that supports TypeScript, such as Visual Studio Code. And the official instructions for using TypeScript in Visual Studio Code is available here!

TypeScript 4.0: What's New in the latest version of the Programming language?

TypeScript


Microsoft announced the availability of the latest stable version of its programming  language, TypeScript 4.0 and as the next generation of TypeScript releases, with focus on expressivity, productivity, and scalability.

While TypeScript is an open-source programming language developed by Microsoft, which serves as a strict syntactical superset of JavaScript with optional static typing support.

TypeScript is fundamentally designed for development of applications at scale and transcompiles directly to JavaScript.

What's New in TypeScript 4.0?



TypeScript 4.0 comes as a major milestone in the programming language, with several enhancements and new features, such as Variadic Tuple Types, which function in JavaScript is called concat that takes two array or tuple types and concatenates them together to make a new array.

It brings two fundamental changes, along with inference improvements to make typing easier. The first change is the fact that spreads in tuple type syntax is now generic, which means that users can represent higher-order operations on tuples and arrays even when they don’t know the actual types operating over.

And if generic spreads are instantiated (or, replaced with a real type) in the tuple types, they can produce other sets of array and tuple types. You can find all the major new features and changes in TypeScript 4.0 below:

  • Custom JSX Factories
  • Labeled Tuple Elements
  • Short-Circuiting Assignment Operators
  • Class Property Inference from Constructors
  • Unknown on catch Clauses


Additionally, TypeScript 4.0 changes the outcome of compiling a program after a previous compile with errors under --incremental, which would previously be extremely slow when using the --noEmitOnError flag, because of none of the information from the last compilation would be cached in a .tsbuildinfo file based on the --noEmitOnError flag.

Now, it gives a great speed boost in the above scenarios, improving --build mode scenarios (which imply both --incremental and --noEmitOnError).

Getting started with TypeScript 4.0



If you want to get started in using TypeScript 4.0, you should install it via NuGet or NPM:

npm i typescript


Also, you can test code using the TypeScript playground or any text editor that supports TypeScript, such as Visual Studio Code. And the official instructions for using TypeScript in Visual Studio Code is available here!

No comments