Skip to content

Contextual typing checks property assignments for type annotation #43598

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
Apr 26, 2021

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Apr 8, 2021

Property assignments can have a type annotation in JS. This PR adds a check for it in contextual typing.

Fixes #43379

Property assignments can have a type annotation in JS. This PR adds a
check for it in contextual typing.

Fixes #43379
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Apr 8, 2021
@sandersn sandersn requested a review from andrewbranch April 24, 2021 00:04
@sandersn
Copy link
Member Author

@andrewbranch you just looked at contextual typing in JS object literals...mind taking a look at this change too?

@sandersn sandersn merged commit d5af89c into master Apr 26, 2021
@sandersn sandersn deleted the check-property-assignments-for-type-annotation branch April 26, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Object literal property assignment doesn't get contextual type from @type jsdoc
3 participants