emptyTypeParameterLists
Reports empty type parameter lists in type aliases and interfaces.
✅ This rule is included in the tsstylisticandstylisticStrictpresets.
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.
Examples
Section titled “Examples”type type Foo = string
Foo<> = string;interface interface Bar
Bar<> {}type type Generic = { value: number;}
Generic<> = { value: number
value: number };type type Foo = string
Foo = string;interface interface Bar
Bar {}type type Generic<T> = T
Generic<function (type parameter) T in type Generic<T>
T> = function (type parameter) T in type Generic<T>
T;interface interface Container<T>
Container<function (type parameter) T in Container<T>
T> { Container<T>.value: T
value: function (type parameter) T in Container<T>
T;}Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If your codebase intentionally uses empty type parameter lists for specific tooling or code generation purposes, you may disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- Biome:
noEmptyTypeParameters
Made with ❤️🔥 around the world by
the Flint team and contributors.