Skip to content

Type Alias: JSONRPCResponse ​

JSONRPCResponse = object

A JSON-RPC 2.0 response, as the adapter sends it: either result or error.

Properties ​

error? ​

optional error?: object

The error: its code (see JSONRPCErrorCode), its message, and for an action's error the whole error object as data.

code ​

code: number

data? ​

optional data?: unknown

message ​

message: string


id ​

id: string | number | null

The id of the request answered; null when it could not be read (a parse error, an invalid request).


jsonrpc ​

jsonrpc: "2.0"

The protocol version, always '2.0'.


result? ​

optional result?: unknown

The action's result, null when it returned nothing.

Released under the MIT License.