(fn: () => Iterator<E, R, unknown>)
| 2489 | * @see {@link effect} |
| 2490 | */ |
| 2491 | export function effected<E extends Effect, R>(fn: () => Iterator<E, R, unknown>): Effected<E, R> { |
| 2492 | return new (Effected as any)( |
| 2493 | fn, |
| 2494 | "Yes, I’m sure I want to call the constructor of Effected directly.", |
| 2495 | ); |
| 2496 | } |
| 2497 | |
| 2498 | /** |
| 2499 | * Convert a {@link Promise} to an effected program containing a single {@link Effect}. |
no outgoing calls