Skip to content

fix: improve parentheses rule of conditional#17717

Merged
JLHwung merged 1 commit intobabel:mainfrom
JLHwung:fix-17715
Jan 22, 2026
Merged

fix: improve parentheses rule of conditional#17717
JLHwung merged 1 commit intobabel:mainfrom
JLHwung:fix-17715

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 20, 2026

Q                       A
Fixed Issues? Fixes #17715
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

As a follow-up to #17131, this PR improves the parentheses rules of TSConditionalType and TSInferType. The new rules adopt a more conservative approach when removing parentheses, and the test suite has been expanded to cover these changes.

@JLHwung JLHwung added the PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release label Jan 20, 2026
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60622

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 20, 2026

Open in StackBlitz

commit: e32af0e

@JLHwung JLHwung merged commit 961e94d into babel:main Jan 22, 2026
54 checks passed
@JLHwung JLHwung deleted the fix-17715 branch January 22, 2026 14:53
@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 A type of pull request used for our changelog categories PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Babel 8] Remove TSParenthesizedType breaks generator

4 participants