Skip to content

Commit

Permalink
Merge pull request #83 from seasonedcc/remove-prettify-to-avoid-circu…
Browse files Browse the repository at this point in the history
…lar-bug
  • Loading branch information
gustavoguichard authored Jul 31, 2023
2 parents b70d584 + 6f210bc commit be2fb83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ type UnpackDFObject<Obj extends Record<string, DomainFunction>> =
| { [K in keyof Obj]: UnpackData<Obj[K]> }
| never

type MergeObjs<Objs extends unknown[], output = {}> = Prettify<
type MergeObjs<Objs extends unknown[], output = {}> =
Objs extends [infer first, ...infer rest]
? MergeObjs<rest, Omit<output, keyof first> & first>
? MergeObjs<rest, Prettify<Omit<output, keyof first> & first>>
: output
>

type Prettify<T> = {
[K in keyof T]: T[K]
Expand Down

0 comments on commit be2fb83

Please sign in to comment.