From 4f43398db047e7c54c7ca0e9c109b9c4883a3a0b Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 25 Nov 2021 12:24:14 +0530 Subject: [PATCH] Fix promise resolve type --- src/matrix/net/RequestScheduler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix/net/RequestScheduler.ts b/src/matrix/net/RequestScheduler.ts index 6823ee29..45405da3 100644 --- a/src/matrix/net/RequestScheduler.ts +++ b/src/matrix/net/RequestScheduler.ts @@ -25,10 +25,10 @@ import type {IHomeServerRequest} from "./HomeServerRequest.js"; class Request implements IHomeServerRequest { public readonly methodName: string; public readonly args: any[]; - public resolve: (result: Response) => void; - public reject: (error: AbortError) => void; + public resolve: (result: any) => void; + public reject: (error: Error) => void; public requestResult?: IHomeServerRequest; - private readonly _responsePromise: Promise; + private readonly _responsePromise: Promise; constructor(methodName: string, args: any[]) { this.methodName = methodName; @@ -47,7 +47,7 @@ class Request implements IHomeServerRequest { } } - response(): Promise { + response(): Promise { return this._responsePromise; } }