react-onesignal
react-onesignal copied to clipboard
Provide types for external use
Overview
This pull request contains the exporting of the type definitions within the index.ts file.
Benefits
- Developers can now import types directly, avoiding the use of complex and less intuitive syntax to access type definitions.
- Easier access to type definitions encourages proper typing, which can lead to more maintainable and less error-prone code.
Related open issues
@jkasten2 / @rgomezp
Not having decent type reusability in typescript is a bit annyoing: If we want to accept e.g. an IOSNotification
object in one of our functions - there is no way to type it with typescript other than including the type directly in the project. Making it vulnerable for future API updates where the type in our project won't match the one-signal type anymore.
Would this be something you are interested in merging? Let us know if we can do anything to help you getting this into this repository.