Hey, pulled in the new changes to IndexedDB which changed some things up, but since I had been using a lot of dynamic typing in my original implementations, I tried using the newly added proper types.
Kinda annoying to work with interfaces, though the jsOptions isn't too bad:
let archives =
db.createObjectStore("ArchivePolygons", jsOptions (fun o ->
o.keyPath <- "ArchiveUuid"
))
Looking at paraobject, however, seems like the nicest option:
let archives =
db.createObjectStore("ArchivePolygons", IDBCreateStoreOptions("ArchiveUuid"))
If we ignore the terrible interface names for IndexedDB, of course :) So from:
type [<AllowNullLiteral; Global>] IDBCreateStoreOptions =
abstract keyPath: obj with get, set
abstract autoIncrement: bool with get, set
to:
[<AllowNullLiteral; Global>]
type IDBCreateStoreOptions
[<ParamObject; Emit($0)>]
(
keyPath: obj,
?autoIncrement: bool
)
=
member val keyPath: obj = jsNative with get, set
member val autoIncrement: bool = jsNative with get, set
@MangelMaxime, where do you stand on this? And @robitar, are you using IndexedDB, and would it break your applications?
Hey, pulled in the new changes to IndexedDB which changed some things up, but since I had been using a lot of dynamic typing in my original implementations, I tried using the newly added proper types.
Kinda annoying to work with interfaces, though the
jsOptionsisn't too bad:Looking at paraobject, however, seems like the nicest option:
If we ignore the terrible interface names for IndexedDB, of course :) So from:
to:
@MangelMaxime, where do you stand on this? And @robitar, are you using IndexedDB, and would it break your applications?