MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeUser

Method makeUser

ai-docs/src/51_http-server/fixtures/server/Users.ts:130–134  ·  view source on GitHub ↗
(input: typeof User.jsonCreate.Type)

Source from the content-addressed store, hash-verified

128 const users = new Map<UserId, User>()
129
130 const makeUser = (input: typeof User.jsonCreate.Type) =>
131 User.insert.makeEffect(input).pipe(
132 Effect.map((user) => new User(user)),
133 Effect.orDie
134 )
135
136 const admin = yield* makeUser({ name: "Admin", email: "admin@acme.dev" })
137 users.set(admin.id, admin)

Callers

nothing calls this directly

Calls 3

pipeMethod · 0.65
makeEffectMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected