Skip to content
tRPC

Partners

Type Alias: TRPCOptionsProxy<TRouter, TFeatureFlags, TLinkContext>

On this page

TRPCOptionsProxy<TRouter, TFeatureFlags, TLinkContext>: DecoratedRouterRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"], TFeatureFlags, TLinkContext> & DecorateRouterKeyable<TFeatureFlags>

Defined in: createOptionsProxy.ts:327

The object returned by useTRPC() and createTRPCOptionsProxy. It mirrors your router and has query, mutation and subscription option helpers on each procedure.

TLinkContext is the context the trpc options take: what the client's links read, when it was created with router: routerType<AppRouter>().

Type Parameters

Type ParameterDefault type
TRouter extends AnyTRPCRouter-
TFeatureFlags extends FeatureFlagsDefaultFeatureFlags
TLinkContext extends objectRecord<string, unknown>

See

https://trpc.io/docs/client/tanstack-react-query/usage