deno.land / x / typebox@0.32.21 / changelog / 0.21.2.md
Updates:
Before
const A = Type.Object({ a: Type.String() })
const B = Type.Object({ b: Type.String() })
const C = Type.Object({ c: Type.String() })
const T = Type.Intersect([A, Type.Union([B, C])])
// type T = { a: string } & { b: string } & { c: string }
After
const A = Type.Object({ a: Type.String() })
const B = Type.Object({ b: Type.String() })
const C = Type.Object({ c: Type.String() })
const T = Type.Intersect([A, Type.Union([B, C])])
// type T = { a: string } & ({ b: string } | { c: string })
Version Info