defineMessageUnion
Declares every Message variant in one object. Each key is a tag, and its value lists that Message's fields. The result is both a Schema and a namespace. Construct a Message with a variant such as `Message.ClickedReset()`, and handle every variant with `Message.match`. Each constructor is also a Schema, so it can appear in a `Command.define` `messages` list. Message unions intentionally expose only constructors and exhaustive `match`. Use Effect `Match` when only some tags need handling or several tags share one handler. Declare a Submodel's OutMessages in their own `defineMessageUnion`. Messages are facts the Submodel handles; OutMessages are facts it reports to its parent. Keep the two unions separate even when two variants carry the same fields. A tag cannot use a name already owned by the union, such as `make`, `match`, `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects these names, and untyped calls throw an error.
export declare function defineMessageUnion<const CasesByTag extends Record<string, Schema.Struct.Fields>>(casesByTag: CasesByTag & ValidateVariantNames<CasesByTag>): MessageUnion<CasesByTag>;