typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -21,7 +21,7 @@ export async function withStore<T>(mode: TxMode, fn: (store: IDBObjectStore) =>
|
||||
return new Promise((resolve, reject) => {
|
||||
const tx = db.transaction('items', mode);
|
||||
const store = tx.objectStore('items');
|
||||
let result: any;
|
||||
let result: unknown;
|
||||
const wrap = async () => {
|
||||
try { result = await fn(store); } catch (e) { reject(e); }
|
||||
};
|
||||
@@ -31,4 +31,3 @@ export async function withStore<T>(mode: TxMode, fn: (store: IDBObjectStore) =>
|
||||
tx.onabort = () => reject(tx.error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user