You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the token guard to my project I got typescript errors in existing code when trying to load relationships on the auth model.
router.get('/foo',async({ auth })=>{// here the signature of the load method is of type _any_awaitauth.user?.load('post')// this gives type error (Argument of type '"post"' is not assignable to parameter of type 'undefined'.ts(2345))awaitauth.user?.related('post').query().first()returnnull})
Package version
9.2.3
Describe the bug
When adding the token guard to my project I got typescript errors in existing code when trying to load relationships on the auth model.
Reproduction repo
https://github.com/jarle/adonis-auth-issue
The text was updated successfully, but these errors were encountered: