Skip to content
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

[TypeScript] Inadequate Type Definitions for OneSignal.init parameters #124

Open
PrinceGupta1999 opened this issue Sep 3, 2023 · 1 comment
Labels
Enhancement / Feature New feature or request

Comments

@PrinceGupta1999
Copy link

Hi!

I was recently integrating this library into my app and found some of the type definitions are very broad for the OneSignal.init function parameters. For ex: IInitObject.welcomeNotification and has a type of object so I had to reference the parameters from the documentation. Similarly notifiyButton, webhooks etc. are also defined as objects.

Defining and exporting these definitions and possibly adding the documentations would make integrations easier and less error prone

@rgomezp rgomezp added the Enhancement / Feature New feature or request label Sep 5, 2023
@DanyPell
Copy link

Yep. Same for promptOptions. Has a type of object so had to do something digging to figure out that we can have actionMessage, acceptButton, and acceptCancel in there. Although, adding promptOptions is buggy because it shows the prompt right upon initing instead of when we trigger a prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement / Feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants