Skip to content

Commit

Permalink
Fix returning interface types from rpc methods
Browse files Browse the repository at this point in the history
  • Loading branch information
alpertuna committed Apr 20, 2024
1 parent c817c0c commit 4098ac7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions types/defines/rpc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ declare namespace Rpc {
type Result<R> =
R extends Stubable ? Promise<Stub<R>> & Provider<R>
: R extends Serializable ? Promise<Stubify<R> & MaybeDisposable<R>> & MaybeProvider<R>
: R extends { [K in keyof R]: Serializable } ? Promise<Stubify<R> & MaybeDisposable<R>> & MaybeProvider<R>
: never;

// Type for method or property on an RPC interface.
Expand Down

0 comments on commit 4098ac7

Please sign in to comment.