Close Menu
Technotification
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Technotification
    • Home
    • News
    • How To
    • Explained
    • Facts
    • Lists
    • Programming
    • Security
    • Gaming
    Technotification
    Home › Programming › TypeScript 3.5 Released with ‘Omit’ Helper, Excess Property Checks and More

    TypeScript 3.5 Released with ‘Omit’ Helper, Excess Property Checks and More

    By Subham KapisweDecember 3, 2022
    Facebook Twitter Reddit LinkedIn
    typescript 35-compressed

    Just after the release of TypeScript 3.4 two months ago, Daniel Rosenwasser, Program Manager at TypeScript, announced the release of TypeScript 3.5 yesterday.

    The version has a lot of new additions and improvements in the language, compiler, editor and some most awaited features as well. So, let’s have a look at some changes in the language and compiler first, then we will discuss improvements in the editing tools.

    Also Read: Difference Between TypeScript and Javascript Programming

    typescript programming language

    Contents

    • Compiler and Language
      • The ‘Omit’ Helper Type
      • Improved Excess Property Checks in Union Types
      • Smarter Union Type Checking
      • Speed Improvements
    • New Editing Tools
      • Extract to Type Alias
      • Smart Select
      • Object.keys Reject Primitives in ES5
    • Final Words

    Compiler and Language

    The ‘Omit’ Helper Type

    A brand new version of ‘Omit’ has been defined in the TypeScript 3.5. It includes its own lib.d.ts which can be used wherever you want. Not only the users but the compiler will itself use ‘Omit’ type to express types created by object rest, destructuring declarations on generics.

    Improved Excess Property Checks in Union Types

    In the earlier versions of TypeScript, certain excess properties were allowed in the object literal, even when they didn’t match between Point and Label. TypeScript now comes with a feature for excess property checking in object literals. The type-checker will verify that all the provided properties belong to some union member with the appropriate type.

    Smarter Union Type Checking

    TypeScript compares each constituent type while checking against union types in isolation. The process basically involves checking whether is source type is assignable to target. In the latest version of TypeScript, when you assign to types with discriminant properties like in T, the language go even further and decomposes types like S into a union of every possible inhabitant type. The TypeScript was lacking this in the earlier versions.

    Speed Improvements

    Since TypeScript 3.3, the development team has been heavily focusing on optimizing certain code paths and stripping down certain functionality. As a result, the new version is a way faster than both of the previous versions. There’s a significant decrease in the compile time and other editor operations would be much faster. Lastly, in TypeScript 3.5, the amount of rebuilding time is reduced by 68% as compared to TypeScript 3.4.

    Read: Microsoft Launches Bosque: An Open Source Programming Language

    New Editing Tools

    Extract to Type Alias

    TypeScript 3.5 comes with a whole new refactoring system that allows you to extract types to local type aliases. However, there’s still room for improvement. If you are someone who prefers interfaces over type aliases, you may face some issues while extracting object types to interfaces.

    Smart Select

    This feature will provide an API and enable developers to expand text selections further in a syntactical manner. Smart Select is a cross-platform feature and available for every editor which can appropriately query TypeScript’s language server.

    Object.keys Reject Primitives in ES5

    In ECMAScript 5, if you pass Object.keys through any non-object argument, it will throw an exception. In TypeScript 3.5, if your target is ES5, calls to Object.keys must pass a valid object. This change interacts with the change in generic inference from {} to unknown.

    Also Read: JavaScript: The Best and Worst Programming Language

    Final Words

    The main goal of the new version of TypeScript is to make the coding experience faster and happier. The company has already given the iteration plan document for the next version of TypeScript. It’s a kind of roadmap for users to get an idea of what they can expect for the upcoming version. If you feel that I’ve missed some important feature or change, make sure to share with us in the comments below.

    Share. Facebook Twitter LinkedIn Tumblr Reddit Telegram WhatsApp
    Subham Kapiswe
    • LinkedIn

    A computer science engineer by education and blogger by profession who loves to write about Programming, Cybersecurity, Blockchain, Artificial Intelligence, Open Source and other latest technologies.

    Related Posts

    The Best Python Libraries for Data Visualization in 2025

    April 1, 2025

    Is C++ Still Relevant in 2025 and Beyond?

    February 20, 2025

    5 Best Programming Languages for Machine Learning in 2025

    February 18, 2025

    10 Must-Have Chrome Extensions for Web Developers in 2025

    February 17, 2025

    Difference Between C, C++, C#, and Objective-C Programming

    February 16, 2025

    How to Learn Programming Faster and Smarter in 2025

    February 14, 2025
    Lists You May Like

    10 Sites to Watch Free Korean Drama [2025 Edition]

    January 2, 2025

    10 Best RARBG Alternative Sites in April 2025 [Working Links]

    April 1, 2025

    The Pirate Bay Proxy List in 2025 [Updated List]

    January 2, 2025

    10 Best Torrent Search Engine Sites (2025 Edition)

    February 12, 2025

    10 Best GTA V Roleplay Servers in 2025 (Updated List)

    January 6, 2025

    5 Best Torrent Sites for Software in 2025

    January 2, 2025

    1337x Alternatives, Proxies, and Mirror Sites in 2025

    January 2, 2025

    10 Best Torrent Sites for eBooks in 2025 [Working]

    January 2, 2025

    10 Best Anime Torrent Sites in 2025 [Working Sites]

    January 6, 2025

    Top Free Photo Editing Software For PC in 2025

    January 2, 2025
    Pages
    • About
    • Contact
    • Privacy
    • Careers
    Privacy

    Information such as the type of browser being used, its operating system, and your IP address is gathered in order to enhance your online experience.

    © 2013 - 2025 Technotification | All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.