--- description: 'Disallow type arguments that are equal to the default.' --- > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-type-arguments** for documentation. Warns if an explicitly specified type argument is the default for that type parameter. ## Rule Details Type parameters in TypeScript may specify a default value. For example: ```ts function f() {} ``` It is redundant to provide an explicit type parameter equal to that default. Examples of code for this rule: ### ❌ Incorrect ```ts function f() {} f(); function g() {} g(); class C {} function h(c: C) {} new C(); class D extends C {} interface I {} class Impl implements I {} ``` ### ✅ Correct ```ts function f() {} f(); function g() {} g(); class C {} new C(); class D extends C {} interface I {} class Impl implements I {} ``` ## Options ```jsonc // .eslintrc.json { "rules": { "@typescript-eslint/no-unnecessary-type-arguments": "warn" } } ``` This rule is not configurable.