Type

Expand

: T extends
Parsing error with InferType
? { [K in keyof U]: U[K] } : never

It obligates to TypeScript to Expand the type. Instead of being { id: 1 } | { name: "hi" } makes It's { id: 1, name: "hi" } https://www.totaltypescript.com/concepts/the-prettify-helper

kaplay logo

Layer

Miscalenous