Hi, so I am using the Next.js implementation with ...
# support-questions
a
Hi, so I am using the Next.js implementation with TypeScript, but in the API routes, I saw the tutorial set the
req
and
res
to
any
, is there any way so that I can still use Next.js API types? The tutorial: https://supertokens.com/docs/emailpassword/nextjs/session-verification/in-api
r
hey @alan the guy
i don't think that it would be possible at the moment. You can open an issue about this on our github though. In the meantime, you can do:
Copy code
ts
await superTokensNextWrapper(
        async (next) => {
            return await verifySession()(req as any, res as any, next)
        },
        req, res
    )
a
I see... thanks btw, I will open an issue later on