Requests a union-typed property one branch at a time, so alternatives that need different shapes can each state
their own. Keys are opaque Branch labels telling the alternatives apart; which variants a branch retrieves
is fixed by matching its shape against the property's declared variants, never by its key, so
reordering or renaming variants at the source leaves an existing template valid. A variant left unmatched by every
branch contributes no values, and a branch matching no variant is unsatisfiable and is rejected.
A branch holds one value, never a collection: cardinality belongs to the property as a whole, and the
Criteria constraining it ride on the entry hosting the union. A branch never holds another union directly,
though a branch Template may carry unions of its own.
Important
A union MUST include at least one branch: the empty object {} is an Atomic. The type admits it only
because TypeScript cannot express a non-empty index signature; isUnion rejects it at runtime.
Union-typed property template.
Requests a union-typed property one branch at a time, so alternatives that need different shapes can each state their own. Keys are opaque Branch labels telling the alternatives apart; which variants a branch retrieves is fixed by matching its shape against the property's declared variants, never by its key, so reordering or renaming variants at the source leaves an existing template valid. A variant left unmatched by every branch contributes no values, and a branch matching no variant is unsatisfiable and is rejected.
A branch holds one value, never a collection: cardinality belongs to the property as a whole, and the Criteria constraining it ride on the entry hosting the union. A branch never holds another union directly, though a branch Template may carry unions of its own.
A union MUST include at least one branch: the empty object
{}is an Atomic. The type admits it only because TypeScript cannot express a non-empty index signature; isUnion rejects it at runtime.See Union for the design rationale.