本页还没有译文
本页 11 段还没译成Français,下面显示的是英文原文。clear
还没翻译译自英文(tanstack.com)本页 11 段都还没译
function clear(objectStore): Promise<void>;Defined in: packages/db/src/indexed-db-wrapper.ts:531
Removes all items from an object store.
Parameters
objectStore
IDBObjectStore
The IDBObjectStore to clear
Returns
Promise<void>
A promise that resolves when all items are removed
Example
await executeTransaction(db, 'todos', 'readwrite', async (tx, stores) => {
await clear(stores.todos)
console.log('All todos cleared')
})AI 翻译查看英文原文