From 04e39ef9e2378b686a76d795f107d5f8a3c4fa63 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 13 Aug 2021 10:04:03 -0700 Subject: [PATCH] Migrate quirks to TypeScript --- src/matrix/storage/idb/StorageFactory.js | 2 +- src/matrix/storage/idb/{quirks.js => quirks.ts} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/matrix/storage/idb/{quirks.js => quirks.ts} (94%) diff --git a/src/matrix/storage/idb/StorageFactory.js b/src/matrix/storage/idb/StorageFactory.js index e91c77ca..259c8c0f 100644 --- a/src/matrix/storage/idb/StorageFactory.js +++ b/src/matrix/storage/idb/StorageFactory.js @@ -18,7 +18,7 @@ import {Storage} from "./Storage"; import { openDatabase, reqAsPromise } from "./utils"; import { exportSession, importSession } from "./export.js"; import { schema } from "./schema"; -import { detectWebkitEarlyCloseTxnBug } from "./quirks.js"; +import { detectWebkitEarlyCloseTxnBug } from "./quirks"; const sessionName = sessionId => `hydrogen_session_${sessionId}`; const openDatabaseWithSessionId = function(sessionId, idbFactory) { diff --git a/src/matrix/storage/idb/quirks.js b/src/matrix/storage/idb/quirks.ts similarity index 94% rename from src/matrix/storage/idb/quirks.js rename to src/matrix/storage/idb/quirks.ts index 5eaa6836..e739da84 100644 --- a/src/matrix/storage/idb/quirks.js +++ b/src/matrix/storage/idb/quirks.ts @@ -18,7 +18,7 @@ limitations under the License. import {openDatabase, txnAsPromise, reqAsPromise} from "./utils"; // filed as https://bugs.webkit.org/show_bug.cgi?id=222746 -export async function detectWebkitEarlyCloseTxnBug(idbFactory) { +export async function detectWebkitEarlyCloseTxnBug(idbFactory: IDBFactory): Promise { const dbName = "hydrogen_webkit_test_inactive_txn_bug"; try { const db = await openDatabase(dbName, db => {