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
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:
letarchives=
db.createObjectStore("ArchivePolygons", jsOptions (fun o ->
o.keyPath <-"ArchiveUuid"))
Looking at paraobject, however, seems like the nicest option:
If we ignore the terrible interface names for IndexedDB, of course :) So from:
type[<AllowNullLiteral; Global>]IDBCreateStoreOptions=abstractkeyPath:objwith get, set
abstractautoIncrement:boolwith get, set
to:
[<AllowNullLiteral; Global>]typeIDBCreateStoreOptions[<ParamObject; Emit($0)>](
keyPath: obj,
?autoIncrement: bool
)=member valkeyPath:obj = jsNative with get, set
member valautoIncrement:bool = jsNative with get, set
@MangelMaxime, where do you stand on this? And @robitar, are you using IndexedDB, and would it break your applications?
The text was updated successfully, but these errors were encountered:
And @robitar, are you using IndexedDB, and would it break your applications?
@SimenLK rewriting the library with [<ParamObject>] should be backward compatible as long as the names are kept consistent. At least, this was my conclusion when rewriting the Fable documentation.
Thanks to that, personally I am fine with the library being upgraded to [<ParamObject>]. I believe the only limitation with using [<ParamObject>] is that because you works with classes, you can compose/inherit as easily as with interfaces.
For this reason, I believe we should use [<ParamObject>] syntax only for objects that we build like options POJO and keep interfaces to represents exposed APIs like db.createObjectStore
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: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?
The text was updated successfully, but these errors were encountered: