Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ts] 'privateFunction' is declared but its value is never read. #52997

Closed
fabio-s-franco opened this issue Jun 26, 2018 · 1 comment
Closed
Assignees
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@fabio-s-franco
Copy link

fabio-s-franco commented Jun 26, 2018

Got here and found an issue similar to: #51814 which was marked as not reproducible.

Verified that the insiders build has the same issue as the current release. So I used it to test it without any external extensions.

  • VSCode Version: 1.25.0-insider
  • OS Version: Windows 10 Pro - Version 1803 - Build 17134.112

Steps to Reproduce:
Using latest TypeScript npm package, create the typescript class below:

export class Test {
    private _someVar: boolean = false; //[ts] '_someVar' is declared but its value is never read.

    public somePublicFunction = function() {
        var lib = new ExternalLibrary();
        this._somePrivateFunction();
    }

    private _somePrivateFunction = function() { //[ts] '_somePrivateFunction' is declared but its value is never read.
        if (this._someVar) { //_someVar is read here.
            console.log(':/');
        }
    }
}

Does this issue occur when all extensions are disabled?: Yes

This happens only when we declare class functions as anonymous. Although not a best coding practice, VSCode is still flagging those variables or functions incorrectly.

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 26, 2018

This issue was moved to microsoft/TypeScript#25232

@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 26, 2018
@mjbvz mjbvz closed this as completed Jun 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants