Module

Web.Promise

Package
purescript-web-promise
Repository
purescript-deprecated/purescript-web-promise

#Executor Source

type Executor a = (a -> Effect Unit) -> (Rejection -> Effect Unit) -> Effect Unit

#Flatten Source

class Flatten a b | a -> b

Instances

#all Source

all :: forall a. Array (Promise a) -> Effect (Promise (Array a))

#catch Source

catch :: forall a b. (Rejection -> Effect (Promise b)) -> Promise a -> Effect (Promise b)

#finally Source

finally :: forall a. (Effect (Promise Unit)) -> Promise a -> Effect (Promise a)

#new Source

new :: forall a b. Flatten a b => Executor a -> Effect (Promise b)

#race Source

race :: forall a. Array (Promise a) -> Effect (Promise a)

#resolve Source

resolve :: forall a b. Flatten a b => a -> Promise b

#thenOrCatch Source

thenOrCatch :: forall a b c. Flatten b c => (a -> Effect (Promise b)) -> (Rejection -> Effect (Promise b)) -> Promise a -> Effect (Promise c)

#then_ Source

then_ :: forall a b c. Flatten b c => (a -> Effect (Promise b)) -> Promise a -> Effect (Promise c)

Re-exports from Web.Promise.Internal

#Promise Source

data Promise t0

#reject Source

reject :: forall a. Rejection -> Promise a

Re-exports from Web.Promise.Rejection

#Rejection Source