[FSSDK-12115] Notification center type definition update#1119
Merged
junaed-optimizely merged 5 commits into5.x.xfrom Dec 8, 2025
Merged
[FSSDK-12115] Notification center type definition update#1119junaed-optimizely merged 5 commits into5.x.xfrom
junaed-optimizely merged 5 commits into5.x.xfrom
Conversation
raju-opti
requested changes
Dec 5, 2025
lib/shared_types.ts
Outdated
| export interface TrackListenerPayload extends ListenerPayload { | ||
| eventKey: string; | ||
| eventTags: EventTags; | ||
| eventTags?: EventTags; |
Contributor
There was a problem hiding this comment.
This will be a breaking change. Need to keep this type unchanged
lib/shared_types.ts
Outdated
| export interface ActivateListenerPayload extends ListenerPayload { | ||
| experiment: import('./shared_types').Experiment; | ||
| variation: import('./shared_types').Variation; | ||
| experiment?: import('./shared_types').Experiment; |
Contributor
There was a problem hiding this comment.
this will be a breaking change. Need to keep this unchanged
| }; | ||
|
|
||
| export type NotificationListener<T> = (notificationData: T) => void; | ||
| export interface NotificationCenter { |
Contributor
There was a problem hiding this comment.
We cannot modify this interface, it would be a breaking change
| addNotificationListener<T extends ListenerPayload>( | ||
| notificationType: string, | ||
| callback: NotificationListener<T> | ||
| addNotificationListener<K extends keyof NotificationPayloadMap>( |
Contributor
There was a problem hiding this comment.
we need to keep this unchanged
raju-opti
approved these changes
Dec 8, 2025
lib/shared_types.ts
Outdated
| export type NotificationListener<T extends ListenerPayload> = (notificationData: T) => void; | ||
| export type DecisionNotificationType = typeof DECISION_NOTIFICATION_TYPES[keyof typeof DECISION_NOTIFICATION_TYPES]; | ||
|
|
||
| export type DecisionSource = |
Contributor
There was a problem hiding this comment.
can we do type DecisionSource = typeof DECISION_SOURCES[keyof typeof DECISION_SOURCES];
Merged
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.
Summary
Notification center listener callback type definition update
Test plan
Existing tests should pass
Issues