Skip to content
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

[Master] Fix #13306 recognize @type on property assignment #16178

Merged
merged 7 commits into from
Jun 22, 2017
Merged

Conversation

yuit
Copy link
Contributor

@yuit yuit commented May 31, 2017

Fix #13306.

Note: If there error happen during property assignment in object literal and there is jsDoc type, we will use jsDoc type as source of truth (see tests cases)

@@ -13293,6 +13299,11 @@ namespace ts {
type = checkExpressionForMutableLocation((<ShorthandPropertyAssignment>memberDecl).name, checkMode);
}

if (jsdocType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you probably need to flow this as a contextual type. talk to @rbuckton about this, it may be easier that he do that bit as part of #15618 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I will ping @rbuckton about this later

@yuit yuit merged commit 3ade89c into master Jun 22, 2017
@yuit yuit deleted the master-fix13306 branch June 22, 2017 18:25
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
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.

4 participants