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.
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
45 fix providers to respect subscribed flags #46
45 fix providers to respect subscribed flags #46
Changes from 2 commits
b9f366d
9595745
976ceff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to return an empty
LDFlagSet
in the case that no targeted flags are changed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in most cases I would agree as it's typically the case that an empty map or array returned from a function will be used in exactly the same way as a collection with members. But in this case the consumers are going to take a conditional action based on whether the map has keys or not. In this case I thought the contract was more clear by returning null instead of empty map. It also means the consumers don't have to do this Object.keys check themselves.
I'm happy to change it, but just wanted to explain my reasoning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your reasoning. Part of my reasoning is that this simplifies the utility function and removes the conditional typing from the return type, all while only adding minimal complexity to the consumers. All in all I think what you have in your latest changeset is better, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your reasoning. Part of my reasoning is that this simplifies the utility function and removes the conditional typing from the return type, all while only adding minimal complexity to the consumers. All in all I think what you have in your latest changeset is better, thanks.