TypeScript 3.6 introduces a range of usability improvements, which should make it easier for developers to detect errors and give them greater control.

The worst programming languages ​​to learn in 2019
Codementor lists difficult languages ​​that may not be worth it.

The latest version of Microsoft's popular TypeScript spin-off JavaScript is now available.

Compulsory reading developer content

TypeScript 3.6 introduces a range of usability improvements, which should make it easier for developers to detect errors and give them greater control.

For those who don't know, TypeScript is a superset of JavaScript developed by Microsoft, which adds optional type verification and other features that make it easy to write large and complex code bases using JavaScript.

In recent years, the popularity of TypeScript has increased considerably, and today it is used by large companies such as Slack and Microsoft.

Being built on JavaScript, TypeScript has many similarities to the base language and can be compiled in basic JavaScript, which makes it relatively easy to change the use of JavaScript to TypeScript.

One of the biggest improvements in TypeScript 3.6 is a change in generators to give developers more control over how they are used.

TypeScript generators can transmit data through the keywords return or yield and in 3.6 developers can now determine whether the data was returned or transferred.

The addition of strict verification for iterators and generators means that the TypeScript verifier also knows the data type of the values ​​that are returned or obtained.

SEE: How to build a successful developer career (free PDF) (TechRepublic)

In addition, TypeScript now knows that the type of data can be passed to a generator using next () and it will throw an error if a developer does not match the type, for example, assigning an integer to a variable declared as a string.

In other changes, when the operator … spread is used, for example, to pass a single array of variables to a function that expects multiple arguments, TypeScript gives developers more control to eliminate unexpected behaviors.

TypeScript 3.6 also simplifies the process of using Promises, commonly used when handling asynchronous data, for example, when the code has to wait for an unknown period for the data to be returned from an online API.

Error messages returned by Promises now remind the developer of the need to wait for the contents of a Promise to be returned, using .then () or wait .

Supported editors, such as Visual Studio or Visual Studio Code, can now also highlight and add the missing keywords on hold in the code. Support for TypeScript 3.6 is available in Visual Studio, Visual Studio Code and Sublime Text 3, and other publishers are expected to obtain support in the near future.

You can read about the other changes in TypeScript 3.6 here. The update to TypeScript 3.6 can be done through npm and the command npm install -g typecript or through Nuget.

The next major version of TypeScript is expected to add the long-awaited optional chaining feature, which makes it easy to write code that interrogates nested data and can handle unexpected changes in the data structure.

You can read what other features are on the horizon by consulting the six month roadmap of the language.

For those who want to experiment with TypeScript with minimal hassle, the online TypeScript gaming field has also been updated.

If you are interested in obtaining more information about TypeScript, see the TechRepublic summary of the best free resources to learn the language online.

See also

  Programmer working with the program code

Image: iStockphoto / RossHelen

For More Updates Check out Blog, Windows Softwares Drivers, Antivirus, Ms Office, Graphic Design Don’t Forget to Look Our Facebook Page Get Into Pc like us & follow on Twitter- @getinpc

Please Note: This content is provided and hosted by a 3rd party server. Sometimes these servers may include advertisements. igetintopc.com does not host or upload this material and is not responsible for the content.