·understand-type-widening
</>

understand-type-widening

TypeScript が一般的な型を推論する理由が混乱している場合に使用してください。 const と let で型が異なる場合に使用します。リテラルが文字列または数値になる場合に使用します。

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

インストール

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

understand-type-widening のインストール方法

コマンドラインで understand-type-widening AI スキルを開発環境にすばやくインストール

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

ソース: marius-townhouse/effective-typescript-skills。

When TypeScript infers a type from a value, it often widens it.

A variable initialized with "x" could be intended to hold any string, or just the literal "x". TypeScript guesses using heuristics, and understanding these helps you write predictable code.

If TypeScript infers a broader type than you expected, you're seeing widening.

TypeScript が一般的な型を推論する理由が混乱している場合に使用してください。 const と let で型が異なる場合に使用します。リテラルが文字列または数値になる場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

引用可能な情報

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

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

Browse more skills from marius-townhouse/effective-typescript-skills

クイックアンサー

understand-type-widening とは?

TypeScript が一般的な型を推論する理由が混乱している場合に使用してください。 const と let で型が異なる場合に使用します。リテラルが文字列または数値になる場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

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

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

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

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