Repository navigation
Preserve replacement lib order during sorting - #64693
Merged
Ryan Cavanaugh (RyanCavanaugh) merged 4 commits intoOct 12, 2026
Merged
Conversation
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix replacement libs load order in TypeScript 7
Preserve replacement lib order during sorting
Oct 8, 2026
Ryan Cavanaugh (RyanCavanaugh)
approved these changes
Oct 12, 2026
Ryan Cavanaugh (RyanCavanaugh)
marked this pull request as ready for review
October 12, 2026 19:47
Copilot started reviewing on behalf of
Ryan Cavanaugh (RyanCavanaugh)
October 12, 2026 19:48
View session
Jake Bailey (jakebailey)
approved these changes
Oct 12, 2026
Ryan Cavanaugh (RyanCavanaugh)
enabled auto-merge
October 12, 2026 19:48
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation correctly addresses the regression and includes adequate coverage.
0 open findings
What changed in this PR
Preserves configured replacement-library order so merged-interface overload precedence remains deterministic.
Changes:
- Uses stable sorting for equal-priority libraries.
- Adds a 14-library regression test covering overload precedence.
| File | Description |
|---|---|
tsc/internal/compiler/fileloader.go |
Stabilizes library sorting. |
tsc/testdata/tests/cases/compiler/libReplacementOrder.ts |
Verifies replacement-library ordering. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Ryan Cavanaugh (RyanCavanaugh)
deleted the
copilot/replace-libs-load-order
branch
October 12, 2026 20:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sortLibsis not stable #64687