Fix promise resolve type

This commit is contained in:
RMidhunSuresh 2021-11-25 12:24:14 +05:30
parent 05121e32b1
commit 4f43398db0

View File

@ -25,10 +25,10 @@ import type {IHomeServerRequest} from "./HomeServerRequest.js";
class Request implements IHomeServerRequest { class Request implements IHomeServerRequest {
public readonly methodName: string; public readonly methodName: string;
public readonly args: any[]; public readonly args: any[];
public resolve: (result: Response) => void; public resolve: (result: any) => void;
public reject: (error: AbortError) => void; public reject: (error: Error) => void;
public requestResult?: IHomeServerRequest; public requestResult?: IHomeServerRequest;
private readonly _responsePromise: Promise<Response>; private readonly _responsePromise: Promise<any>;
constructor(methodName: string, args: any[]) { constructor(methodName: string, args: any[]) {
this.methodName = methodName; this.methodName = methodName;
@ -47,7 +47,7 @@ class Request implements IHomeServerRequest {
} }
} }
response(): Promise<Response> { response(): Promise<any> {
return this._responsePromise; return this._responsePromise;
} }
} }