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

Function createUser2

test/README.example.proof.ts:195–202  ·  view source on GitHub ↗
(user: Omit<User, "id">)

Source from the content-addressed store, hash-verified

193 };
194
195 const createUser2 = (user: Omit<User, "id">) =>
196 effected(function* () {
197 yield* requiresAdmin();
198 const id = yield* effectify(db.user.create(user));
199 const savedUser = { id, ...user };
200 yield* println("User created:", savedUser);
201 return savedUser;
202 });
203
204 expect(createUser2).to(
205 equal<

Callers

nothing calls this directly

Calls 6

effectedFunction · 0.90
effectifyFunction · 0.90
requiresAdminFunction · 0.70
tapMethod · 0.65
flatMapMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected