Skip to content

Commit

Permalink
fix: request manager requestObject type should be JSONRPCMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Jul 27, 2020
1 parent 6904bab commit 5a3c194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RequestManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IJSONRPCRequest, IJSONRPCNotification, IBatchRequest } from "./Request"
import { JSONRPCError } from "./Error";
import StrictEventEmitter from "strict-event-emitter-types";
import { EventEmitter } from "events";
import { RequestArguments } from "./ClientInterface";
import { JSONRPCMessage } from "./ClientInterface";

export type RequestChannel = StrictEventEmitter<EventEmitter, IRequestEvents>;

Expand Down Expand Up @@ -44,7 +44,7 @@ class RequestManager {
return this.transports[0];
}

public async request(requestObject: RequestArguments, notification: boolean = false, timeout?: number): Promise<any> {
public async request(requestObject: JSONRPCMessage, notification: boolean = false, timeout?: number): Promise<any> {
const internalID = (++this.lastId).toString();
const id = notification ? null : internalID;
// naively grab first transport and use it
Expand Down

0 comments on commit 5a3c194

Please sign in to comment.