• In chevron_right

      TypeScript 4.6 loosens up

      pubsub.slavino.sk / infoworldcom · Wednesday, 16 February, 2022 - 11:00 edit

    TypeScript 4.6, the next iteration of Microsoft’s strongly typed superset of JavaScript , has moved to a release candidate stage, adding capabilities for control flow analysis and the ES2022 output target since the beta release.

    The release candidate, published February 11, follows the beta release offered on January 21. With control flow analysis for destructured discriminated unions, TypeScript now can narrow types based on a discriminant party. When destructuring individual properties into a const declaration, or when destructuring a parameter into variables that are never assigned to, TypeScript will check if the destructured type is a discriminated union. If so, TypeScript can narrow types of variables depending on checks of other variables.

    To read this article in full, please click here


    Značky: #Typescript, #Rozne, #JavaScript