diff --git a/README.md b/README.md index 7cde648..350f611 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # json-rpc-ts [![deno.land/x](https://shield.deno.dev/x/json_rpc_ts)](https://deno.land/x/json_rpc_ts) +[![ci](https://github.com/yieldray/json-rpc-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/yieldray/json-rpc-ts/actions/workflows/ci.yml) A strictly typed json-rpc(2.0) implementation, zero dependency, minimal abstraction, with simple api diff --git a/src/client.ts b/src/client.ts index f6827d3..df167ea 100644 --- a/src/client.ts +++ b/src/client.ts @@ -18,7 +18,7 @@ type JSONRPCAnyRequest = * The client cannot parse the server response */ export class JSONRPCClientParseError extends Error { - name = 'JSONRPCClientParseError' + override name = 'JSONRPCClientParseError' request: JSONRPCAnyRequest constructor(message: string, request: JSONRPCAnyRequest) { super(message) diff --git a/src/dto/errors.ts b/src/dto/errors.ts index 2536c0c..15b81bf 100644 --- a/src/dto/errors.ts +++ b/src/dto/errors.ts @@ -24,7 +24,7 @@ export class JSONRPCError extends Error implements JSONRPCErrorInterface { * The error codes from and including -32768 to -32000 are reserved for pre-defined errors. Any code within this range, but not defined explicitly below is reserved for future use. The error codes are nearly the same as those suggested for XML-RPC at the following url: http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php */ public code: number - public message: string + public override message: string public data?: JSONRPCValue public constructor(object: JSONRPCErrorInterface) { diff --git a/src/dto/request.ts b/src/dto/request.ts index 1affe44..712ba59 100644 --- a/src/dto/request.ts +++ b/src/dto/request.ts @@ -49,7 +49,7 @@ export class JSONRPCRequest extends JSONRPCNotification { this.id = object.id } - public toString() { + public override toString() { return JSON.stringify({ jsonrpc: this.jsonrpc, method: this.method,