summaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src/MemoryBackend.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-03 13:00:48 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-03 13:01:05 +0530
commitffd2a62c3f7df94365980302fef3bc3376b48182 (patch)
tree270af6f16b4cc7f5da2afdba55c8bc9dbea5eca5 /packages/idb-bridge/src/MemoryBackend.ts
parentaa481e42675fb7c4dcbbeec0ba1c61e1953b9596 (diff)
downloadwallet-core-ffd2a62c3f7df94365980302fef3bc3376b48182.tar.gz
wallet-core-ffd2a62c3f7df94365980302fef3bc3376b48182.tar.bz2
wallet-core-ffd2a62c3f7df94365980302fef3bc3376b48182.zip
modularize repo, use pnpm, improve typechecking
Diffstat (limited to 'packages/idb-bridge/src/MemoryBackend.ts')
-rw-r--r--packages/idb-bridge/src/MemoryBackend.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/idb-bridge/src/MemoryBackend.ts b/packages/idb-bridge/src/MemoryBackend.ts
index 08103d722..c5fac41a9 100644
--- a/packages/idb-bridge/src/MemoryBackend.ts
+++ b/packages/idb-bridge/src/MemoryBackend.ts
@@ -40,7 +40,7 @@ import { Key, Value, KeyPath } from "./util/types";
import { StoreKeyResult, makeStoreKeyValue } from "./util/makeStoreKeyValue";
import getIndexKeys from "./util/getIndexKeys";
import openPromise from "./util/openPromise";
-import BridgeIDBKeyRange from "./BridgeIDBKeyRange";
+import { BridgeIDBKeyRange } from "./BridgeIDBKeyRange";
enum TransactionLevel {
Disconnected = 0,
@@ -863,9 +863,9 @@ export class MemoryBackend implements Backend {
!db.txRestrictObjectStores.includes(objectStoreName)
) {
throw Error(
- `Not allowed to access store '${
- objectStoreName
- }', transaction is over ${JSON.stringify(db.txRestrictObjectStores)}`,
+ `Not allowed to access store '${objectStoreName}', transaction is over ${JSON.stringify(
+ db.txRestrictObjectStores,
+ )}`,
);
}
if (typeof range !== "object") {
@@ -986,7 +986,7 @@ export class MemoryBackend implements Backend {
throw Error("db inconsistent: expected index entry missing");
}
const newPrimaryKeys = existingRecord.primaryKeys.filter(
- x => compareKeys(x, primaryKey) !== 0,
+ (x) => compareKeys(x, primaryKey) !== 0,
);
if (newPrimaryKeys.length === 0) {
index.modifiedData = indexData.without(indexKey);