TRPCClient<TRouter>
Deprecated
Type parameters
TRouter
extendsAnyRouter
Properties
runtime
Readonly
TRPCClientRuntime
Defined in: packages/client/src/createTRPCClient.ts:22
Methods
mutation()
Signature
ts
mutation<TMutations, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferTransformedProcedureOutput<TMutations[TPath]>>;
ts
mutation<TMutations, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferTransformedProcedureOutput<TMutations[TPath]>>;
Type parameters
TMutations
extendsany
TPath
extendsstring
TInput
extendsany
Parameters
Name | Type |
---|---|
path | TPath |
input? | TInput |
opts? | TRPCRequestOptions |
Returns
Promise
<inferTransformedProcedureOutput
<TMutations
[TPath
]>>
Defined in: packages/client/src/createTRPCClient.ts:33
query()
Signature
ts
query<TQueries, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;
ts
query<TQueries, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;
Type parameters
TQueries
extendsany
TPath
extendsstring
TInput
extendsany
Parameters
Name | Type |
---|---|
path | TPath |
input? | TInput |
opts? | TRPCRequestOptions |
Returns
Promise
<inferProcedureOutput
<TQueries
[TPath
]>>
Defined in: packages/client/src/createTRPCClient.ts:23
subscription()
Signature
ts
subscription<TSubscriptions, TPath, TOutput, TInput>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;
ts
subscription<TSubscriptions, TPath, TOutput, TInput>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;
Type parameters
TSubscriptions
extendsany
TPath
extendsstring
TOutput
extendsunknown
TInput
extendsany
Parameters
Name | Type |
---|---|
path | TPath |
input | TInput |
opts | TRPCRequestOptions & Partial <TRPCSubscriptionObserver <TOutput , TRPCClientError <TRouter >>> |
Returns
Unsubscribable
Defined in: packages/client/src/createTRPCClient.ts:43