You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Update eslint-plugin-matrix-org and improve visibilities & types (#2887)
This commit is contained in:
committed by
GitHub
parent
e085609572
commit
c0f7df8c3b
@@ -26,13 +26,13 @@ export function exists(indexedDB: IDBFactory, dbName: string): Promise<boolean>
|
||||
return new Promise<boolean>((resolve, reject) => {
|
||||
let exists = true;
|
||||
const req = indexedDB.open(dbName);
|
||||
req.onupgradeneeded = () => {
|
||||
req.onupgradeneeded = (): void => {
|
||||
// Since we did not provide an explicit version when opening, this event
|
||||
// should only fire if the DB did not exist before at any version.
|
||||
exists = false;
|
||||
};
|
||||
req.onblocked = () => reject(req.error);
|
||||
req.onsuccess = () => {
|
||||
req.onblocked = (): void => reject(req.error);
|
||||
req.onsuccess = (): void => {
|
||||
const db = req.result;
|
||||
db.close();
|
||||
if (!exists) {
|
||||
@@ -45,6 +45,6 @@ export function exists(indexedDB: IDBFactory, dbName: string): Promise<boolean>
|
||||
}
|
||||
resolve(exists);
|
||||
};
|
||||
req.onerror = ev => reject(req.error);
|
||||
req.onerror = (): void => reject(req.error);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user