feat: add IDisplayableOSNotification type #133
Merged
sherwinski merged 3 commits intomainfrom Feb 27, 2026
Merged
Conversation
Add the `IDisplayableOSNotification` interface extending `IOSNotification` with the `display()` method. Update `NotificationForegroundWillDisplayEvent` to use `IDisplayableOSNotification`.
sherwinski
added a commit
to OneSignal/OneSignal-Website-SDK
that referenced
this pull request
Feb 27, 2026
The "events" key in api.json gets ignored by web shim. Instead, we need to update web shim's snippets to include event interfaces, see: OneSignal/web-shim-codegen#133
16 tasks
fadi-george
approved these changes
Feb 27, 2026
fadi-george
reviewed
Feb 27, 2026
| } | ||
|
|
||
| export interface IDisplayableOSNotification extends IOSNotification { | ||
| display(): void; |
Collaborator
There was a problem hiding this comment.
nit: could add tsdoc for this method
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.
Description
Adds the
IDisplayableOSNotificationinterface extendingIOSNotificationwith thedisplay()method. UpdatesNotificationForegroundWillDisplayEventto useIDisplayableOSNotification.Details
OneSignal/OneSignal-Website-SDK#1426 attempted to add
display()andpreventDefault()to the web API spec but they don't get picked up by web shim. The current pattern is to hardcode them as snippets so they get inlined into the web wrappers.