From ffd2a62c3f7df94365980302fef3bc3376b48182 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 3 Aug 2020 13:00:48 +0530 Subject: modularize repo, use pnpm, improve typechecking --- packages/idb-bridge/src/BridgeIDBIndex.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'packages/idb-bridge/src/BridgeIDBIndex.ts') diff --git a/packages/idb-bridge/src/BridgeIDBIndex.ts b/packages/idb-bridge/src/BridgeIDBIndex.ts index 5be80ba71..3c1b39435 100644 --- a/packages/idb-bridge/src/BridgeIDBIndex.ts +++ b/packages/idb-bridge/src/BridgeIDBIndex.ts @@ -15,11 +15,11 @@ permissions and limitations under the License. */ -import BridgeIDBCursor from "./BridgeIDBCursor"; -import BridgeIDBCursorWithValue from "./BridgeIDBCursorWithValue"; -import BridgeIDBKeyRange from "./BridgeIDBKeyRange"; -import BridgeIDBObjectStore from "./BridgeIDBObjectStore"; -import BridgeIDBRequest from "./BridgeIDBRequest"; +import { BridgeIDBCursor } from "./BridgeIDBCursor"; +import { BridgeIDBCursorWithValue } from "./BridgeIDBCursorWithValue"; +import { BridgeIDBKeyRange } from "./BridgeIDBKeyRange"; +import { BridgeIDBObjectStore } from "./BridgeIDBObjectStore"; +import { BridgeIDBRequest } from "./BridgeIDBRequest"; import { ConstraintError, InvalidStateError, @@ -27,7 +27,7 @@ import { } from "./util/errors"; import { BridgeIDBCursorDirection, Key, KeyPath } from "./util/types"; import valueToKey from "./util/valueToKey"; -import BridgeIDBTransaction from "./BridgeIDBTransaction"; +import { BridgeIDBTransaction } from "./BridgeIDBTransaction"; import { Schema, Backend, @@ -59,15 +59,18 @@ export class BridgeIDBIndex { } get keyPath(): KeyPath { - return this._schema.objectStores[this.objectStore.name].indexes[this._name].keyPath; + return this._schema.objectStores[this.objectStore.name].indexes[this._name] + .keyPath; } get multiEntry(): boolean { - return this._schema.objectStores[this.objectStore.name].indexes[this._name].multiEntry; + return this._schema.objectStores[this.objectStore.name].indexes[this._name] + .multiEntry; } get unique(): boolean { - return this._schema.objectStores[this.objectStore.name].indexes[this._name].unique; + return this._schema.objectStores[this.objectStore.name].indexes[this._name] + .unique; } get _backend(): Backend { @@ -305,7 +308,6 @@ export class BridgeIDBIndex { operation, source: this, }); - } public toString() { -- cgit v1.2.3