-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Milestone
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
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this