Skip to content
tRPC

Partners

Type Alias: TRPCLink<TInferrable, TDecl>

On this page

TRPCLink<TInferrable, TDecl>: (opts) => OperationLink<TInferrable> & object

Defined in: packages/client/src/links/types.ts:158

A link: a step every call goes through, such as logging or sending it over HTTP. It's called once when the client is created.

TDecl says what it reads from op.context. A link that doesn't declare it may read any context.

Type declaration

~decl?

readonly optional ~decl: TDecl

Type-only: what the link declares. Never set.

Type Parameters

Type ParameterDefault type
TInferrable extends InferrableClientTypes-
TDecl extends LinkDeclLinkDecl

See

https://trpc.io/docs/client/links#creating-a-custom-link