tools
tools copied to clipboard
feat: Support TS satisfies expression
Fix #3748
Summary
This PR is initial implementation for satisfies expression released in TS.4.9. This is almost same as the implementation of TsAsExpression.
Test Plan
I added some parser and formatter tests. Also, I updated prettier tests about satisfies expression.
I was able to pass most of the Prettier test cases except for comments-unstable.ts. As for comments-unstable.ts, I don't understand how to pass it. I would appreciate it if you could give me some advice.
Deploy Preview for docs-rometools canceled.
| Name | Link |
|---|---|
| Latest commit | e36ee2e574a983e4932377f64d0e2ca94a854fae |
| Latest deploy log | https://app.netlify.com/sites/docs-rometools/deploys/63846ef85402d7000903212c |
There's one failing test that needs updating before merging the PR
There's one failing test that needs updating before merging the PR
After checking one failing test, I confirmed the tests will pass by commenting out this line in check_reformat.rs. And then, I confirmed the formatted result is not different from prettiter's one so I removed comments-unstable.ts.snap. Currently, only unrelated tests failed.
There's one failing test that needs updating before merging the PR
After checking one failing test, I confirmed the tests will pass by commenting out this line in check_reformat.rs. And then, I confirmed the formatted result is not different from prettiter's one so I removed
comments-unstable.ts.snap. Currently, only unrelated tests failed.
I pushed a commit that handles leading own line comments by creating an indent around the type. The resulting formatting differs from Prettier but is stable.