Closed
Description
TypeScript Version: master
Search Terms: IDBRequest
Code
new Promise((resolve, reject) => {
const req = indexedDB.open(name, 1)
req.onerror = () => reject(req.error)
req.onsuccess = () => resolve(req.result)
req.onupgradeneeded = () => {
req.result.createObjectStore('keyval', { notValidKey: false })
}
})
Expected behavior: notValidKey
should not be accepted in the second argument to createObjectStore
Actual behavior: Since req.result
is typed as any
, anything goes
Playground Link: link
Related Issues: none