Conversation
toddbaert
commented
Feb 14, 2024
toddbaert
commented
Feb 14, 2024
lukas-reining
approved these changes
Feb 14, 2024
Member
lukas-reining
left a comment
There was a problem hiding this comment.
Looks good, left one comment :)
beeme1mr
approved these changes
Feb 19, 2024
Member
Author
|
I'm going to rebase this on #795 when it's merged. |
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
07e672f to
1ff55a2
Compare
beeme1mr
approved these changes
Mar 1, 2024
toddbaert
added a commit
that referenced
this pull request
Mar 1, 2024
This is an addendum to #816. Since the `addHandler` overloads for the event types (`ProviderEvents.ConfigurationChanged` and `NotChangeEvents`) are mutually exclusive, it was impossible to iterate over them and pass the same function... I had to add one more "base" overload that tolerated both. This doesn't reduce any of the nice type safety added in #816, but allows users to iterate over `ProviderEvents` collections as seen in the new tests. Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
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.
Before this change the
flagsChangedprop onEventDetailswas of type unknown for all event types, and a cast was needed.After this change,
flagsChangedis ONLY defined onProviderEvents.ConfigurationChanged, where it should be, as (string[] | undefined) . In other words:Additionally,
flagsChangeddoes not autocomplete for events handlers other thanProviderEvents.ConfigurationChanged.