Home » today » Technology » Microsoft: Typescript version 4.0 released – Golem.de

Microsoft: Typescript version 4.0 released – Golem.de

The list of new features in version 4.0 of Microsoft’s Typescript programming language is not long; a few may require a few changes. But some of it is really practical. Whether a new major release would have been necessary for this is not just an issue Reddit asked.

Stellenmarkt

  1. Hitschler International GmbH & Co. KG, Hürth
  2. OEDIV KG, Oldenburg

In the new version there are variadic tuples, elements in tuples can be given a label and flow control can determine the types of properties in classes, if noImplicitAnynoImplicitAny is activated. There are three previously missing assignment operators: There are now && =, || = and ?? =. The operators are short circuits, so the right part is only evaluated if the first does not already determine the final result. In catch clauses the type of the variable can now be written as unknown must be specified, which is more type-safe because it requires type checks before operations can be performed. And JSX provides an option for the fragments to use a customized fragment factory.

Refactoring has also been expanded. Some patterns can be converted into optional chaining and nullish coalescing in version 4.0. In editing support, /** @deprecated * marked declarations are now displayed with a line through them.

Since the start-up times of the editor were too bad for large projects, the problem was identified with the program construction process – the parser that reads the entire project with all dependencies. Until this process is finished, many editor functions are not yet available. For this reason, a Partial Semantic Mode was introduced, which initially only provides what is parsed, what is open in the editor, and only then takes care of the bigger picture. Even with large projects, it only takes seconds until at least partial mode is available and functions such as tooltips or suggested completions are available while the entire project is still being loaded in the background.

So far, so harmless. But there are also a few code-breaking changes: lib.d.ts declarations have changed, properties that overwrite accessors are just as an error as accessores that overwrite properties, operands for delete must now either any, unknown, never or optional and the node factory was named depricated explained.

Why is it the new one Typescript website made it into the changelist is a mystery. In any case, it is completely new.

Please activate Javascript.
Or use that Golem pure offer

and read Golem.de

  • without advertisement
  • with Javascript turned off
  • with RSS full text feed

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.