Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
YieldRay committed Dec 25, 2023
1 parent 10df0a7 commit 286ca4a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/dto/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/dto/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 286ca4a

Please sign in to comment.