(self: FiberSet<A, E>)
| 599 | * |
| 600 | * ```ts import.meta.vitest |
| 601 | * import { Effect, FiberSet } from "effect" |
| 602 | * |
| 603 | * const program = Effect.gen(function*() { |
| 604 | * const set = yield* FiberSet.make() |
| 605 | * const runPromise = yield* FiberSet.runtimePromise(set)() |
| 606 | * |
| 607 | * // Run effects as promises |
| 608 | * const promise1 = runPromise(Effect.succeed("hello")) |
| 609 | * const promise2 = runPromise(Effect.succeed("world")) |
| 610 | * |
| 611 | * return [yield* Effect.promise(() => promise1), yield* Effect.promise(() => promise2)] |
| 612 | * }) |
| 613 | * |
| 614 | * const actual = await Effect.runPromise(Effect.scoped(program)) |
| 615 | * actual // => ["hello", "world"] |
| 616 | * ``` |
| 617 | * |
| 618 | * @see {@link runtime} for a runner that returns the forked `Fiber` |
| 619 | * |
| 620 | * @category combinators |
| 621 | * @since 3.13.0 |
| 622 | */ |
| 623 | export const runtimePromise = <A, E>(self: FiberSet<A, E>): <R = never>() => Effect.Effect< |
| 624 | <XE extends E, XA extends A>( |
| 625 | effect: Effect.Effect<XA, XE, R>, |
| 626 | options?: |
| 627 | | Effect.RunOptions & { readonly propagateInterruption?: boolean | undefined } |
| 628 | | undefined |
| 629 | ) => Promise<XA>, |
| 630 | never, |
| 631 | R |
| 632 | > => |
| 633 | <R>() => |
no test coverage detected
searching dependent graphs…