diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index 406abc512..278a17ed4 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -246,7 +246,7 @@ export class EncryptionSetupOperation { * implementing the methods related to account data in MatrixClient */ class AccountDataClientAdapter extends EventEmitter { - public readonly values = new Map(); + public readonly values = new Map(); /** * @param {Object.} existingValues existing account data @@ -259,7 +259,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {String} type * @return {Promise} the content of the account data */ - public getAccountDataFromServer(type: string): Promise { + public getAccountDataFromServer(type: string): Promise { return Promise.resolve(this.getAccountData(type)); } @@ -267,7 +267,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {String} type * @return {Object} the content of the account data */ - public getAccountData(type: string): object { + public getAccountData(type: string): MatrixEvent { const modifiedValue = this.values.get(type); if (modifiedValue) { return modifiedValue; @@ -284,7 +284,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {Object} content * @return {Promise} */ - public setAccountData(type: string, content: object): Promise { + public setAccountData(type: string, content: any): Promise { const lastEvent = this.values.get(type); this.values.set(type, content); // ensure accountData is emitted on the next tick,