← Back to Pull requests

fix(compiler): track type query references #6825

Closed
unknown closed this pull request without merging on Aug 12, 2026 12:01 UTC
View on GitHub
unknown unknown commented on Aug 12, 2026 00:34 UTC
Author

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 typeof prop types are not collected as type references. As a result, generated components.d.ts files 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 TypeQueryNode references 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?

  • Yes

  • No
  • <!-- 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.prod

  • npm run lint

  • npm run prettier.dry-run

  • npm run build
  • Other 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.

    Diff: 260 lines (+195 / -65) across 3 files Reviewer: Boulea7 Review duration: 687m
    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
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.0% · Safe to merge
    17.0%
    Repository