Skip to content

Commit

Permalink
fup
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Dec 15, 2023
1 parent b617e9d commit fd0efc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-seals-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/infra": patch
---

fup
9 changes: 2 additions & 7 deletions packages/infra/_src/services/Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export function queryOneEffect<
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: Effect<R, E, { filter?: Filter<PM>; collect?: (t: T) => Option<S> }>
map: Effect<R, E, { filter?: Filter<PM>; collect: (t: T) => Option<S> }>
): Effect<R, E | NotFoundError<ItemType>, S>
export function queryOneEffect<
T extends { id: string },
Expand Down Expand Up @@ -312,8 +312,7 @@ export function queryOne<
S = T
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: { filter?: Filter<PM>; collect?: (t: T) => Option<S> }
map: { filter?: Filter<PM>; collect: (t: T) => Option<S> }
): Effect<never, NotFoundError<ItemType>, S>
export function queryOne<
T extends { id: string },
Expand All @@ -322,7 +321,6 @@ export function queryOne<
ItemType extends string
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: { filter?: Filter<PM> }
): Effect<never, NotFoundError<ItemType>, T>
export function queryOne<
Expand All @@ -333,7 +331,6 @@ export function queryOne<
S = T
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: { filter?: Filter<PM>; collect?: (t: T) => Option<S> }
) {
return self.queryOneEffect(Effect(map))
Expand Down Expand Up @@ -443,7 +440,6 @@ export function queryAndSavePureEffect<
S extends T = T
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: Effect<R, E, { filter: Filter<PM>; collect?: (t: T) => Option<S>; limit?: number; skip?: number }>
) {
return <R2, A, E2, S2 extends T>(pure: Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) =>
Expand All @@ -462,7 +458,6 @@ export function queryAndSavePure<
S extends T = T
>(
self: RepositoryBaseC<T, PM, Evt, ItemType>,
// TODO: think about collectPM, collectE, and collect(Parsed)
map: { filter: Filter<PM>; collect?: (t: T) => Option<S>; limit?: number; skip?: number }
) {
return self.queryAndSavePureEffect(Effect(map))
Expand Down

0 comments on commit fd0efc3

Please sign in to comment.