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. Show more Installs 1.6K Repository mkosir/typescri…le-guide GitHub Stars 783 First Seen Aug 23, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
typescript-discriminated-unions
安装
npx skills add https://github.com/mkosir/typescript-style-guide --skill typescript-discriminated-unions