·avoid-unnecessary-type-params
</>

avoid-unnecessary-type-params

marius-townhouse/effective-typescript-skills

ジェネリック関数またはジェネリック型を作成するときに使用します。型署名を確認するときに使用します。型パラメータが 1 回だけ現れる場合に使用します。 「柔軟性」のためにジェネリックを追加したい場合に使用します。

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

インストール

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

SKILL.md

The "Golden Rule of Generics" states that type parameters should appear twice or more in a function signature. If a type parameter only appears once, it's not relating anything and is likely unnecessary. Unnecessary type parameters create a false sense of type safety and can make inference less successful.

This skill helps you identify and eliminate superfluous type parameters, resulting in cleaner, more maintainable code that TypeScript can infer more effectively.

Type parameters must appear twice or more to establish a relationship. If a type parameter only appears once, strongly reconsider if you need it.

ジェネリック関数またはジェネリック型を作成するときに使用します。型署名を確認するときに使用します。型パラメータが 1 回だけ現れる場合に使用します。 「柔軟性」のためにジェネリックを追加したい場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

原文を見る

引用可能な情報

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

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

クイックアンサー

avoid-unnecessary-type-params とは?

ジェネリック関数またはジェネリック型を作成するときに使用します。型署名を確認するときに使用します。型パラメータが 1 回だけ現れる場合に使用します。 「柔軟性」のためにジェネリックを追加したい場合に使用します。 ソース: marius-townhouse/effective-typescript-skills。

avoid-unnecessary-type-params のインストール方法は?

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

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

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