Module

Web.Promise

#Executor

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

#Flatten

class Flatten a b | a -> b

Instances

#all

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

#catch

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

#finally

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

#new

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

#race

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

#resolve

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

#then_

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

Re-exports from Web.Promise.Internal

#Promise

data Promise :: Type -> Type

#reject

reject :: forall a. Rejection -> Promise a

Re-exports from Web.Promise.Rejection

#Rejection

data Rejection :: Type

Modules