·branded-types
</>

branded-types

iaskshahram/branded-types

구조적으로 동일한 유형이 실수로 혼합되는 것을 방지하기 위해 TypeScript에서 브랜드(명목/불투명) 유형을 구현합니다. 유형이 안전한 ID(UserId, PostId), 검증된 문자열(이메일, URL), 단위별 숫자(미터, 초) 또는 TypeScript의 구조적 유형 시스템에서 명목 유형 지정이 필요한 모든 시나리오를 작성할 때 사용합니다.

3설치·0트렌드·@iaskshahram

설치

$npx skills add https://github.com/iaskshahram/branded-types --skill branded-types

SKILL.md

TypeScript uses structural typing — two types with the same shape are interchangeable. This means UserId and PostId (both string) can be silently swapped, causing bugs:

Branded types add a compile-time-only marker that makes structurally identical types incompatible. Zero runtime overhead — brands are erased during compilation.

Use a generic Brand utility with a single unique symbol:

구조적으로 동일한 유형이 실수로 혼합되는 것을 방지하기 위해 TypeScript에서 브랜드(명목/불투명) 유형을 구현합니다. 유형이 안전한 ID(UserId, PostId), 검증된 문자열(이메일, URL), 단위별 숫자(미터, 초) 또는 TypeScript의 구조적 유형 시스템에서 명목 유형 지정이 필요한 모든 시나리오를 작성할 때 사용합니다. 출처: iaskshahram/branded-types.

원본 보기

인용 가능한 정보

AI/검색 인용용 안정적인 필드와 명령어.

설치 명령어
npx skills add https://github.com/iaskshahram/branded-types --skill branded-types
카테고리
</>개발 도구
인증됨
최초 등록
2026-02-11
업데이트
2026-02-18

빠른 답변

branded-types이란?

구조적으로 동일한 유형이 실수로 혼합되는 것을 방지하기 위해 TypeScript에서 브랜드(명목/불투명) 유형을 구현합니다. 유형이 안전한 ID(UserId, PostId), 검증된 문자열(이메일, URL), 단위별 숫자(미터, 초) 또는 TypeScript의 구조적 유형 시스템에서 명목 유형 지정이 필요한 모든 시나리오를 작성할 때 사용합니다. 출처: iaskshahram/branded-types.

branded-types 설치 방법은?

터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/iaskshahram/branded-types --skill branded-types 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code나 Cursor에서 사용할 수 있습니다

소스 저장소는 어디인가요?

https://github.com/iaskshahram/branded-types

상세

카테고리
</>개발 도구
출처
skills.sh
최초 등록
2026-02-11

관련 Skills

없음