MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / effected

Function effected

src/effected.ts:2491–2496  ·  view source on GitHub ↗
(fn: () => Iterator<E, R, unknown>)

Source from the content-addressed store, hash-verified

2489 * @see {@link effect}
2490 */
2491export 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}.

Callers 15

effected.proof.tsFile · 0.90
fetchDataFunction · 0.90
effected.spec.tsFile · 0.90
readItFunction · 0.90
raise42Function · 0.90
processItemFunction · 0.90
slowFunction · 0.90
fetchDataFunction · 0.90
stringifyFunction · 0.90
transformFunction · 0.90
requiresAdminFunction · 0.90

Calls

no outgoing calls

Tested by 15

readItFunction · 0.72
raise42Function · 0.72
processItemFunction · 0.72
slowFunction · 0.72
fetchDataFunction · 0.72
stringifyFunction · 0.72
transformFunction · 0.72
requiresAdminFunction · 0.72
fetchAdminDataFunction · 0.72
createUserFunction · 0.72
createUser2Function · 0.72
safeDivideFunction · 0.72