tools icon indicating copy to clipboard operation
tools copied to clipboard

feat: Support TS satisfies expression

Open nissy-dev opened this issue 3 years ago • 3 comments

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.

nissy-dev avatar Nov 24 '22 12:11 nissy-dev

Deploy Preview for docs-rometools canceled.

Name Link
Latest commit e36ee2e574a983e4932377f64d0e2ca94a854fae
Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/63846ef85402d7000903212c

netlify[bot] avatar Nov 24 '22 12:11 netlify[bot]

There's one failing test that needs updating before merging the PR

MichaReiser avatar Nov 25 '22 13:11 MichaReiser

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.

nissy-dev avatar Nov 26 '22 15:11 nissy-dev

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.

MichaReiser avatar Nov 28 '22 08:11 MichaReiser