本页还没有译文
本页 14 段还没译成Tiếng Việt,下面显示的是英文原文。deleteByKey
还没翻译译自英文(tanstack.com)本页 14 段都还没译
function deleteByKey(objectStore, key): Promise<void>;Defined in: packages/db/src/indexed-db-wrapper.ts:500
Deletes an item by its key from an object store.
Parameters
objectStore
IDBObjectStore
The IDBObjectStore to delete from
key
IDBValidKey
The key of the item to delete
Returns
Promise<void>
A promise that resolves when the item is deleted
Example
await executeTransaction(db, 'todos', 'readwrite', async (tx, stores) => {
await deleteByKey(stores.todos, 1)
console.log('Todo deleted')
})AI 翻译查看英文原文