Skip to content

TypeScript 5.2 Iteration Plan #54298

Description

This document outlines our focused tasks for TypeScript 5.2. It minimally indicates intent to investigate tasks or contribute to an implementation. Nothing is set in stone, but we will strive to complete these tasks in a reasonable timeframe.

Date Event
2023-05-30 TypeScript 5.1 Release
2023-06-23 Create 5.2 Beta (5.2.0) Build for Testing
2023-06-27 TypeScript 5.2 Beta Release
2023-08-04 Create 5.2 RC (5.2.1) Build for Testing
2023-08-08 TypeScript 5.2 RC Release
2023-08-18 Create 5.2 Final (5.2.2) Build for Testing
2023-08-22 TypeScript 5.2 Final Release 🚀
gantt
    dateFormat  YYYY-MM-DD
    TypeScript 5.1 Stabilization Period : 2023-05-15, 2023-05-30
    TypeScript 5.2 Beta Development : 2023-05-15, 2023-06-27
    TypeScript 5.2 RC Development : 2023-06-27, 2023-08-04
    TypeScript 5.2 Stabilization Period : 2023-08-04, 2023-08-22
todayMarker stroke-width:5px,stroke:#0f0,opacity:0.5
Loading

Compiler and Language

Editor and Language Service

Performance

Website and Docs

Infrastructure

