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

Clarify access to requestData properties #1063

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Conversation

matthew-white
Copy link
Member

requestData classes have a number of internal properties. However, I don't think it's as clear as it could be that these properties are internal. This came up recently at #1024 (comment). I tried to make the properties private (that would be really clear), but that didn't work for a couple of reasons. Instead, I added a comment explaining our use of Symbol properties.

I also renamed the _name property to resourceName. I think it was particularly unclear whether that property was internal. Its name starts with _, but it's not a Symbol, and it's also intended to be used outside the file it's defined in. (Or if not used, at least included in console.log() output.) I think it doesn't hurt to remove the underscore and make it explicit how the property is meant to be used and that it's OK to use the property outside the file.

What has been done to verify that this works as intended?

Tests continue to pass.

Before submitting this PR, please make sure you have:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

@matthew-white matthew-white requested a review from ktuite November 22, 2024 21:48
@matthew-white matthew-white merged commit 4ed2a81 into master Nov 23, 2024
1 check passed
@matthew-white matthew-white deleted the resource-props branch November 23, 2024 15:29
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