Search results
Type of JavaScript Promises (with particular return type) Effects are not traced in the Promise type, as they form part of the Effect that results in the promise.
M Promise
A JavaScript promise.
promise :: forall a. Deferred => ((a -> Effect Unit) -> (Error -> Effect Unit) -> Effect Unit) -> Promise a
Create a promise by supplying a function which takes a success callback and
error callback as arguments, returning an Effect
.
Represents 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
A type that represents JavaScript promises. Use this with the FFI and fromPromise
to turn promises into tasks.
foreign import fetchImpl :: String -> Effect (Promise Error Json)
PromiseSpec :: forall a. (Effect (JSPromise a)) -> PromiseSpec a
No further results.