Next.js route handler auth return type conflicts #11728
Labels
bug
Something isn't working
help-needed
The maintainer needs help due to time constraint/missing knowledge
TypeScript
Issues relating to TypeScript
What is the improvement or update you wish to see?
This code is from next-auth-example template.
without explicit type casting
as any
, type error occurssuch as
For my case, I handled with explicit type casting by createing new type and interface to deal with it.
app/api/sample/route.ts
Therefore, there must be docs fixed since there is no explanations about explicit type casting.
Build Error always occurs without it, so i think it needs to be fixed.
Thanks.
Is there any context that might help us understand?
Reproduction environment
Does the docs page already exist? Please link to it.
https://authjs.dev/getting-started/session-management/protecting
The text was updated successfully, but these errors were encountered: