-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
After trying to fix #422 on my project, I found out that the UserSession
interface has a [x: string]: unknown
index signature which basically removes all type information from the interface.
Even in this repo's playground, it has strict typing for UserSession
, nor does it have intellisense / autocomplete
The only non-breaking solution I can think of for this is:
- Provide an off-switch for this in the module's config
- Move the
[x: string]: unknown
index signature fromruntime/types/session.ts
to an optionalruntime/types/extra-session-keys.d.ts
that adds the signature by extending'#auth-utils'
like a user-landauth.d.ts
would - Add
runtime/types/extra-session-keys.d.ts
withaddTypeTemplate(..., { nuxt: true, nitro: true })
unless the off-switch config is set tofalse
jd-solanki and fischi20saltytostitos, J3m5, jd-solanki and fischi20
Metadata
Metadata
Assignees
Labels
No labels