Activity

  1. DanielRosenwasser commented on May 18, 2023

    @DanielRosenwasser
    MemberAuthor

    The previous Iteration Plan for TypeScript 5.1 is available here.

  2. fleddri commented on May 23, 2023

    @fleddri

    Are there any plans or discussions regarding #53656?

  3. TmLev commented on Jun 2, 2023

    @TmLev

    Also interested if you have any plans regarding #41316? Working on libraries seems impossible without it sometimes.

  4. Mike-Dax commented on Jun 15, 2023

    @Mike-Dax

    I've been recently hitting up against #53018 and #54029 seems to open a bunch of opportunities for reverse mapped types to receive better inference. It would be a real game changer to our main APIs. Is there anything a community member can do to help with something like this?

  5. max-kamps commented on Jun 23, 2023

    @max-kamps

    Is #14729 still being investigated? It got closed after #51328 got accepted for 5.1, but has since been re-opened since the PR didn't actually address most of #14729's usecases.

  6. DanielRosenwasser commented on Jun 27, 2023

    @DanielRosenwasser
    MemberAuthor

    TypeScript Bot (@typescript-bot) sync release-5.2 and LKG

  7. typescript-bot commented on Jun 27, 2023

    @typescript-bot
    Contributor

    Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to sync release-5.2 with main for you. Here's the link to my best guess at the log.

  8. Andarist commented on Jun 27, 2023

    @Andarist
    Contributor

    I've been recently hitting up against #53018 and #54029 seems to open a bunch of opportunities for reverse mapped types to receive better inference. It would be a real game changer to our main APIs. Is there anything a community member can do to help with something like this?

    Michael (@Mike-Dax) my PR isn't (yet) complete - it has some rough edges that I need to figure out. I'd happily collaborate on this one with somebody, I already know what I want to do there just need to find a proper way to fit those ideas into the code and the available data structures.

  9. fatcerberus commented on Jul 3, 2023

    @fatcerberus

    Here's the link to my best guess at the log.

    What the… what even kind of bot is this
    Bad bot

  10. timbuckley commented on Jul 6, 2023

    @timbuckley
    Contributor

    Not explicitly mentioned above but this also lands support for Change Array By Copy methods (eg arr.toReversed(), arr.toSorted(), arr.with(index, value), etc).

    Issue: #50333
    PR: #51367
    ECMAScript proposal: https://github.com/tc39/proposal-change-array-by-copy

  11. RyanCavanaugh commented on Jul 7, 2023

    @RyanCavanaugh
    Member

    FYI: #54923

  12. DanielRosenwasser commented on Aug 7, 2023

    @DanielRosenwasser
    MemberAuthor
  13. typescript-bot commented on Aug 7, 2023

    @typescript-bot
    Contributor

    Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to update the version number on release-5.2 to 5.2.1-rc for you. Here's the link to my best guess at the log.

  14. eps1lon commented on Aug 11, 2023

    @eps1lon
    Contributor

    How template literals as computed properties on objects are now typed as literals instead of strings seems to not be mentioned in the changelog:

    const key = 'foo'
    
    // {
    //    foo: number;
    //    "foo-de": string;
    // }
    
    const object = {
        [key]: 1,
        [`${key}-de`]: "2"
    }
    
    // Errors in 5.1.6 with "Property 'match' does not exist on type 'string | number'."
    object['foo-de'].match(/2/)
    object['foo'] + 1;

    Playground Link 5.2.0-beta

    vs

    const key = 'foo'
    
    // {
    //    [x: string]: string | number;
    //    foo: number;
    // }
    
    const object = {
        [key]: 1,
        [`${key}-de`]: "2"
    }
    
    
    // @ts-expect-error
    object['foo-de'].match(/2/)
    object['foo'] + 1;

    Playground Link 5.1.6

    Seems like a good change but probably worth mentioning.

  15. Andarist commented on Aug 11, 2023

    @Andarist
    Contributor

    If im not mistaken this was changed by #53907

  16. eps1lon commented on Aug 14, 2023

    @eps1lon
    Contributor

    Also positive change: referencing const enums in template literal types used to error under --isolatedModules but doesn't anymore:

    export declare const enum OBJECT_INDICATION_TYPE {
        HIGHLIGHTED_DOT = "HIGHLIGHTED_DOT"
    }
    type Values<T> = {
        [K in keyof T]: T[K];
    }[keyof T];
    export type IndicationType = `${Values<typeof OBJECT_INDICATION_TYPE>}`;
    // Fixed:                                     ^^^^^^^^^^^^^^^^^^^^^^ Cannot access ambient const enums when 'isolatedModules' is enabled.(274
    export {};

    Playground Link

  17. DanielRosenwasser commented on Aug 20, 2023

    @DanielRosenwasser
    MemberAuthor
  18. typescript-bot commented on Aug 20, 2023

    @typescript-bot
    Contributor

    Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to update the version number on release-5.2 to 5.2.2 for you. Here's the link to my best guess at the log.

  19. dimatakoy commented on Aug 25, 2023

    @dimatakoy

    Version 5.2.2 is already available on npm, but I don't see a corresponding tag and release/changelog in this repository. Can you add the actual release here on the github?

  20. DanielRosenwasser commented on Aug 25, 2023

    @DanielRosenwasser
    MemberAuthor

    It's tagged now - but can I ask what you all use the tag for?

  21. timbuckley commented on Aug 25, 2023

    @timbuckley
    Contributor

    It's tagged now - but can I ask what you all use the tag for?

    Speaking for myself: Github watch notifications on release tags to know when new releases happen.

  22. dimatakoy commented on Aug 26, 2023

    @dimatakoy

    It's tagged now - but can I ask what you all use the tag for?

    — Release notifications / changelogs
    — Easy way to compare releases

  23. RHOOPH commented on Sep 5, 2023

    @RHOOPH

    Not explicitly mentioned above but this also lands support for Change Array By Copy methods (eg arr.toReversed(), arr.toSorted(), arr.with(index, value), etc).

    Issue: #50333 PR: #51367 ECMAScript proposal: https://github.com/tc39/proposal-change-array-by-copy

    I've upgraded to 5.2.2 but still shows error.
    Property 'toSpliced' does not exist on type 'string[]'. Did you mean 'splice'?
    Am i missing something? Tim (@timbuckley)

  24. timbuckley commented on Sep 5, 2023

    @timbuckley
    Contributor

    Not explicitly mentioned above but this also lands support for Change Array By Copy methods (eg arr.toReversed(), arr.toSorted(), arr.with(index, value), etc).
    Issue: #50333 PR: #51367 ECMAScript proposal: https://github.com/tc39/proposal-change-array-by-copy

    I've upgraded to 5.2.2 but still shows error. Property 'toSpliced' does not exist on type 'string[]'. Did you mean 'splice'? Am i missing something? Tim (@timbuckley)

    Kowshik Achar (@RHOOPH) I think your runtime (whether browser or Node) still needs to use toSpliced, independent of whether TypeScript understands that type (which it only does after 5.2).

    Node v20 is the first Node version to support it, for example. Scroll down to that line in this compatibility chart: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#browser_compatibility

  25. sacru2red commented on Oct 5, 2023

    @sacru2red

    target should set to esnext. In tsconfig.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PlanningIteration plans and roadmapping

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions