diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-07-21 23:50:10 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-07-21 23:50:10 +0200 |
commit | 16ecbc9f177f1f71048840edf9b7af20ace3aad8 (patch) | |
tree | 3d6a1a164b9744cf6cfcdbdff44df5a15a304f10 /packages | |
parent | cfa1df734315efc8e24a1a846e4d694abe2249ea (diff) |
headless wallet skeleton, type fixes
Diffstat (limited to 'packages')
-rw-r--r-- | packages/idb-bridge/package.json | 9 | ||||
-rw-r--r-- | packages/idb-bridge/src/BridgeIDBFactory.ts | 2 | ||||
-rw-r--r-- | packages/idb-bridge/src/MemoryBackend.ts | 2 | ||||
-rw-r--r-- | packages/idb-bridge/tsconfig.json | 1 |
4 files changed, 6 insertions, 8 deletions
diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index 52396bfe9..940f1747b 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -2,15 +2,14 @@ "name": "idb-bridge", "version": "0.0.1", "description": "IndexedDB implementation that uses SQLite3 as storage", - "main": "index.js", + "main": "./build/index.js", + "types": "./build/index.d.ts", "author": "Florian Dold", "license": "AGPL-3.0-or-later", "private": false, - "dependencies": { - "sqlite3": "^4.0.8" - }, "scripts": { - "test": "tsc && ava" + "test": "tsc && ava", + "build": "tsc" }, "devDependencies": { "ava": "2.1.0", diff --git a/packages/idb-bridge/src/BridgeIDBFactory.ts b/packages/idb-bridge/src/BridgeIDBFactory.ts index ad02be461..f6234b49c 100644 --- a/packages/idb-bridge/src/BridgeIDBFactory.ts +++ b/packages/idb-bridge/src/BridgeIDBFactory.ts @@ -27,7 +27,7 @@ import queueTask from "./util/queueTask"; type DatabaseList = Array<{ name: string; version: number }>; -class BridgeIDBFactory { +export class BridgeIDBFactory { public cmp = compareKeys; private backend: Backend; private connections: BridgeIDBDatabase[] = []; diff --git a/packages/idb-bridge/src/MemoryBackend.ts b/packages/idb-bridge/src/MemoryBackend.ts index bd9b8996d..1a85a7397 100644 --- a/packages/idb-bridge/src/MemoryBackend.ts +++ b/packages/idb-bridge/src/MemoryBackend.ts @@ -881,8 +881,6 @@ export class MemoryBackend implements Backend { // if requested. if (req.resultLevel === ResultLevel.Full) { for (let i = 0; i < numResults; i++) { - console.log("getting value for index", i); - console.log("with key", primaryKeys[i]); const result = storeData.get(primaryKeys[i]); if (!result) { throw Error("invariant violated"); diff --git a/packages/idb-bridge/tsconfig.json b/packages/idb-bridge/tsconfig.json index 1b9102e40..9f076388e 100644 --- a/packages/idb-bridge/tsconfig.json +++ b/packages/idb-bridge/tsconfig.json @@ -6,6 +6,7 @@ "noImplicitAny": true, "sourceMap": false, "outDir": "build", + "declaration": true, "noEmitOnError": true, "strict": true, "incremental": true, |