refactor: quote properties used for meta-programming#371
Merged
bcoe merged 3 commits intoyargs:masterfrom Jun 20, 2021
Merged
Conversation
Member
|
@jkrems this looks good to me. Is there a smoke test we can somehow add so that we don't introduce a regression that breaks your use-case? |
24593fe to
a03364f
Compare
Contributor
Author
|
Testing it can get a bit involved unfortunately. Something like this PR would achieve it though: #373 |
Member
|
@jkrems what order should I land these in, the tests you added seem great to me. |
Contributor
Author
|
Technically the smoke test PR also has this commit. I wasn't sure where you fall on PR size. I can rebase the smoke test pretty quickly if you want to land the quoting fixes independently. |
bcoe
approved these changes
Jun 20, 2021
Member
|
@jkrems sorry for the slow turnaround on this, have had almost no time for open source this past few months. I'm working on cleaning up some of these old PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The library is currently very close to compatible with advanced optimizations done by closure compiler. This is the only issue I found: The properties on the interface may be renamed but the string literals are hard to track back to the property names. Using an explicit enum works around this issue.
I could have used an "normal" enum but this way there should be no observable difference in the non-optimized JavaScript.