conditional-types-over-overloads
✓여러 반환 유형이 있는 함수를 입력할 때 사용합니다. 함수 동작이 입력 유형에 따라 달라질 때 사용합니다. 공용체 유형 입력을 처리할 때 사용합니다. 함수 과부하를 고려할 때 사용합니다.
SKILL.md
When a function's return type depends on its input type, you might reach for overload signatures. However, conditional types often provide a better solution. Unlike overloads, which are checked independently, conditional types distribute over unions and can be analyzed as a single expression. This makes them more powerful for handling union inputs and results in more maintainable type declarations.
Understanding when to use conditional types versus overloads is key to writing flexible, correct type signatures.
Prefer conditional types to overloaded signatures. Conditional types distribute over unions and provide more precise, maintainable type declarations.
여러 반환 유형이 있는 함수를 입력할 때 사용합니다. 함수 동작이 입력 유형에 따라 달라질 때 사용합니다. 공용체 유형 입력을 처리할 때 사용합니다. 함수 과부하를 고려할 때 사용합니다. 출처: marius-townhouse/effective-typescript-skills.
인용 가능한 정보
AI/검색 인용용 안정적인 필드와 명령어.
- 설치 명령어
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill conditional-types-over-overloads- 카테고리
- </>개발 도구
- 인증됨
- ✓
- 최초 등록
- 2026-02-05
- 업데이트
- 2026-02-18
빠른 답변
conditional-types-over-overloads이란?
여러 반환 유형이 있는 함수를 입력할 때 사용합니다. 함수 동작이 입력 유형에 따라 달라질 때 사용합니다. 공용체 유형 입력을 처리할 때 사용합니다. 함수 과부하를 고려할 때 사용합니다. 출처: marius-townhouse/effective-typescript-skills.
conditional-types-over-overloads 설치 방법은?
터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill conditional-types-over-overloads 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code나 Cursor에서 사용할 수 있습니다
소스 저장소는 어디인가요?
https://github.com/marius-townhouse/effective-typescript-skills
상세
- 카테고리
- </>개발 도구
- 출처
- skills.sh
- 최초 등록
- 2026-02-05