MCPcopy Create free account
hub / github.com/Effect-TS/effect / runPromiseExit

Function runPromiseExit

packages/effect/src/Micro.ts:4246–4256  ·  view source on GitHub ↗
(
  effect: Micro<A, E>,
  options?: {
    readonly signal?: AbortSignal | undefined
    readonly scheduler?: MicroScheduler | undefined
  } | undefined
)

Source from the content-addressed store, hash-verified

4244 * @category execution
4245 */
4246export const runPromiseExit = <A, E>(
4247 effect: Micro<A, E>,
4248 options?: {
4249 readonly signal?: AbortSignal | undefined
4250 readonly scheduler?: MicroScheduler | undefined
4251 } | undefined
4252): Promise<MicroExit<A, E>> =>
4253 new Promise((resolve, _reject) => {
4254 const handle = runFork(effect, options)
4255 handle.addObserver(resolve)
4256 })
4257
4258/**
4259 * Execute the `Micro` effect and return a `Promise` that resolves with the

Callers 1

runPromiseFunction · 0.70

Calls 2

runForkFunction · 0.70
addObserverMethod · 0.65

Tested by

no test coverage detected