-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit Return Type on getUserSession #379
Conversation
… fix the issue with the UserSession not being readable by ts server.
Issue Link: #358 |
This is a very simple PR. I hope that we can get this approved rapidly. |
I was able to pull this down and utilize this into a broken project. It fixes the type errors that we were receiving |
IMO it should also be added to @atinux WDYT? |
I wil update it if that is what is desired |
@atinux @sandros94 Just wanted to poke a reminder to please look at this. This has been waiting for approval for two weeks |
commit: |
In that case I believe we should return explicit types for all the exported utils, would you be to do that? |
Let me take a look and see the scope of this. I might be able to do something like this |
@atinux I updated all server exported functions related to session. Do you want me to update other things? |
Removed the comment to hide some code.... |
I might be wrong but I'm noticing something like a racing condition depending on the ts server version and OS used. And since the local project might be declaring their own |
Could you try with: npm i https://pkg.pr.new/atinux/nuxt-auth-utils@379 And confirm it fixes your issue? |
Running some testing. |
@atinux I am receiving an error when trying to install this package; |
@atinux Removed ssl required and ran into a security policy issue so I might not be able to test that. However, whenever I published my fork to a our own npm registry and tested with that, I was able to get it to work and it resolved the Typescript issues that we were facing. |
@atinux Let me know if the above testing was sufficient |
This should fix the typescript issue where some users, including myself, are not seeing the extended properties of the interface UserSession. This should operate as normal.