discriminated-unions
Installation
SKILL.md
Discriminated Unions
Apply the TypeScript Style Guide's discriminated-union conventions in the context of the current task.
Workflow
- Inspect the consuming repository's conventions and configuration.
- Let explicit repository conventions take precedence over this opinionated guidance.
- Apply, review, or explain only the guidance relevant to the task.
- State important tradeoffs when the appropriate model depends on context or judgment.
Boundaries
- Use discriminated unions for mutually exclusive variants that require different data.
- Do not force a discriminated union when properties may independently be absent or when only a value changes.
- Keep TypeScript and ESLint responsible for checks they can enforce automatically.
- Do not introduce unrelated TypeScript Style Guide conventions merely because this skill is active.