Why is the value type of `_opts` in createInnerTRPCContext never?
I am trying to read some cookies and then add a boolean flag to the context that I need on every request, but when trying to read _opts, its type is
[x: string]: never
. Any idea why this is? As far as I understand it this should have the request and cookies on it.
Thanks!8 Replies
bump, facing the same issue
CreateContextOptions is a map of string and nothing
req and res are both keys of CreateContextOptions
and both of them are typed never
inner context is for when you don't have req/res, for example during SSG
access req/res in outer context if necessary
this seems to work, is it the correct way of doing it tho?
yea
amazing, thank you all.
maybe mark it as solution?