@statechannels/client-api-schema > isJsonRpcResponse
isJsonRpcResponse() function
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Type guard for JsonRpcResponse
Signature:
export declare function isJsonRpcResponse<ResponseType = object>(message: object): message is JsonRpcResponse<ResponseType>;
Parameters
Parameter | Type | Description |
---|---|---|
message | object |
Returns:
message is JsonRpcResponse<ResponseType>
true if the message is a JSON-RPC response, false otherwis