GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — regression: Private fields appear in type literal in declarations (5.9) · Issue #62153 · microsoft/TypeScript

regression: Private fields appear in type literal in declarations (5.9) #62153

New issue
Copy link
New issue
Copy link
Closed
#62155
Closed
regression: Private fields appear in type literal in declarations (5.9)#62153
#62155
Copy link
Assignees
weswighamcopilot-swe-agent
Labels
BugA bug in TypeScript
Milestone
TypeScript 5.9.3

Description

@dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)
opened on Jul 31, 2025
Issue body actions

🔎 Search Terms

private declaration

🕗 Version & Regression Information

  • This changed between versions 5.8 and 5.9

⏯ Playground Link

Playground Link

💻 Code

export const ClassExpression = class {
    #context = 0
};

🙁 Actual behavior

Declaration file contains invalid syntax

export declare const ClassExpression: {
    new (): {
        #context: number;
    };
};

🙂 Expected behavior

5.8 output is also incorrect but at least syntactically valid

export declare const ClassExpression: {
    new (): {
        "__#1@#context": number;
    };
};

Additional information about the issue

No response

Reacted by Rob Palmer
Reacted by Copilot

Activity

  1. Titian Cernicova-Dragomir (dragomirtitian)
    changed the title [-]regression: Private fields appear in type literal in declarations[/-] [+]regression: Private fields appear in type literal in declarations (5.9)[/+] on Jul 31, 2025
  2. Ryan Cavanaugh (RyanCavanaugh)
    added
    BugA bug in TypeScript
    on Jul 31, 2025
  3. Ryan Cavanaugh (RyanCavanaugh)
    assigned
    Wesley Wigham (weswigham)
    and
    Copilot
    on Jul 31, 2025
  4. Daniel Rosenwasser (DanielRosenwasser)
    added this to the TypeScript 5.9.3 milestone on Jul 31, 2025
  5. jakebailey commented on Jul 31, 2025

    @jakebailey
    Jake Bailey (jakebailey)
    on Jul 31, 2025
    Member
    More actions

    Bisects to #61492, somehow. Gabriela Araujo Britto (@gabritto)

    Reacted by Gabriela Araujo Britto
  6. weswigham commented on Jul 31, 2025

    @weswigham
    Wesley Wigham (weswigham)
    on Jul 31, 2025
    Member
    More actions

    I imagine expandable hover fixed printback of private props to be actual private props and not internal symbol names, so they could be displayed in the expansion. Really, this should be an error during declaration emit, like the private case is.

  7. Wesley Wigham (weswigham)
    closed this as completedin #62155on Jul 31, 2025
  8. microsoft
    locked as resolved and limited conversation to collaborators on Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • Copilot
  • @weswigham
    Wesley Wigham (weswigham)

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

    Milestone

    • TypeScript 5.9.3

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.