Skip to content

Consider inferences between mapped type templates lower priority - #44126

Merged
Wesley Wigham (weswigham) merged 1 commit into
microsoft:masterfrom
weswigham:mapped-template-inference-priority
May 29, 2021
Merged

Consider inferences between mapped type templates lower priority#44126
Wesley Wigham (weswigham) merged 1 commit into
microsoft:masterfrom
weswigham:mapped-template-inference-priority

Conversation

@weswigham

Copy link
Copy Markdown
Member

Similarly to how inferences between mapped type constraints are lower priority. In general, inferences through a mapped type are usually just worse than other inferences, if available, due to the (potentially lossy) mapping operation the mapped type is doing.

Fixes #44092

@weswigham

Copy link
Copy Markdown
Member Author

@typescript-bot

TypeScript Bot (typescript-bot) commented May 17, 2021

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the extended test suite on this PR at 99110e9. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 17, 2021

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the parallelized Definitely Typed test suite on this PR at 99110e9. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 17, 2021

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the parallelized community code test suite on this PR at 99110e9. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lower priority makes sense to me, but it seems like a risky change to make in the RC because it will likely result in another complex followup bug. I vote to hold this for 4.4 unless you know that the problem is widespread.

@DanielRosenwasser

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented May 18, 2021

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at 99110e9. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 18, 2021

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), 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/103289/artifacts?artifactName=tgz&fileId=A55A16C587F60DF7E2A4B95F02939F25AB0C274D50F5790CB101D9A07CCF6AD902&fileName=/typescript-4.4.0-insiders.20210518.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@4.4.0-pr-44126-7".;

@DanielRosenwasser

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-4.3

@typescript-bot

TypeScript Bot (typescript-bot) commented May 20, 2021

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the task to cherry-pick this into release-4.3 on this PR at 99110e9. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), I've opened #44189 for you.

TypeScript Bot (typescript-bot) pushed a commit to typescript-bot/TypeScript that referenced this pull request May 20, 2021
Component commits:
99110e9 Consider inferences between mapped type templates lower priority
@sandersn

Copy link
Copy Markdown
Member

Wesley Wigham (@weswigham) Daniel Rosenwasser (@DanielRosenwasser) Is this ready to go into master and 4.3 respectively?

@weswigham

Copy link
Copy Markdown
Member Author

I mean, we should probably ship it in the nightly for a bit, right?

@weswigham
Wesley Wigham (weswigham) merged commit 09a21ce into microsoft:master May 29, 2021
Daniel Rosenwasser (DanielRosenwasser) pushed a commit that referenced this pull request Jun 16, 2021
Component commits:
99110e9 Consider inferences between mapped type templates lower priority

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Regression: Type using conditional and mapped types is no longer assignable in 4.3

4 participants