aboutsummaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src/util/extractKey.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-02-08 15:23:44 +0100
committerFlorian Dold <florian@dold.me>2021-02-08 15:23:44 +0100
commit4452984a24334e3b7afb60e3db9dc12db02d65ba (patch)
tree50baf32f3a624d77346e38ba2bc573c063651ad2 /packages/idb-bridge/src/util/extractKey.ts
parent883637d3f287e5026de5bcafb559ff3e6ba1f3bb (diff)
downloadwallet-core-4452984a24334e3b7afb60e3db9dc12db02d65ba.tar.xz
idb-bridge: remove cyclic dependencies, rip out api extractor
Diffstat (limited to 'packages/idb-bridge/src/util/extractKey.ts')
-rw-r--r--packages/idb-bridge/src/util/extractKey.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/idb-bridge/src/util/extractKey.ts b/packages/idb-bridge/src/util/extractKey.ts
index 27f20310c..7aa8bd173 100644
--- a/packages/idb-bridge/src/util/extractKey.ts
+++ b/packages/idb-bridge/src/util/extractKey.ts
@@ -15,13 +15,13 @@
permissions and limitations under the License.
*/
-import { Key, KeyPath, Value } from "./types";
+import { IDBKeyPath, IDBValidKey } from "../idbtypes";
import valueToKey from "./valueToKey";
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-steps-for-extracting-a-key-from-a-value-using-a-key-path
-const extractKey = (keyPath: KeyPath, value: Value) => {
+const extractKey = (keyPath: IDBKeyPath | IDBKeyPath[], value: any) => {
if (Array.isArray(keyPath)) {
- const result: Key[] = [];
+ const result: IDBValidKey[] = [];
for (let item of keyPath) {
// This doesn't make sense to me based on the spec, but it is needed to pass the W3C KeyPath tests (see same