diff --git a/src/client.ts b/src/client.ts index 7a1d997cc00..542f185159b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1217,7 +1217,7 @@ export class MatrixClient extends TypedEventEmitter(this); public olmVersion: [number, number, number] | null = null; // populated after initCrypto public usingExternalCrypto = false; - public store: Store; + private _store!: Store; public deviceId: string | null; public credentials: { userId: string | null }; @@ -1332,7 +1332,6 @@ export class MatrixClient extends TypedEventEmitter User.createUser(userId, this)); this.deviceId = opts.deviceId || null; this.sessionId = randomString(10); @@ -1497,6 +1496,15 @@ export class MatrixClient extends TypedEventEmitter User.createUser(userId, this)); + } + + public get store(): Store { + return this._store; + } + /** * High level helper method to begin syncing and poll for new events. To listen for these * events, add a listener for {@link ClientEvent.Event}