https://supertokens.com/ logo
#support-questions
Title
# support-questions
a

alan the guy

04/23/2022, 2:36 PM
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

rp

04/23/2022, 2:40 PM
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

alan the guy

04/23/2022, 2:43 PM
I see... thanks btw, I will open an issue later on