MCPcopy Create free account
hub / github.com/effect-app/libs / get

Function get

packages/effect-app/src/Model/Repository/ext.ts:46–52  ·  view source on GitHub ↗
(id: T[IdKey])

Source from the content-addressed store, hash-verified

44 repo: Repository<T, Encoded, Evt, ItemType, IdKey, RSchema, RPublish, RProvided>
45) => {
46 const get = (id: T[IdKey]) =>
47 repo.find(id).pipe(
48 Effect.flatMap(Option.match({
49 onNone: () => Effect.fail(new NotFoundError<ItemType>({ type: repo.itemType, id })),
50 onSome: Effect.succeed
51 }))
52 )
53 function saveManyWithPure_<
54 R,
55 A,

Callers 2

dsl.tsFile · 0.90
byIdAndSaveWithPureFunction · 0.70

Calls 2

pipeMethod · 0.65
failMethod · 0.45

Tested by

no test coverage detected