mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Fix promise resolve type
This commit is contained in:
parent
05121e32b1
commit
4f43398db0
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user