Skip to content

Retain widening state of literal types in typeof expressions.#51725

Closed
RyanCavanaugh wants to merge 1 commit into
microsoft:mainfrom
RyanCavanaugh:fix51723
Closed

Retain widening state of literal types in typeof expressions.#51725
RyanCavanaugh wants to merge 1 commit into
microsoft:mainfrom
RyanCavanaugh:fix51723

Conversation

@RyanCavanaugh
Copy link
Copy Markdown
Member

Reverts #25471, unfixes #25469, fixes #51723

@RyanCavanaugh
Copy link
Copy Markdown
Member Author

@typescript-bot test this
@typescript-bot test top100
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Heya @RyanCavanaugh, I've started to run the parallelized Definitely Typed test suite on this PR at 1fffc23. You can monitor the build here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Heya @RyanCavanaugh, I've started to run the diff-based user code test suite on this PR at 1fffc23. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Heya @RyanCavanaugh, I've started to run the extended test suite on this PR at 1fffc23. You can monitor the build here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Heya @RyanCavanaugh, I've started to run the diff-based top-repos suite on this PR at 1fffc23. You can monitor the build here.

Update: The results are in!

@RyanCavanaugh
Copy link
Copy Markdown
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Heya @RyanCavanaugh, I've started to run the tarball bundle task on this PR at 1fffc23. You can monitor the build here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Dec 2, 2022

Hey @RyanCavanaugh, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/139483/artifacts?artifactName=tgz&fileId=6E5DFBCE52D62C84526B75BBD587BF8934AFE14C963A0EF5306EF9648C3AEE5502&fileName=/typescript-5.0.0-insiders.20221202.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.0.0-pr-51725-7".;

@typescript-bot
Copy link
Copy Markdown
Collaborator

@RyanCavanaugh Here are the results of running the user test suite comparing main and refs/pull/51725/merge:

Everything looks good!

@typescript-bot
Copy link
Copy Markdown
Collaborator

Heya @RyanCavanaugh, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

@RyanCavanaugh Here are the results of running the top-repos suite comparing main and refs/pull/51725/merge:

Everything looks good!

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type casting a variable to its own type should preserve literal widening information

2 participants