-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Always-false-condition in editorServices.ts #17892
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
Comments
See also https://palantir.github.io/tslint/rules/no-void-expression/ -- but this would require us to set up linting with type information. |
thanks for the report. a PR would be appreciated. |
@mhegazy seems like using a |
i thought you had experimented with this a while back; I think it is a check worth adding, baring any breaks that we might find from RWC tests. |
I had a test for always-truthy values that attempted to find bugs like |
i think the |
Fixes microsoft#17892 The if condition around the return value of that method in closeExternalProject indicates that this was the expected behavior.
The condition on line 1663 in editorServices.ts:
https://github.com/Microsoft/TypeScript/blob/eef7d8bd3d974528464c7968deab78b747568c06/src/server/editorServices.ts#L1650-L1666
is always false as the called method
closeExternalProject
always returns void. That way the if-block withshouldRefreshInferredProjects = true;
is never executed (for more information see the linter rule detecting this).The text was updated successfully, but these errors were encountered: