Module
Dexie.Promise
- Package
- purescript-dexie
- Repository
- mushishi78/purescript-dexie
#Promise Source
data Promise :: Type -> TypeRepresents a thunk to create a Dexie Promise.
Ideally no async operations that are unrelated to indexed db should be modelled with these promises as they will automatically close an open transaction. So if you do not manually make a Promise, then the compiler can ensure you're not closing transactions.
See Transaction Scope for more details about closing transactions.
Documentation: dexie.org/docs/Promise/Promise Methods: Dexie.Promise
Instances
#LaunchedPromise Source
data LaunchedPromise :: Type -> TypeRepresents a previously triggered Dexie Promise See Dexie.Promise
#allSettled Source
allSettled :: forall v. Array (Promise v) -> Promise (Array v)Documentation: Promise.allSettled()
#resolve Source
resolve :: forall v. v -> Promise vDocumentation: Promise.resolve()
#_then Source
_then :: forall v1 v2. (v1 -> Promise v2) -> Promise v1 -> Promise v2Documentation: Promise.prototype.then()
#launch Source
launch :: forall v me. MonadEffect me => Promise v -> me (LaunchedPromise v)Triggers a promise but does not wait for it to resolve.
#join Source
join :: forall v. LaunchedPromise v -> Promise vCan be used to wait on a previously triggered promise.