Skip to content

then

then(target, onResolved)

Transforms resolved promise values with onResolved. This is an alias for Promise.then.

ts
then(Promise.resolve(5), (x) => x * 2); // Promise<10>
ts
pipe(
    Promise.resolve(5),
    then((x) => x * 2),
); // Promise<10>