Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix contextually typed object literal completions where the object being edited affects its own inference#36556

Merged
andrewbranch merged 9 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
andrewbranch:bug/35702-2andrewbranch/TypeScript:bug/35702-2Copy head branch name to clipboard
Jan 31, 2020
Merged

Fix contextually typed object literal completions where the object being edited affects its own inference#36556
andrewbranch merged 9 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
andrewbranch:bug/35702-2andrewbranch/TypeScript:bug/35702-2Copy head branch name to clipboard

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

This is Wes’s alternative to my PR #36364, which fixes #35702.

Comment thread tests/cases/fourslash/completionsGenericIndexedAccess6.ts
Comment thread tests/cases/fourslash/completionsGenericIndexedAccess5.ts
Comment thread src/compiler/types.ts Outdated
Comment thread src/compiler/types.ts Outdated

@weswigham weswigham left a comment

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.

Approve with nits mentioned above, but since I'm a partial author you should get another set of eyes to look over it, too~

@sandersn sandersn left a comment

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.

I'm a little leery of the complexity of this change right at the end of the beta.
But @weswigham argues that we remove some scary complexity from contextual typing and push it right to the edge the checker's API.

andrewbranch and others added 2 commits January 31, 2020 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Properties in object literal key completion list aren't filtered when a prior argument supplies a mapped type key

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.