(
db: IDBDatabase,
mode: IDBTransactionMode,
storeName: string = STORE_WORKSPACES,
)
| 67 | } |
| 68 | |
| 69 | function txStore( |
| 70 | db: IDBDatabase, |
| 71 | mode: IDBTransactionMode, |
| 72 | storeName: string = STORE_WORKSPACES, |
| 73 | ): IDBObjectStore { |
| 74 | return db.transaction(storeName, mode).objectStore(storeName); |
| 75 | } |
| 76 | |
| 77 | function reqToPromise<T>(req: IDBRequest<T>): Promise<T> { |
| 78 | return new Promise((resolve, reject) => { |