exclusive-or-properties
CommunityEnforce exactly one option at compile time.
Authorluyi985
Version1.0.0
Installs0
System Documentation
What problem does it solve?
The XOR pattern enforces that exactly one of several properties is present, preventing invalid configurations in type definitions and improving compile-time safety.
Core Features & Use Cases
- Exactly-one variant enforcement using TypeScript unions with never
- Use cases include component props, API parameters, and configuration objects with mutually exclusive options
- Helps catch configuration errors at compile time before runtime
Quick Start
Define a union type where each variant requires one property and the others are never.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: exclusive-or-properties Download link: https://github.com/luyi985/lyi-bash/archive/main.zip#exclusive-or-properties Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.