Closed mteterel closed 7 months ago
Hi @mteterel thank you for your issue. I have update build librairies few Day ago. It may have break something. Version 7.15 or 7.14 should work properly for you to continue.
Are you using vite.js with typescript ? Which stack are your using? To reproduce it.
Version 7.15.4 @mteterel should work
Negative, none of the versions after 7.0 seem to be working, I always get the same error message. I am indeed building with Vite.js+Typescript in strict mode. I'll try to reproduce it on a side project as well
I work with some vite.js with js and typescript (default vite config) I did not have some trouble. If you can build a small sample. I coulb be able to fix typing errors @mteterel . It would be awesome.
I solved it on my end, I was importing OidcUserStatus from "@axa-fr/react-oidc/src/User" instead of the top-level export.
However, the error that was logged is indeed a real one, OidcUser
expects a T but does not specify it can be null, which it can when the userinfo has not been retrieved, however the useOidcUser
hook initialize its value to null, causing TS2322. The lib has all strict mode build checks disabled, causing the error to go unreported. I tried re-enabling it to issue a PR to fix it but there are errors in most of the source code, so I'll leave you to that in the eventuality it was a voluntary choice.
hi @mteterel thank you for all your information and feedbacks :) Version 7.17.2 should fix the typing error.
The library was historicaly in javascript. Typing are fixed completed by the time.
Issue and Steps to Reproduce
I am trying to implement this library into my front-end application using @axa-fr/react-oidc, I followed the README and everything works smoothly in development. However building my app results in type errors within the library.
Versions
Currently using 7.17.0
Screenshots