spark.JsonRpcResponse
export interface JsonRpcResponse {
/** JSON-RPC version */
jsonrpc: '2.0';
/** Result from successful method call */
result?: unknown;
/** Error from failed method call */
error?: JsonRpcError;
/** Request ID that this response corresponds to */
id?: string;
}jsonrpc('2.0')- – JSON-RPC version
result(unknown)optional- – Result from successful method call
error(JsonRpcError)optional- – Error from failed method call
id(string)optional- – Request ID that this response corresponds to
JSON-RPC 2.0 response.
Contains either a result or an error, but not both.