MCPcopy Create free account
hub / github.com/effect-app/libs / makeRunPromise

Function makeRunPromise

packages/effect-app/src/runtime.ts:38–45  ·  view source on GitHub ↗
(services: Context<T>)

Source from the content-addressed store, hash-verified

36
37// we wrap into CauseException because we want to keep the full cause of the failure.
38export const makeRunPromise = <T>(services: Context<T>) =>
39 flow(Effect.runPromiseExitWith(services), (_) =>
40 _.then(
41 Exit.match({
42 onFailure: (cause) => Promise.reject(new CauseException(cause, "runPromise")),
43 onSuccess: (value) => Promise.resolve(value)
44 })
45 ))
46
47export const makeRunSync = <T>(services: Context<T>) =>
48 flow(

Callers 3

QueryImplClass · 0.90
useQueryFunction · 0.90
useOmegaForm.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…