Skip to content
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

[TypeScript] format TSAsExpression with same logic as BinaryExpression #7869

Merged
merged 17 commits into from Mar 31, 2020

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Mar 25, 2020

Fixes #6443
This is an alternative solution to #6450.
This doesn't convert TSAsExpression in postprocess.js, but pseudo-convert it in the case.
What do you think about this approach?

  • I’ve added tests to confirm my change works.
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

src/common/util.js Outdated Show resolved Hide resolved
src/common/util.js Outdated Show resolved Hide resolved
@prettier prettier deleted a comment from netlify bot Mar 28, 2020
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@sosukesuzuki sosukesuzuki merged commit 8a48ca2 into prettier:master Mar 31, 2020
@sosukesuzuki sosukesuzuki deleted the tsasexp branch March 31, 2020 11:25
thorn0 added a commit that referenced this pull request Apr 6, 2020
thorn0 added a commit that referenced this pull request Apr 6, 2020
…xpression" (#7958)

* Revert "[TypeScript] format TSAsExpression with same logic as BinaryExpression (#7869)"

This reverts commit 8a48ca2.

* add tests from #7956 and #7957

* more tests
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript: type assertions (as) aren't wrapped
3 participants