• chevron_right

      TypeScript 4.2 tunes tuple types

      pubsub.slavino.sk / infoworldcom · Wednesday, 24 February, 2021 - 20:18 edit

    Microsoft has published the production release of TypeScript 4.2, an update to the popular open source language that adds types to JavaScript. Arrived February 23, TypeScript 4.2 features enhancements pertaining to tuple types and type aliases.

    TypeScript 4.2 expands the ways rest elements in tuple types can be used. Previously, TypeScript only permitted rest elements in the last position of a tuple type. Now, rest elements can occur almost anywhere within a tuple, with a few restrictions. A rest element cannot be followed by another optional element or rest element, and only one rest element is permitted per tuple.

    [ Also on InfoWorld: The most valuable software developer skills to get hired now ]

    TypeScript 4.2 also includes these changes and enhancements:

    To read this article in full, please click here


    Značky: #JavaScript, #Rozne