fix(semantic): allow type-only exports alongside export assignments #28063
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
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.309
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #28063"
general
weight: 0.35
camc314
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 fulljust test -p oxc_semanticpass. 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
mainafter #28057 merged.AI disclosure: prepared and verified with Codex assistance.