function deleteByKey(objectStore, key): Promise<void>;Defined in: packages/indexeddb-db-collection/src/wrapper.ts:456
Deletes an item by its key from an object store.
IDBObjectStore
The IDBObjectStore to delete from
IDBValidKey
The key of the item to delete
Promise<void>
A promise that resolves when the item is deleted
await executeTransaction(db, 'todos', 'readwrite', async (tx, stores) => {
await deleteByKey(stores.todos, 1)
console.log('Todo deleted')
})