Skip to content
tRPC

Partners

Type Alias: inferRouterInputs<TRouter>

On this page

inferRouterInputs<TRouter>: GetInferenceHelpers<"input", TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>

Defined in: packages/server/src/unstable-core-do-not-import/clientish/inference.ts:77

The input types of every procedure in a router, by path.

Type Parameters

Type Parameter
TRouter extends AnyTRPCRouter

Example

type PostByIdInput = inferRouterInputs<AppRouter>['post']['byId'];

See

https://trpc.io/docs/client/vanilla/infer-types#inferring-input--output-types