MCPcopy Index your code
hub / github.com/Effect-TS/effect / runPromiseExit

Function runPromiseExit

packages/effect/src/Micro.ts:4245–4255  ·  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

4243 * @category execution
4244 */
4245export const runPromiseExit = <A, E>(
4246 effect: Micro<A, E>,
4247 options?: {
4248 readonly signal?: AbortSignal | undefined
4249 readonly scheduler?: MicroScheduler | undefined
4250 } | undefined
4251): Promise<MicroExit<A, E>> =>
4252 new Promise((resolve, _reject) => {
4253 const handle = runFork(effect, options)
4254 handle.addObserver(resolve)
4255 })
4256
4257/**
4258 * 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