oidc-client icon indicating copy to clipboard operation
oidc-client copied to clipboard

TypeScript support

Open Lukejkw opened this issue 2 years ago • 2 comments

Issue and Steps to Reproduce

Type errors when using hooks

Versions

Latest

Screenshots

image

Expected

Types automatically included

Actual

Any values returned

Additional Details

  • Installed packages:

Lukejkw avatar Jun 08 '22 16:06 Lukejkw

Hi @Lukejkw thank you very much for the issue. It is definitly something to type as it is possible to do.

guillaume-chervet avatar Jun 09 '22 20:06 guillaume-chervet

It would be fairly easy to allow the user to specify their user type as a generic argument to the hook, otherwise to fallback to any.

In strictly typed applications, not having a typed user entity makes the hooks quite difficult to use.

Would you accept a PRs to add in some better typing?

Lukejkw avatar Jun 10 '22 06:06 Lukejkw

@guillaume-chervet is there any progress on this? What @Lukejkw is proposing sounds like a great solution?

jcrawl3y avatar Oct 05 '22 05:10 jcrawl3y

Yes, i think i can do this quickly I am working on an internal refactoring and I am playing to add better typing

guillaume-chervet avatar Oct 05 '22 06:10 guillaume-chervet

It would be awesome to have a pullrrquest from @Lukejkw

guillaume-chervet avatar Oct 05 '22 06:10 guillaume-chervet