fix(semantic): enter scope after check_type for TSConditionalType#6270
fix(semantic): enter scope after check_type for TSConditionalType#6270
check_type for TSConditionalType#6270Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
check_type for TSConditionalType
CodSpeed Performance ReportMerging #6270 will not alter performanceComparing Summary
|
|
The usual drill for this is @Dunqing will dig into tsc to find the matching resolution code. He's on holiday so we'll have to wait a bit. |
d89beab to
97e607c
Compare
97e607c to
3556148
Compare
You can (and should). Add oxc/crates/oxc_ast/src/ast/ts.rs Lines 85 to 90 in 50a0029 If you do that, Note: Run |
Is there also an |
No. We haven't found a use for that. But it wouldn't be hard to add if we need it. |
|
We need that to exit the scope before the false branch, since inferred type parameters (e.g. |
|
Closed in favor of #6351 |
Fixes the same problem as #6270, but uses `#[scope(enter_before)]` and `#[scope(exit_after)]` to correct scope entry/exit locations.

When visiting a
TSConditionalType, enter a new scope after visiting thecheck_type, and exit before entering thefalse_type.Fixes this case, where
Bshould have a reference. I can't find the issue that was reported with this, if someone finds it please link it to this PR.Ideally we'd update
ast_toolsto let us configure the order of enter/leave scopes. CC: @overlookmotel.