Skip to content
TypeScript·Intermediate·Conceptual·1 min read

When can a large union become difficult to maintain?

Short interview answer

If unrelated concerns are multiplied into one union, combinations explode. Separate orthogonal state, nest smaller state machines, or model shared data outside the union while retaining genuine mutual exclusions.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Discriminated unions

Related questions