-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[WIP] Support condition always true in prefix unary expression #60068
base: main
Are you sure you want to change the base?
[WIP] Support condition always true in prefix unary expression #60068
Conversation
…lways-true-in-prefix-unary-expression
@typescript-bot test it |
Hey @gabritto, the results of running the DT tests are ready. There were interesting changes: Branch only errors:Package: js-fixtures
Package: xdate
Package: activex-excel
Package: morgan
Package: yandex-maps
Package: bluebird
|
@gabritto Here are the results of running the user tests with tsc comparing Something interesting changed - please have a look. Details
|
@gabritto Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@gabritto Here are the results of running the top 400 repos with tsc comparing Something interesting changed - please have a look. Details
|
@tjenkinson I think both the function and promise cases will require some extra work for avoiding most of the false errors. Let me know if you'd still like to keep working on it, I think it's a very good feature since we had at least 3 bugs detected in the extended tests. |
hey @gabritto thanks for looking through them super promising it found some actual issues. Do you think we'll need to handle cases like this one where the usage happens later and is not part of the Happy to continue digging but I think that will be a bit more complex looking at how things are structured at the moment as |
Actually maybe this is a different kind of check. If there's an
I'm not sure if (2) will happen much in the wild so maybe the 1st will be enough |
Also not sure https://github.com/microsoft/vscode/blob/f71675cbd9ba6aef444321cbe5faf8dd81340e3b/extensions/emmet/src/test/abbreviationAction.test.ts#L223 is a false error? Looking at the types |
I think you are right in this case. However, I think we should still support that case to avoid false errors in code written in a similar way. |
Opening as draft for now so we can run the extended tests and see how much breakage there is. See #46140 (comment)
cc @gabritto
Fixes #46140