react-native-auth0 icon indicating copy to clipboard operation
react-native-auth0 copied to clipboard

Typescript support

Open damienherve opened this issue 2 years ago • 5 comments

Describe the problem you'd like to have solved

No Typescript support

Describe the ideal solution

Rewrite the library in TypeScript (ideal)

Alternatives and current work-arounds

At least, maintain @types/react-native-auth0

Additional information, if any

Currently, the library has no Typescript support, as @types/react-native-auth0 last published version is 2.13.1.

Is it planned to add this kind of support?

damienherve avatar Oct 07 '22 13:10 damienherve

Hi @damienherve we here you and we are taking note of this request. Currently the types are only provided through DefinitelyTyped through best effort basis.

We would love if you can contribute to keep this up to date. We will add this request to our backlog though we are not sure when we can provide support to this.

I will leave this issue open for sometime to gather more feedback from the community. Any additional info on this will be helpful for us to make decision

poovamraj avatar Oct 11 '22 19:10 poovamraj

I agree with @damienherve. If migrating the codebase to TypeScript is a hassle, I think keeping the DefinitelyTyped library up to date with this one is a very fair solution. Currently the entire hooks API has no types at all, making it a bit difficult to use with TypeScript.

ziad-floosi avatar Oct 11 '22 21:10 ziad-floosi

Thanks for the answer, if i have time i'll try to make a PR for the types on DefinitelyTyped

damienherve avatar Oct 13 '22 07:10 damienherve

If anyone wants to work together on it, I've started a draft PR for updating the DefinitelyTyped library. I was planning to go folder by folder and have done src/auth and src/credentials-manager so far.

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62709

gfriedm4 avatar Oct 14 '22 05:10 gfriedm4

Thanks a lot for the effort @gfriedm4. Highly appreciate your contriubtion 🚀 🙌

poovamraj avatar Oct 14 '22 17:10 poovamraj

types are out of date :/

evanjmg avatar Nov 30 '22 20:11 evanjmg

Not only types, but the documentation. Considering how pricey auth0 is...

iovreche avatar Dec 05 '22 11:12 iovreche

@iovreche can you point out the outdated documentation so that we can try to fix it? Regarding the types, we will work with the community effort to get it fixed.

poovamraj avatar Dec 05 '22 12:12 poovamraj

I have created a PR with the types fixed - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/63584

It would be great to hear feedback from everyone on this and if anything needs to be improved

poovamraj avatar Dec 12 '22 13:12 poovamraj

Hey all the PR is merged 🍾 the type support should now be available. Please feel free to reopen this thread if you have more doubts. We will close this for now.

Also thanks @gfriedm4 for initiating the effort on the DefinitelyTyped repo 👍 really appreciate your contribution

poovamraj avatar Dec 13 '22 22:12 poovamraj