← Back to Pull requests

fix(semantic): allow type-only exports alongside export assignments #28063

Closed
unknown closed this pull request without merging on Oct 22, 2026 22:44 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 00:27 UTC
Author

The new TypeScript declaration fixtures in #28057 export types alongside export = Route. Oxc incorrectly reports TS2309 for exports that introduce no runtime value.

Classify local named/default references and import-equals aliases by their resolved binding flags. Allow interfaces, type aliases, type-only namespaces, and explicit type-only exports while retaining conflicts for value exports. Handle namespace and enum targets, following aliases throughout nested/dotted paths and export members, including merged declarations, visibility rules, ambient exports, and cycles. Preserve wrappers when deciding whether the assignment binds as an alias; wrapped targets do not participate in namespace shadowing. Direct type declarations can augment the namespace associated with an export assignment; Alias-only sibling exports do not, matching TypeScript's binder.

Added semantic API regressions for these cases and ambient module scopes. just submodules, just coverage, just lint -p oxc_semantic, and the full just test -p oxc_semantic pass. Parser positives improve by eight cases and semantic positives by five; negative-parser coverage is unchanged. Both affected snapshots are updated. Checked review examples against the TypeScript native compiler and the pinned binder/checker source.

Based on main after #28057 merged.

AI disclosure: prepared and verified with Codex assistance.

Diff: 175 lines (+131 / -44) across 2 files Reviewer: camc314 Review duration: 1336m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.35) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 175 lines diff across 2 files
0.35
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.309
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #28063"
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: 35.4% (MEDIUM) · Higher = larger blast radius
35.4%
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: 15.3% · Safe to merge
15.3%