From 346e95c33cb8e9cb801484a2dbb96bc33ab768ff Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 25 Nov 2021 12:33:12 +0530 Subject: [PATCH] Change return type --- src/matrix/login/LoginMethod.ts | 2 +- src/matrix/login/PasswordLoginMethod.ts | 2 +- src/matrix/login/TokenLoginMethod.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matrix/login/LoginMethod.ts b/src/matrix/login/LoginMethod.ts index 91977bf1..2b2a8ff3 100644 --- a/src/matrix/login/LoginMethod.ts +++ b/src/matrix/login/LoginMethod.ts @@ -19,5 +19,5 @@ import type {HomeServerApi} from "../net/HomeServerApi.js"; export interface ILoginMethod { homeserver: string; - login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise; + login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise>; } diff --git a/src/matrix/login/PasswordLoginMethod.ts b/src/matrix/login/PasswordLoginMethod.ts index 46fdd211..65e96ff0 100644 --- a/src/matrix/login/PasswordLoginMethod.ts +++ b/src/matrix/login/PasswordLoginMethod.ts @@ -29,7 +29,7 @@ export class PasswordLoginMethod implements ILoginMethod { this.homeserver = homeserver; } - async login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise { + async login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise> { return await hsApi.passwordLogin(this._username, this._password, deviceName, {log}).response(); } } diff --git a/src/matrix/login/TokenLoginMethod.ts b/src/matrix/login/TokenLoginMethod.ts index 5caae19f..4f1e3cc7 100644 --- a/src/matrix/login/TokenLoginMethod.ts +++ b/src/matrix/login/TokenLoginMethod.ts @@ -28,7 +28,7 @@ export class TokenLoginMethod implements ILoginMethod { this._loginToken = loginToken; } - async login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise { + async login(hsApi: HomeServerApi, deviceName: string, log: ILogItem): Promise> { return await hsApi.tokenLogin(this._loginToken, makeTxnId(), deviceName, {log}).response(); } }