·branded-types

プリミティブ型が意味上の区別を必要とする場合に使用します。文字列型または数値型の意味が異なる場合に使用します。通常のタイピングが必要な場合に使用します。

2インストール·0トレンド·@marius-townhouse

インストール

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types

SKILL.md

TypeScript uses structural typing, but sometimes you need nominal typing - values that are distinct because you SAY they are, not because they have different shapes. Brands let you do this without runtime overhead.

You can't actually create a value that is both a string and has a brand property:

Response: Type aliases don't prevent mixing up different string types.

プリミティブ型が意味上の区別を必要とする場合に使用します。文字列型または数値型の意味が異なる場合に使用します。通常のタイピングが必要な場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

原文を見る

引用可能な情報

AI/検索での引用用の安定したフィールドとコマンド。

インストールコマンド
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types
カテゴリ
</>開発ツール
認証済み
初回登録
2026-02-05
更新日
2026-02-18

クイックアンサー

branded-types とは?

プリミティブ型が意味上の区別を必要とする場合に使用します。文字列型または数値型の意味が異なる場合に使用します。通常のタイピングが必要な場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

branded-types のインストール方法は?

ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code や Cursor で使用できるようになります

ソースリポジトリはどこですか?

https://github.com/marius-townhouse/effective-typescript-skills