withTRPC()
Signature
ts
withTRPC<TRouter, TSSRContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): Function;
ts
withTRPC<TRouter, TSSRContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): Function;
Type parameters
TRouter
extendsRouter
<AnyRouterDef
<AnyRootConfig
,any
>,TRouter
>TSSRContext
extendsNextPageContext
=NextPageContext
Parameters
Name | Type |
---|---|
opts | WithTRPCNoSSROptions <TRouter > | WithTRPCSSROptions <TRouter > |
Returns
Function
Signature
ts
(AppOrPage: NextComponentType<any, any, any>): NextComponentType<NextPageContext, {}, {}>;
ts
(AppOrPage: NextComponentType<any, any, any>): NextComponentType<NextPageContext, {}, {}>;
Parameters
Name | Type |
---|---|
AppOrPage | NextComponentType <any , any , any > |
Returns
NextComponentType
<NextPageContext
, {}, {}>
Defined in: next/src/withTRPC.tsx:82