fix(compiler): track type query references #6825
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 260 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.333
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6825"
general
weight: 0.35
Boulea7
What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Class and enum names used in identifier-based
keyof typeofprop types are not collected as type references. As a result, generatedcomponents.d.tsfiles can omit required imports. Aliases and re-exports can also produce incorrect imports or colliding docs type-library IDs.GitHub Issue Number: Fixes #2482
What is the new behavior?
<!-- Please describe the behavior or changes that are being added by this PR. -->
The compiler now collects identifier-based
TypeQueryNodereferences when they resolve to classes or enums. It preserves local, named, default, and re-exported aliases in generated component declarations, supports multiple local names for the same default export, and derives docs type-library IDs from the resolved declaration source.Documentation
<!-- Please add any link(s) to documentation-related pull requests here -->
N/A. This is a compiler fix covered by regression tests.
Does this introduce a breaking change?
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
Testing
<!-- Please describe the steps you took to test the changes in this PR. These steps can be programmatic (e.g. unit tests) and/or manual. -->
npm run test.jest -- src/compiler/transformers/test/parse-props.spec.ts --runInBand(48 tests)npm run test.jest -- src/compiler/transformers/test --runInBand(356 tests)npm run test.jest -- src/compiler/types/tests/generate-app-types.spec.ts --runInBand(16 tests, 16 snapshots)npm run tsc.prodnpm run lintnpm run prettier.dry-runnpm run buildOther information
<!-- Any other information that is important to this PR such as screenshots of how a component looks before and after the change. -->
Qualified namespace expressions are outside this change's scope; this addresses identifier-based enum and class queries such as the one reported in #2482.