You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was purging an ever-growing IndexedDB database occasionally - trying to use await indexeddbProvider.clearData(); as the documentation says provider.clearData(): Promise.
Typescript rightfully reports:
'await' has no effect on the type of this expression.ts(80007)
/**
* Destroys this instance and removes all data from indexeddb.
*/
clearData () {
this.destroy().then(() => {
idb.deleteDB(this.name)
})
}
Maybe this would fix it:
/**
* Destroys this instance and removes all data from indexeddb.
*/
clearData () {
return this.destroy().then(() => {
idb.deleteDB(this.name)
})
}
The text was updated successfully, but these errors were encountered:
I was purging an ever-growing IndexedDB database occasionally - trying to use
await indexeddbProvider.clearData();
as the documentation saysprovider.clearData(): Promise
.Typescript rightfully reports:
Maybe this would fix it:
The text was updated successfully, but these errors were encountered: