File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import schema from '../example_schemas/json_rpc_api_schema.ts' ;
2- import { Client } from './client .ts' ;
2+ import { JsonRpcClient } from './json_rpc_client .ts' ;
33import { validatedOpenRpcDocument } from './open_rpc/validated_open_rpc_document.ts' ;
44
55
66validatedOpenRpcDocument ( schema )
77
8- const client = new Client ( '' , schema )
8+ const client = new JsonRpcClient ( '' , schema )
99
1010client . call ( 'minecraft:server/status' ) . then ( ( response ) => { response . players } )
1111
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ type IncomingMessage<Schema extends OpenRpcDocument> =
4040/**
4141 * @template Schema OpenRPC document schema
4242 */
43- export class Client < Schema extends OpenRpcDocument > extends CustomEventTarget {
43+ export class JsonRpcClient < Schema extends OpenRpcDocument > extends CustomEventTarget {
4444 private readonly ws : WebSocket ;
4545 private readonly pendingRequests : Map <
4646 number ,
You can’t perform that action at this time.
0 commit comments