Type Alias: CreateTRPCContextOptions<TSource, TKeyPrefix>
On this page
CreateTRPCContextOptions<
TSource,TKeyPrefix>: {client:never;router:RouterType<TSource&AnyTRPCRouter>; } | {client:TSource;router:never; } &object
Defined in: Context.tsx:95
The options of createTRPCContext: the router's type as
router: routerType<AppRouter>(), or the client (or the function that
creates it) as client, so trpc.context is typed from its links.
Only their types are used.
Type declaration
keyPrefix?
optionalkeyPrefix:TKeyPrefix
true prefixes query and mutation keys; TRPCProvider then takes the
prefix as keyPrefix.
See
https://trpc.io/docs/client/tanstack-react-query/usage#keyPrefix
Type Parameters
| Type Parameter |
|---|
TSource extends TRPCContextSource |
TKeyPrefix extends boolean |