8000 [no-explicit-any] Option to disable rule for generic constraints · Issue #642 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
[no-explicit-any] Option to disable rule for generic constraints #642
Closed
@anilanar

Description

@anilanar

Repro

{
  "rules": {
    "@typescript-eslint/no-explicit-any": ["error", { "ignoreGenericConstraints": true }]
  }
}
type IsString<T extends any> = T extends string ? true : false;

type CodomainOf<T extends Record<string, any>> = T extends Record<string, infer R> ? R : never;

Expected Result
No errors for explicit any if they are used in generic constraints.

Actual Result
There is no such option to disable errors/warnings for explicit any usage in generic constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0