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
z
z14mo ago
bump, facing the same issue
z
z14mo ago
z
z14mo ago
Neto
Neto14mo ago
CreateContextOptions is a map of string and nothing req and res are both keys of CreateContextOptions and both of them are typed never
cje
cje14mo ago
inner context is for when you don't have req/res, for example during SSG access req/res in outer context if necessary
z
z14mo ago
this seems to work, is it the correct way of doing it tho?
cje
cje14mo ago
yea
z
z14mo ago
amazing, thank you all. maybe mark it as solution?