Function: transformTRPCResponse()
transformTRPCResponse<
TResponse
>(config
,itemOrItems
):TRPCErrorResponse
|TRPCSuccessResponse
| {id
:JSONRPC2.RequestId
;} &TRPCResultMessage
<unknown
> | (TRPCResponse
|TRPCResponseMessage
)[]
Takes a unserialized TRPCResponse
and serializes it with the router's transformers
Type parameters
Parameter |
---|
TResponse extends TRPCResponse | TRPCResponse [] | TRPCResponseMessage | TRPCResponseMessage [] |
Parameters
Parameter | Type |
---|---|
config | AnyRootConfig |
itemOrItems | TResponse |
Returns
TRPCErrorResponse
| TRPCSuccessResponse
| {id
: JSONRPC2.RequestId
;} & TRPCResultMessage
< unknown
> | (TRPCResponse
| TRPCResponseMessage
)[]
Source
packages/core/dist/transformer.d.ts:72
Generated using TypeDoc and typedoc-plugin-markdown