In the documentation about discriminated unions in typescript, here it says:
Discriminated unions are useful for more than just talking about
circles and squares. They’re good for representing any sort of
network (client/server communication), …
Could some explain an example of a messaging scheme that would make use of it?