fix issue #433: UserSession type safety was broken
UserSession type safety broke due to the Omit<> type not being able to handle Index Signatures.
This should get back the type safety to the setUserSession and replaceUserSession.
I did not check for other occurrences of this problem across the codebase because it was the only time It came up for me, And the only time mentioned by the issue #433, I hope the position for the utility types is fine; otherwise, just let me know where to put them, and I will change that
Thank you @fischi20
Could you please fix the lint & test?
I think the file can be in src/runtime/types/utils.d.ts
Hey, thank you for the feedback. I fixed lint errors and tests passed before too. Sorry for forgetting about lints
I just wanted to ask, since I did not touch it, I don't mind leaving it there, but in the file src/runtime/server/utils/session.ts at line 115, the SessionConfig.cookie.sameSite type is stricter than the assigned string type. Should I add a @ts-expect with a small comment or just leave it?
Is anything needed to merge this request? I'm implementing nuxt-auth-utils and just ran into this issue.
Thanks