Skip to content

emptyTypeParameterLists

Reports empty type parameter lists in type aliases and interfaces.

✅ This rule is included in the ts stylistic and stylisticStrict presets.

TypeScript permits empty type parameter lists like <>, but this practice is unnecessary. Empty type parameter lists can lead to unclear or ambiguous code where the intention is not self-evident.

AEty53 Foo<<> sp ansty="le--0:#C792EA;--1:#8844">A sp>5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0stri5<3;d ivclassNa="meco">AEinterfa53 Bar<> <{}d ivclassNa="meco"><{}d>AEty53 Generic<<> sp ansty="le--0:#C792EA;--1:#8844">A sp>53 { val7<2:sp ansty="le--0:#D6DEEB;--1:#403F">5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0numb53 <};d ivclassNa="meco"><};d>
44AE3F53 4<4AE= spans="tyle--0:#D6DEEB;--1:#40">361B0st3<;di vdivclass="Nameexpressive-">44AEinter3F53 Ba<}di vdivclass="Nameexpressive-">44AE3F53 Gene1<111T spans="tyle--0:#D6DEEB;--1:#40">3F<53> spans="tyle--0:#C792EA;--1:#88">4 ><4AE= spans="tyle--0:#D6DEEB;--1:#40">31<111T spans="tyle--0:#D6DEEB;--1:#40">3<= T><;di vdivclass="Nameexpressive-">44AEinter3F53 Contai1<111T spans="tyle--0:#D6DEEB;--1:#40">3F5<3> {divclass="Nameec-">3F<53 spans="tyle--0:#D6DEEB;--1:#40">3F53v631<111T spans="tyle--0:#D6DEEB;--1:#40">3 >3

This rule is not configurable.

If your codebase intentionally uses empty type parameter lists for specific tooling or code generation purposes, you may disable this rule.