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

fix: update metadata mapping to handle no getter #583

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

gbockus-sf
Copy link
Contributor

What does this PR do?

Update the javascript type mapping to handle the case where a class has a property with only a setter.

What issues does this PR fix or reference?

@W-14391061@
forcedotcom/salesforcedx-vscode#5069

loc = propertyObj.getter.location
} else if (propertyObj.setter) {
loc = propertyObj.setter.location
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From local testing it appears there will be no property object without either a getter, setter, both, or a dataProperty. TheexternalToInternalLoc method handle the case where this value is empty.

? propertyObj.getter.location
: propertyObj.dataProperty.location
),
loc: externalToInternalLoc(loc),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Locally this project fails to compile for me. Not sure what's up with that.

image

@gbockus-sf gbockus-sf requested a review from a team as a code owner October 30, 2023 20:08
@CristiCanizales CristiCanizales self-requested a review October 30, 2023 20:16
Copy link
Contributor

@CristiCanizales CristiCanizales left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!
:shipit:

@gbockus-sf gbockus-sf merged commit 85ad1e1 into main Oct 30, 2023
7 checks passed
@gbockus-sf gbockus-sf deleted the gbockus/W-14391061-lsp-fails-with-only-setter branch October 30, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants