Skip to content

fix(46563): keyof autocomplete seems like it's missing autocomplete values with polymorphic this type #46581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #46563

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Oct 29, 2021
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I don't think this is a problem with getTypeOfParameter, because you can get an assignability error if you pass the wrong thing with this, eg

this.baz(this, "")
this.baz(this, "completely wrong")

That indicates to me that it's working. It seems more likely that this needs to be instantiated/converted to its constraint at the interface between the compiler and services, or maybe in completions.

@sandersn sandersn merged commit 407edc9 into microsoft:main Dec 3, 2021
mprobst pushed a commit to mprobst/TypeScript that referenced this pull request Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

keyof autocomplete seems like it's missing autocomplete values with polymorphic this type
3 participants