diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md index b8672d945d50..5fd0e70d6532 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md @@ -7,8 +7,8 @@ description: 'Disallow unnecessary constraints on generic types.' > See **https://typescript-eslint.io/rules/no-unnecessary-type-constraint** for documentation. Generic type parameters (``) in TypeScript may be "constrained" with an [`extends` keyword](https://www.typescriptlang.org/docs/handbook/generics.html#generic-constraints). -When no `extends` is provided, type parameters default a constraint to `any`. -It is therefore redundant to `extend` from `any`. +When no `extends` is provided, type parameters default a constraint to `unknown`. +It is therefore redundant to `extend` from `any` or `unknown`. ## Examples @@ -19,8 +19,12 @@ It is therefore redundant to `extend` from `any`. ```ts interface FooAny {} +interface FooUnknown {} + type BarAny = {}; +type BarUnknown = {}; + class BazAny { quxAny() {} }