Try Install Learn Blog API Packages GitHub
Pages
Standard Library

Search
Entities

Promise

Functions

create
:
Tuple(Function(value, Void), Function(error, Void), Promise(error, value))

Create a promise with manual resolve / reject.

{resolve, reject, promise} = Promise.create()
never
:
Promise(Never, Void)

Returns a resolved promise with Void which never fails.

never1
(
param1
:
a
)
:
Promise(Never, Void)

Returns a resolved promise with Void which never fails with one argument which is ignored.

never2
(
param1
:
a
param2
:
b
)
:
Promise(Never, Void)

Returns a resolved promise with Void which never fails with two arguments which are ignored.

never3
(
param1
:
a
param2
:
b
param3
:
c
)
:
Promise(Never, Void)

Returns a resolved promise with Void which never fails with three arguments which are ignored.

reject
(
input
:
a
)
:
Promise(a, b)

Creates an already rejected Promise

resolve
(
input
:
a
)
:
Promise(b, a)

Creates an already resolved Promise