diff options
author | Florian Dold <florian@dold.me> | 2021-02-08 15:23:44 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-02-08 15:23:44 +0100 |
commit | 4452984a24334e3b7afb60e3db9dc12db02d65ba (patch) | |
tree | 50baf32f3a624d77346e38ba2bc573c063651ad2 /packages/idb-bridge/src/util/makeStoreKeyValue.ts | |
parent | 883637d3f287e5026de5bcafb559ff3e6ba1f3bb (diff) | |
download | wallet-core-4452984a24334e3b7afb60e3db9dc12db02d65ba.tar.xz |
idb-bridge: remove cyclic dependencies, rip out api extractor
Diffstat (limited to 'packages/idb-bridge/src/util/makeStoreKeyValue.ts')
-rw-r--r-- | packages/idb-bridge/src/util/makeStoreKeyValue.ts | 14 |
1 files changed, 7 insertions, 7 deletions
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, }; |