From 4452984a24334e3b7afb60e3db9dc12db02d65ba Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 8 Feb 2021 15:23:44 +0100 Subject: idb-bridge: remove cyclic dependencies, rip out api extractor --- packages/idb-bridge/src/util/makeStoreKeyValue.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/idb-bridge/src/util/makeStoreKeyValue.ts') diff --git a/packages/idb-bridge/src/util/makeStoreKeyValue.ts b/packages/idb-bridge/src/util/makeStoreKeyValue.ts index f9006ef51..b535bced5 100644 --- a/packages/idb-bridge/src/util/makeStoreKeyValue.ts +++ b/packages/idb-bridge/src/util/makeStoreKeyValue.ts @@ -14,25 +14,25 @@ permissions and limitations under the License. */ -import { Value, Key, KeyPath } from "./types"; import extractKey from "./extractKey"; import { DataError } from "./errors"; import valueToKey from "./valueToKey"; import structuredClone from "./structuredClone"; import injectKey from "./injectKey"; +import { IDBKeyPath, IDBValidKey } from "../idbtypes"; export interface StoreKeyResult { updatedKeyGenerator: number; - key: Key; - value: Value; + key: IDBValidKey; + value: any; } export function makeStoreKeyValue( - value: Value, - key: Key | undefined, + value: any, + key: IDBValidKey | undefined, currentKeyGenerator: number, autoIncrement: boolean, - keyPath: KeyPath | null, + keyPath: IDBKeyPath | null, ): StoreKeyResult { const haveKey = key !== null && key !== undefined; const haveKeyPath = keyPath !== null && keyPath !== undefined; @@ -89,7 +89,7 @@ export function makeStoreKeyValue( updatedKeyGenerator = currentKeyGenerator; } return { - key: key, + key: key!, value: value, updatedKeyGenerator, }; -- cgit v1.2.3