Skip to content

Commit ddfd1e4

Browse files
authored
fix RpcClient payload for tagged requests (#5049)
1 parent f2981c0 commit ddfd1e4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/clever-points-cough.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/rpc": patch
3+
---
4+
5+
fix RpcClient payload for tagged requests

packages/rpc/src/Rpc.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ export type PayloadConstructor<R> = R extends Rpc<
287287
infer _Success,
288288
infer _Error,
289289
infer _Middleware
290-
> ? _Payload extends { readonly make: (params: infer P, ...rest: infer _Rest) => infer _ } ? P
290+
> ?
291+
_Payload extends { readonly fields: Schema.Struct.Fields } ?
292+
Schema.Simplify<Schema.Struct.Constructor<_Payload["fields"]>>
291293
: _Payload["Type"]
292294
: never
293295

0 commit comments

Comments
 (0)