Skip to content

Commit

Permalink
fix context
Browse files Browse the repository at this point in the history
patroza committed Nov 6, 2024
1 parent 29ea487 commit fe019f1
Showing 2 changed files with 25 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-planes-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/infra": patch
---

fix context
26 changes: 20 additions & 6 deletions packages/infra/src/api/routing7.ts
Original file line number Diff line number Diff line change
@@ -768,17 +768,31 @@ export const makeRouter = <
Handler<
Filter<Rsc>[K],
"d",
Impl[K] extends (...args: any[]) => Effect<any, any, infer R> ? R
: Impl[K] extends Effect<any, any, infer R> ? R
: never
Exclude<
| Context
| Exclude<
Impl[K] extends (...args: any[]) => Effect<any, any, infer R> ? R
: Impl[K] extends Effect<any, any, infer R> ? R
: never,
GetEffectContext<CTXMap, Rsc[K]["config"]>
>,
HttpRouter.HttpRouter.Provided
>
>
>
: Handler<
Filter<Rsc>[K],
"d",
Impl[K] extends (...args: any[]) => Effect<any, any, infer R> ? R
: Impl[K] extends Effect<any, any, infer R> ? R
: never
Exclude<
| Context
| Exclude<
Impl[K] extends (...args: any[]) => Effect<any, any, infer R> ? R
: Impl[K] extends Effect<any, any, infer R> ? R
: never,
GetEffectContext<CTXMap, Rsc[K]["config"]>
>,
HttpRouter.HttpRouter.Provided
>
>
} = (obj: Record<keyof Filtered, any>) =>
typedKeysOf(obj).reduce((acc, cur) => {

0 comments on commit fe019f1

Please sign in to comment.