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
z2y ago
bump, facing the same issue
z
z2y ago
z
z2y ago
Neto
Neto2y 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
cje2y 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
z2y ago
this seems to work, is it the correct way of doing it tho?
cje
cje2y ago
yea
z
z2y ago
amazing, thank you all. maybe mark it as solution?
Want results from more Discord servers?
Add your server