-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Added affectsSourceFile to importHelpers and jsxImportSource #59195
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
Added affectsSourceFile to importHelpers and jsxImportSource #59195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good but test case would be better
The inconsistency was always there, but the debug assert is new in #58451, so yes, a cherry-pick would be good |
Also FWIW, the reason we're not seeing user reports about this is you need a project references scenario where two projects contain the same source file and differ in compiler options only in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls fix formatting
@typescript-bot cherry-pick to release-5.5 |
Hey, @andrewbranch! I've created #59231 for you. |
…e-5.5 (#59231) Co-authored-by: Armando Aguirre <armando.aguirre@microsoft.com>
Fixes #59168 (comment)
The issue happens in a project containing nested projects. One of them defines
"importHelpers": true
, while the root config doesn't.In this scenario, depending on the order the files are opened an incorrect checker is used causing to hit the assert:
Debug Failure. False expression: Expected sourceFile.imports[0] to be the synthesized tslib import
.