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

Function getUserPosts1

test/README.example.proof.ts:962–967  ·  view source on GitHub ↗
(userId: number)

Source from the content-addressed store, hash-verified

960 const fetchPosts = effect("fetchPosts")<[userId: number], any[]>;
961
962 const getUserPosts1 = (userId: number) =>
963 effected(function* () {
964 const user = yield* fetchUser(userId);
965 if (!user) return null;
966 return yield* fetchPosts(user.id);
967 });
968
969 expect(getUserPosts1).to(
970 equal<

Callers

nothing calls this directly

Calls 2

effectedFunction · 0.90
fetchUserFunction · 0.70

Tested by

no test coverage detected