Skip to content

Commit

Permalink
fixup! types: GuestInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Jul 16, 2024
1 parent f886122 commit 5829718
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/async-flow/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ type HostInterface<T> = {
* Convert an entire Host interface into what the Guest will receive.
*/
export type GuestInterface<T> = {
[K in keyof T]: GuestOf<T[K]>;
[K in keyof T]: T[K] extends HostAsyncFuncWrapper
? GuestOf<T[K]>
: T[K] extends object
? GuestInterface<T[K]>
: T[K];
};

/**
Expand Down

0 comments on commit 5829718

Please sign in to comment.