-
-
Notifications
You must be signed in to change notification settings - Fork 723
feat(formatter): implement formatting for TSAsExpression and TSSatisfiesExpression
#13892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(formatter): implement formatting for TSAsExpression and TSSatisfiesExpression
#13892
Conversation
CodSpeed Instrumentation Performance ReportMerging #13892 will not alter performanceComparing Summary
|
8b7f7c3 to
2cead8b
Compare
e4ae613 to
ed989d2
Compare
ed989d2 to
64c0546
Compare
64c0546 to
e4ae613
Compare
e4ae613 to
622db8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements improved formatting for TypeScript's as and satisfies expressions by creating a dedicated module with context-aware formatting logic. The changes enhance the formatter's ability to handle these expressions in different syntactic contexts, particularly when they appear as callees or object references.
- Refactored
TSAsExpressionandTSSatisfiesExpressionformatting into a dedicated module - Added context-aware formatting that applies special indentation for callee/object contexts
- Improved test compatibility, increasing TypeScript compatibility from 70.51% to 70.86%
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/prettier_conformance/snapshots/prettier.ts.snap.md | Updates test compatibility metrics and removes two failing test cases |
| crates/oxc_formatter/src/write/mod.rs | Adds new module import and removes old inline implementations |
| crates/oxc_formatter/src/write/as_or_satisfies_expression.rs | New module with enhanced formatting logic for as/satisfies expressions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
…isfiesExpression` (#13892)
622db8d to
0f15ed3
Compare

No description provided.