·type-narrowing

共用体型を使用する場合に使用します。 Null 許容値を処理する場合に使用します。 TypeScript で値が未定義である可能性があると判断される場合に使用します。識別共用体を使用する場合に使用します。

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

インストール

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

SKILL.md

Type narrowing is the process by which TypeScript refines a type from broad to more specific based on control flow.

Master narrowing to write cleaner code without type assertions, and to help TypeScript understand your logic.

If you're using as Type inside an if block, you can probably narrow instead.

共用体型を使用する場合に使用します。 Null 許容値を処理する場合に使用します。 TypeScript で値が未定義である可能性があると判断される場合に使用します。識別共用体を使用する場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

原文を見る

引用可能な情報

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

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

クイックアンサー

type-narrowing とは?

共用体型を使用する場合に使用します。 Null 許容値を処理する場合に使用します。 TypeScript で値が未定義である可能性があると判断される場合に使用します。識別共用体を使用する場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

type-narrowing のインストール方法は?

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

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

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