Skip to content
tRPC

Partners

Type Alias: TRPCClient<TRouter, TContext>

On this page

TRPCClient<TRouter, TContext>: DecoratedProcedureRecord<{ errorShape: TRouter["_def"]["_config"]["$types"]["errorShape"]; transformer: TRouter["_def"]["_config"]["$types"]["transformer"]; }, TRouter["_def"]["record"], TContext> & object

Defined in: packages/client/dist/index.d.mts:196

A typed client for a router, as createTRPCClient returns it. Each procedure has .query(), .mutate() or .subscribe().

TContext is the context calls take; createTRPCClient({ router, links }) infers it from the links.

Type declaration

[untypedClientSymbol]

[untypedClientSymbol]: TRPCUntypedClient<TRouter>

Type Parameters

Type ParameterDefault type
TRouter extends AnyRouter-
TContext extends objectRecord<string, unknown>

See

https://trpc.io/docs/client/vanilla/infer-types