Add basic types
This commit is contained in:
parent
0e92251f70
commit
d7e6f4b4b5
29 changed files with 542 additions and 340 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -133,6 +133,10 @@ export default abstract class BaseEventIndexManager {
|
|||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
async isEventIndexEmpty(): Promise<boolean> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if our event index is empty.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -27,11 +27,16 @@ import {SettingLevel} from "../settings/SettingLevel";
|
|||
|
||||
const INDEX_VERSION = 1;
|
||||
|
||||
class EventIndexPeg {
|
||||
export class EventIndexPeg {
|
||||
public index: EventIndex;
|
||||
public error: Error;
|
||||
|
||||
private _supportIsInstalled: boolean;
|
||||
|
||||
constructor() {
|
||||
this.index = null;
|
||||
this._supportIsInstalled = false;
|
||||
this.error = null;
|
||||
this._supportIsInstalled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,7 +186,7 @@ class EventIndexPeg {
|
|||
}
|
||||
}
|
||||
|
||||
if (!global.mxEventIndexPeg) {
|
||||
global.mxEventIndexPeg = new EventIndexPeg();
|
||||
if (!window.mxEventIndexPeg) {
|
||||
window.mxEventIndexPeg = new EventIndexPeg();
|
||||
}
|
||||
export default global.mxEventIndexPeg;
|
||||
export default window.mxEventIndexPeg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue