react-onesignal icon indicating copy to clipboard operation
react-onesignal copied to clipboard

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

Open NotEvenANeko opened this issue 1 year ago • 2 comments

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.

NotEvenANeko avatar Apr 17 '23 08:04 NotEvenANeko

Thank you for reaching out, we will evaluate this!

emawby avatar Apr 17 '23 17:04 emawby

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.

ElwynVdb avatar Apr 19 '24 13:04 ElwynVdb