Skip to main content
Version: 10.x

Interface: Router<TDef>

Type parameters

Parameter
TDef extends AnyRouterDef

Properties

_def

_def: TDef

Source

packages/server/src/core/router.ts:129


createCaller

createCaller: RouterCaller< TDef >

Deprecated

use t.createCallerFactory(router) instead

See

https://trpc.io/docs/server/server-side-calls

Source

packages/server/src/core/router.ts:134

Methods

getErrorShape()

getErrorShape(opts): TDef["_config"][`"$types"`]["errorShape"]

Deprecated

FIXME: use the new standalone getErrorShape instead

Parameters

ParameterType
optsobject
opts.ctxundefined | TDef["_config"][`"$types"`]["ctx"]
opts.errorTRPCError
opts.inputunknown
opts.pathundefined | string
opts.type"query" | "mutation" | "subscription" | "unknown"

Returns

TDef["_config"][`"$types"`]["errorShape"]

Source

packages/server/src/core/router.ts:140


Generated using TypeDoc and typedoc-plugin-markdown