Apologies, I require a translator for English. Please provide the code in your response. Thank you.
// [message]: Type 'Promise<unknown>' is missing the following properties from type 'IDBDatabase': name, objectStoreNames, onabort, onclose, and 10 more.ts(2740)
const /*[message] here("IDB") -->*/ IDB: IDBDatabase | null = (async () => {
return (await new Promise((resolve, reject) => {
const request = indexedDB.open("idb")
request.onerror = (event) => {
resolve(null)
}
request.onupgradeneeded = (event) => {
resolve(null)
}
request.onsuccess = (event) => {
resolve(request.result as IDBDatabase)
}
request.onblocked = () => {
resolve(null)
}
}))
})()