8000 Rule Propsal: No generic type variable shadowing · Issue #521 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
Rule Propsal: No generic type variable shadowing #521
Closed
@nmain

Description

@nmain

Example code:

class Foo<T> {
    bar<T>() {
        // here, T refers to the T for bar, not the T for Foo
    }
}

A rule could ban instances where a generic type variable is introduced with the same name as one in the enclosing scope. Related to #54

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0