@statechannels/client-api-schema > isJsonRpcErrorResponse

isJsonRpcErrorResponse() 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 JsonRpcErrorResponse

Signature:

export declare function isJsonRpcErrorResponse<Code extends number, Message, Data = undefined>(message: object): message is JsonRpcErrorResponse<JsonRpcError<Code, Message, Data>>;

Parameters

ParameterTypeDescription
messageobject

Returns:

message is JsonRpcErrorResponse<JsonRpcError<Code, Message, Data>>

true if the message is a JSON-RPC error response, false otherwise

Last updated on by geoknee