Skip to content

Commit

Permalink
fix Tag.Proxy types (#3858)
Browse files Browse the repository at this point in the history
Co-authored-by: maksim.khramtsov <[email protected]>
  • Loading branch information
KhraksMamtsov and maksim.khramtsov authored Oct 29, 2024
1 parent 81ddd45 commit ce1c21f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-falcons-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

fix `Tag.Proxy` type
2 changes: 1 addition & 1 deletion packages/effect/dtslint/Effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ hole<
>
>()

// $ExpectType { a: Effect<[1, "no"], never, "R">; }
// $ExpectType { a: Effect<1, never, "R">; }
hole<
Simplify<
Effect.Tag.Proxy<"R", {
Expand Down
6 changes: 1 addition & 5 deletions packages/effect/src/Effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6505,11 +6505,7 @@ export declare namespace Tag {
: Type[k] extends (...args: infer Args extends ReadonlyArray<any>) => infer A ?
(...args: Readonly<Args>) => Effect<A, never, Self>
: Type[k] extends Effect<infer A, infer E, infer R> ? Effect<A, E, Self | R>
: Effect<
Type[k] extends (...args: infer Args extends ReadonlyArray<any>) => any ? [Type[k], Args] : [Type[k], "no"],
never,
Self
>
: Effect<Type[k], never, Self>
}
}

Expand Down

0 comments on commit ce1c21f

Please sign in to comment.