OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
74 stars 23 forks source link

[TypeScript]: export types and interfaces for reuse (still missing export in 3.0.0) #108

Open NotEvenANeko opened 1 year ago

NotEvenANeko commented 1 year ago

What's on your mind?

For example, I want to make a React hook like

export const useOneSignal = (options?: Parameters<(typeof OneSignal)['init']['0']>): [ready: boolean, instance: typeof OneSignal]

and I have to use Parameters<(typeof OneSignal)['init']['0']> instead of IInitObject.

Export IInitObject and other types can make this function signature easier to write.

emawby commented 1 year ago

Thank you for reaching out, we will evaluate this!

ElwynVdb commented 2 months ago

Is there any update on this? I'm working on a project where I have to implement oneSignal. The types would come in handy for creating callbacks and related hooks.