Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Un-used properties/methods #10497

Copy link
Copy link

Description

@TheColorRed
Issue body actions

TypeScript Version: 1.8.10

I think that it would be a nice feature to let the user know what properties/methods are defined but unused, this would be done doing so by underlining the method/property with a green underline.

This would more than likely only affect private properties and methods. Here is an example:

class MyClass {

    // Warning saying that "This item is never used"
    private myString1: string;

    // Warning saying that "This item has been assigned to but is never used"
    private myString2: string = 'abc123';

    // No Warning since this could be used anywhere (such as an external library)  
    public myString3: string = '123456';

    // Warning saying that "This item is never used"
    private myMethod1(): void { }

    // No Warning since this could be used anywhere (such as an external library)    
    public myMethod2(): void { }

}

class MyClass2 extends MyClass { }
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.