Skip to content

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

Merged
sosukesuzuki merged 17 commits into
prettier:masterfrom
sosukesuzuki:tsasexp
Mar 31, 2020
Merged

sosukesuzuki merged 17 commits into
prettier:masterfrom
sosukesuzuki:tsasexp

Conversation

@sosukesuzuki

@sosukesuzuki sosukesuzuki commented Mar 25, 2020 •

Copy link
Copy Markdown
Member

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✨

Comment thread src/language-js/printer-estree.js Resolved
Comment thread src/language-js/printer-estree.js Resolved
Comment thread src/language-js/printer-estree.js Resolved
Comment thread src/common/util.js Resolved
@sosukesuzuki
sosukesuzuki requested a review from thorn0 March 26, 2020 19:45
Comment thread src/common/util.js Resolved
Comment thread src/language-js/printer-estree.js Resolved
@prettier prettier deleted a comment from netlify Bot Mar 28, 2020

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

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