Open julienw opened 4 years ago
This is the current definition of IDBKeyRange: https://github.com/facebook/flow/blob/4acb3575d94d9aa95cdaf9aff3da8b5282d5bb18/lib/indexeddb.js#L103-L112
This is mostly incorrect because we need these methods to be static. However I believe it's not possible with interfaces.
What's difficult here is that IDBKeyRange is 2 things: a type, and an object with static methods that return this type. Should that be a class instead of an interface ?
Just run into it, better to not have IDBKeyRange definition than to have this. this could be a class (that's how it is for other "type + static" built-ins) or it could be two different types: IDBKeyRange for static methods and another type for instances but this might be confusing.
Missing/Incorrect APIs
IDBKeyRange in IndexedDB
The problems are:
any
so not type-checked at all.Relevant documentation
https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange