Skip to content

fromPromise

fromPromise<A>(p): Deferred<A>

Defined in: Core/Deferred.ts:38

Wraps a Promise into a Deferred, structurally excluding rejection handlers, .catch(), .finally(), and chainable .then().

A

Promise<A>

Deferred<A>

const d = Deferred.fromPromise(Promise.resolve("hello"));
const value = await d; // "hello"