The variant spec.
A MsgBuilder whose entries are variant constructors.
Adding a tag to spec widens MsgOf<typeof builder>. Passing that
widened union to createUpdate<MsgOf<...>> makes the missing
handler a compile error at the call site, and a missing arm in a
switch (msg.kind) is a compile error at assertNever.
Build a typed variant-constructor record plus closed
Msgunion from a record oftag → payload?declarations. The same record shape pairs cleanly withcreateUpdate's record-of-handlers, so tags are declared once.